예제 #1
0
        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;
        }
예제 #2
0
 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);
     }
 }
예제 #3
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;
        }