예제 #1
0
        public void ExpBot()
        {
            ExpDungeon[] bots = new ExpDungeon[EmulatorCount];
            for (int ind = EmulatorCount - 1; ind >= 0; ind--)
            {
                bots[ind] = new ExpDungeon(Emulators[ind]);
                Rectangle screen = Screen.GetRect(Emulators[ind]);
                User32.SetWindowPos(Emulators[ind].MainWindowHandle, 0, 0, 0, screen.Width, screen.Width, 1);
            }


            while (true)//replace with start stop button states
            {
                for (int ind = EmulatorCount - 1; ind >= 0; ind--)
                {
                    if (Emulators[ind].HasExited == true)
                    {
                        MainWindow.main.UpdateLog = Emulators[ind].MainWindowTitle + " has terminated. Please stop bot.";
                        return;
                    }
                    bots[ind].Start();
                }
            }
        }
예제 #2
0
        public void ExpBot()
        {
            //Build Bot[]
            ExpDungeon[] bots = new ExpDungeon[0];

            //Builds Bot[] to for ADB clients
            if (L2RDevices != null)
            {
                bots = new ExpDungeon[L2RDevices.Length];

                for (int i = 0; i < bots.Length; i++)
                {
                    bots[i] = new ExpDungeon(NullEmulator, L2RDevices[i]);
                }
            }

            //Builds Bot[] to for ADB clients
            if (Emulators != null)
            {
                bots = new ExpDungeon[Emulators.Length];

                for (int i = 0; i < bots.Length; i++)
                {
                    bots[i] = new ExpDungeon(Emulators[i], NullL2RDev);
                }
            }

            foreach (ExpDungeon bot in bots)
            {
                //Checks if user deselected process to exclude from automation.
                foreach (ListBoxItem item in listProcessList.Items)
                {
                    bool isSelected = false;

                    string itemContent = "";

                    item.Dispatcher.Invoke(new Action(() => isSelected = item.IsSelected));

                    item.Dispatcher.Invoke(new Action(() => itemContent = item.Content.ToString()));

                    if (isSelected && itemContent == bot.BotName)
                    {
                        bot.Complete = true;
                    }
                }

                BotBuilder(bot);
            }


            while (true)//replace with start stop button states
            {
                for (int i = 0; i < bots.Length; i++)
                {
                    if (bots[i].Complete == false)
                    {
                        bots[i].Start();
                    }
                }
            }
        }