Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }