示例#1
0
        //Monitors CSGO, if CSGO finishes we want to update the Matchlist
        private void MonitorCSGO()
        {
            bool wasRunning = false;

            while (true)
            {
                if (Process.GetProcessesByName("csgo").Length != 0)
                {
                    wasRunning = true;
                    VibranceAndAudioUserControlInstance.CSGOIsRunning();
                }

                if (Process.GetProcessesByName("csgo").Length == 0 && wasRunning)
                {
                    wasRunning = false;
                    VibranceAndAudioUserControlInstance.CSGOWasRunning();

                    long tempAccountId = BoilerHandler.StartAndGetAccountId();
                    if (tempAccountId != 0 && tempAccountId != _accountId)
                    {
                        _accountId = tempAccountId;
                        Properties.Settings.Default.LastAccountId = tempAccountId;
                    }
                    UpdateMatchlist();
                }

                Thread.Sleep(5000);
            }
        }
示例#2
0
        //Monitors CSGO, activates Audi/Vibrance settings
        private void MonitorCSGO()
        {
            bool wasRunning = false;

            while (true)
            {
                if (Process.GetProcessesByName("csgo").Length != 0)
                {
                    wasRunning = true;
                    VibranceAndAudioUserControlInstance.CSGOIsRunning();
                }

                if (Process.GetProcessesByName("csgo").Length == 0 && wasRunning)
                {
                    wasRunning = false;
                    VibranceAndAudioUserControlInstance.CSGOWasRunning();
                }

                Thread.Sleep(5000);
            }
        }
示例#3
0
 //Saving Settings, disabeling running Vibrance
 private void MainWindow_OnClosed(object sender, EventArgs e)
 {
     Properties.Settings.Default.Save();
     VibranceAndAudioUserControlInstance.CSGOWasRunning();
     Environment.Exit(0);
 }