public MainWindow() { InitializeComponent(); //Set the version number label to the current version this.versionNumberLabel.Text = "v " + ApplicationUpdater.getCurrentProductVersion(); //Get a previously stored licensekey and check if it is valid string licenseKey = LicenseCheck.getStoredLicenseKey(); if (licenseKey != null) { setLicenseMessages(licenseKey); } //Activate the file watchers Task.Factory.StartNew(() => MainMethods.activateFileWatchers()); //Start the timer that updates the console fileWatcherStatusUpdateTimer.Tick += updateHUDStatus; fileWatcherStatusUpdateTimer.Interval = 1500; fileWatcherStatusUpdateTimer.Start(); errorMessage.Click += MainMethods.openQuickStartGuide; }
public MainWindow() { InitializeComponent(); //Set the version number label to the current version this.versionNumberLabel.Text = "v " + ApplicationUpdater.getCurrentProductVersion(); //Start the filewatchers MainMethods.activateFileWatchers(); //Start the timer that updates the console fileWatcherStatusUpdateTimer.Tick += updateHUDStatus; fileWatcherStatusUpdateTimer.Interval = 1500; fileWatcherStatusUpdateTimer.Start(); errorMessage.Click += MainMethods.openQuickStartGuide; }
//Gathers the current status of every filewatcher and displays it as a label public void updateHUDStatus(Object obj, EventArgs e) { string[] statusStrings = MainMethods.getHUDStatusStrings(); if (statusStrings[0].Equals("")) { successMessage.Text = ""; } else { successMessage.Text = "HUD is up and running for " + statusStrings[0] + "."; } if (statusStrings[1].Equals("")) { errorMessage.Text = ""; errorMessage.Hide(); fileWatcherStatusUpdateTimer.Stop(); } else { errorMessage.Text = "Could not find hand histories for " + statusStrings[1] + ". Click here to see how to fix this."; } }