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; }
static void Main() { if (mutex.WaitOne(TimeSpan.Zero, true)) { //Necessary Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ApplicationUpdater.checkForUpdatesAndInstallIfNecessary(); Application.Run(new MainWindow()); mutex.ReleaseMutex(); } else { Environment.Exit(0); } }
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; }