Event Handling
Show launching progress to user
Last updated
Show launching progress to user
Last updated
When you want to show progress to users, add event handlers. CmlLib.Core uses only two event handlers. is used when the file being downloaded changes. (ex: file counts) is used when the progress of the file currently being downloaded changes. (ex: byte progress)
public delegate void DownloadFileChangedHandler(DownloadFileChangedEventArgs e);
Represents the method that will handle download progress events.
Represents the download progress data of IDownloader
.
Specifies the type of file currently being downloaded.
Type: string
The name of the file currently being downloaded. Note: if FileKind is equal to MFile.Resource, this property would be an empty string.
Type: object
The source of event. You can determine what object raised the event. Example:
Type: int
The total number of files to download.
Type: int
The number of files already downloaded.
Indicates the 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 and assets (GAME_DIR/assets)
Minecraft jar file (GAME_DIR/versions)
contains the download progress.
Type: