Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EulaView eula;

            if (!System.IO.File.Exists("r"))
            {
                eula = new UI.EulaView();
                Application.Run(eula);
                if (eula.Status == false)
                {
                    MessageBox.Show("You must accept the EULA in order to use Eryan(E2)", "EULA Declined");
                    return;
                }
                else
                {
                    System.IO.File.Create("r");
                }
            }


            Thread ClientThread = new Thread(new ThreadStart(createWindow));

            ClientThread.SetApartmentState(ApartmentState.STA);
            ClientThread.Start();

            while (cWindow == null)
            {
                Thread.Sleep(300);
            }

            cWindow.createBot();


            while (cWindow.getBots().Count < 1)
            {
                Thread.Sleep(100);
            }

            Bot bot1 = cWindow.getBots()[0];


            WindowHandler BotHandle = bot1.getHandle();

            while (true)
            {
                if (bot1 != null)
                {
                    bot1.update();
                }

                System.Threading.Thread.Sleep(1000);
            }
        }
Exemple #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EulaView eula;

            if (!System.IO.File.Exists("r"))
            {
                eula = new UI.EulaView();
                Application.Run(eula);
                if (eula.Status == false)
                {
                    MessageBox.Show("You must accept the EULA in order to use Eryan(E2)", "EULA Declined");
                    return;
                }
                else
                {
                    System.IO.File.Create("r");
                }
            }

            Thread ClientThread = new Thread(new ThreadStart(createWindow));
            ClientThread.SetApartmentState(ApartmentState.STA);
            ClientThread.Start();

            while (cWindow == null)
            {
                Thread.Sleep(300);
            }

            cWindow.createBot();

            while(cWindow.getBots().Count < 1)
                Thread.Sleep(100);

            Bot bot1 = cWindow.getBots()[0];

            WindowHandler BotHandle = bot1.getHandle();

            while (true)
            {

                if ( bot1 != null)
                {
                    bot1.update();
                }

                System.Threading.Thread.Sleep(1000);
            }
        }