private void Init(string[] args)
        {
            while (true)
            {
                Thread.Sleep(100);

                var csgOopenChecker = new CsgOopenChecker();

                if (csgOopenChecker.MinimizedCheck() == -1)
                {
                    Console.WriteLine("Open csgo to start");
                }
                else if (csgOopenChecker.MinimizedCheck() == 1)
                {
                    Console.WriteLine("Maximize CSGO");
                }

                while (csgOopenChecker.MinimizedCheck() != 0)
                {
                    Thread.Sleep(300);
                }

                SearchPixel();
                Thread.Sleep(100);
            }
        }
Example #2
0
        private void Init(string[] args)
        {
            argumentos = args;
            while (true)
            {
                Thread.Sleep(100);

                var csgOopenChecker = new CsgOopenChecker();

                if (csgOopenChecker.Minimizado() == -1)
                {
                    Console.WriteLine("Abre el csgo para empezar");
                }
                else if (csgOopenChecker.Minimizado() == 1)
                {
                    Console.WriteLine("Desminimiza el csgo");
                }

                while (csgOopenChecker.Minimizado() != 0)
                {
                    Thread.Sleep(300);
                }

                if (!_beep)
                {
                    var player = new SoundPlayer
                    {
                        SoundLocation = Environment.CurrentDirectory + "/Media/beep.wav"
                    };

                    player.PlaySync();
                    Thread.Sleep(200);
                    player.Stop();
                    _beep = true;
                }

                BuscarPixel();
                Thread.Sleep(100);
            }
        }