Exemple #1
0
        public static List <EmulatorInstance> GetEmulators(List <Account> accounts, List <App> apps)
        {
            List <DataObject>       objects   = BotDatabase.GetObjects <EmulatorInstance>();
            List <EmulatorInstance> emulators = new List <EmulatorInstance>();

            foreach (DataObject o in objects)
            {
                EmulatorInstance emulator = (EmulatorInstance)o;

                foreach (Account a in accounts)
                {
                    if (a.Id == emulator.LastKnownAccount.Id)
                    {
                        emulator.LastKnownAccount = a;
                    }
                }

                foreach (App a in apps)
                {
                    if (a.Id == emulator.App.Id)
                    {
                        emulator.App = a;
                    }
                }

                emulators.Add(emulator);
            }

            return(emulators);
        }
        public LeapdroidScreen(string windowName)
            : base(windowName)
        {
            //Emulator = emulator;
            ClipboardFailed          = false;
            PreventFromOpening       = false;
            TimeoutFactor            = 1.0;
            TimeSinceChecksumChanged = DateTime.Now;

            Process[] procs = Process.GetProcessesByName(PROCESSNAME);

            foreach (Process p in procs)
            {
                if (p.MainWindowTitle.StartsWith(windowName))
                {
                    EmulatorProcess = p;
                    Emulator        = new DataObjects.EmulatorInstance(0, EmulatorType.Leapdroid, windowName, p.CommandLineArgs(EmulatorType.Leapdroid), new DataObjects.Account(0), new DataObjects.App(0));
                    break;
                }
            }

            //emulator.Save();

            //bmp1 = new Bitmap(Controller.SCREEN_W, Controller.SCREEN_H, PixelFormat.Format16bppRgb565);
            //bmp2 = new Bitmap(Controller.SCREEN_W, Controller.SCREEN_H, PixelFormat.Format16bppRgb565);

            SuperBitmap = new SuperBitmap(Controller.SCREEN_W, Controller.SCREEN_H);
        }
Exemple #3
0
        public NoxScreen(DataObjects.EmulatorInstance emulator) : base(emulator)
        {
            Emulator                 = emulator;
            ClipboardFailed          = false;
            PreventFromOpening       = false;
            TimeoutFactor            = 1.0;
            TimeSinceChecksumChanged = DateTime.Now;

            Process[] procs = Process.GetProcessesByName(PROCESSNAME);

            if (emulator.WindowName != "")
            {
                foreach (Process p in procs)
                {
                    if (p.MainWindowTitle.StartsWith(emulator.WindowName))
                    {
                        EmulatorProcess  = p;
                        emulator.Command = p.CommandLineArgs(EmulatorType.Nox);
                        break;
                    }
                }
            }

            //emulator.Save();

            //bmp1 = new Bitmap(Controller.SCREEN_W, Controller.SCREEN_H, PixelFormat.Format16bppRgb565);
            //bmp2 = new Bitmap(Controller.SCREEN_W, Controller.SCREEN_H, PixelFormat.Format16bppRgb565);

            SuperBitmap = new SuperBitmap(Controller.SCREEN_W, Controller.SCREEN_H);
        }
 public Droid4XScreen(DataObjects.EmulatorInstance emulator) : base(emulator)
 {
 }