-
Notifications
You must be signed in to change notification settings - Fork 43
Handling Events
CmlLib.Core uses only two event handler.
DownloadFileChangedHandler is used when the file being downloaded changes.
ProgressChangedEventHandler is used when the progress of the currently downloading file changes.
public delegate void DownloadFileChangedHandler(DownloadFileChangedEventArgs e);
Represents the method that will handle download progress events.
e DownloadFileChangedEventArgs
The event data
Represent the download progress data of MDownloader
Type: MFile
Specifies the type of file currently being downloaded.
Type: string
The name of the file currently being downloaded.
Note: if FileKind is MFile.Resource, This property would be empty string.
Type: int
The number of all files to download.
Type: int
The number of files already downloaded.
Indicates game file type.
public enum MFile { Runtime, Library, Resource, Minecraft };
Java Runtime. CMLauncher.CheckJRE() raises FileChange event with this type.
Libraries (GAME_DIR/libraries)
Resources, Assets (GAME_DIR/assets)
Minecraft jar file (GAME_DIR/versions)