-
-
Notifications
You must be signed in to change notification settings - Fork 4
MainWindow
Interaction logic for MainWindow.xaml
This method is called when the program starts. It checks if the user has an ID assigned, if not it try to get a new ID from the database and assign it to the user. Then check if there are fonts to be installed and, if it is the case, installs them. Finally, initialise the GUI.
Close the window and display any catched exception message in a popup window.
Animation code for the image changing
Start download. When it finishes, start unzipping.
Name | Description |
---|---|
sender |
System.Object |
e |
System.Windows.RoutedEventArgs |
InitializeComponent
Enable MainWindow.button, change its color and content and set MainWindow.LaunchGame(System.Object,System.Windows.RoutedEventArgs) as function to be called on click.
Search for program executable and launch it.
Name | Description |
---|---|
sender |
System.Object |
e |
System.Windows.RoutedEventArgs |
Make top Rectangle draggable
Removes all event handlers subscribed to the specified routed event from the specified element. Credit: https://stackoverflow.com/a/16392387/1149773
Name | Description |
---|---|
element |
System.Windows.UIElement The UI element on which the routed event is defined. |
routedEvent |
System.Windows.RoutedEvent The routed event for which to remove the event handlers. |
Set ProgressBar.IsIndeterminate = idle
Name | Description |
---|---|
idle |
System.Boolean true for show indeterminate loading, false otherwise |
Tick on the dispatchtimer called every 10 seconds. Used to update background Images.
Show/hide options windows. In addition hide notice window.
Name | Description |
---|---|
sender |
System.Object |
e |
System.Windows.RoutedEventArgs |
Unzip a file and show progress in MainWindow.BarGrid.
Name | Description |
---|---|
zipPath |
System.String Archive to uzip's full path. |
Updates the progress bar to the given value.
Name | Description |
---|---|
value |
System.Double The target value. |
It is called when the GUI is loaded. It implements the main logic of the program.
Name | Description |
---|---|
sender |
System.Object |
e |
System.Windows.RoutedEventArgs |
Wiki work in progress, please feel free to contribute!