Beispiel #1
0
        public static void swap(int x1, int y1, int x2, int y2)
        {
            List <string> code123 = new List <string>();

            for (int x = x1; x < x2; x += 10)
            {
                code123.Add("3 53 " + x);
                code123.Add("3 54 " + y1);
                code123.Add("0 2 0");
                code123.Add("0 0 0");
            }

            for (int y = y1; y < y2; y += 10)
            {
                code123.Add("3 53 " + x2);
                code123.Add("3 54 " + y);
                code123.Add("0 2 0");
                code123.Add("0 0 0");
            }

            sendDrapStart(x1, y1);
            Thread.Sleep(100);
            foreach (string c in code123)
            {
                CommandLineHandler.doNoOutputCommand(Form1.nox_path + "nox_adb -s " + devicesPath + " shell sendevent /dev/input/event7 " + c);
                Thread.Sleep(100);
                Console.WriteLine("sendevent / dev / input / event7 " + c);
            }
            Thread.Sleep(300);
            sendDrapFinish();
        }
Beispiel #2
0
        public static void tap(Point p)
        {
            string cmd = Form1.nox_path + "nox_adb -s " + devicesPath + " shell input tap " + p.X + " " + p.Y;
            Thread tap = new Thread(() => CommandLineHandler.doNoOutputCommand(cmd));

            tap.Start();
        }
Beispiel #3
0
        private static void sendDrapStart(int x, int y)
        {
            List <string> list = new List <string>();

            list.Add("1 330 1");
            list.Add("3 58 1");
            list.Add("3 53 " + x);
            list.Add("3 54 " + y);
            list.Add("0 2 0");
            list.Add("0 0 0");
            foreach (string c in list)
            {
                CommandLineHandler.doNoOutputCommand(Form1.nox_path + "nox_adb -s " + devicesPath + " shell " + sendeventCmd + " " + c);
            }
        }
Beispiel #4
0
        private static void sendDrapFinish()
        {
            List <string> list = new List <string>();

            list.Add("0 2 0");
            list.Add("0 0 0");
            list.Add("1 330 0");
            list.Add("3 58 0");
            list.Add("3 53 0");
            list.Add("3 54 0");
            list.Add("0 2 0");
            list.Add("0 0 0");
            foreach (string c in list)
            {
                CommandLineHandler.doNoOutputCommand(Form1.nox_path + "nox_adb -s " + devicesPath + " shell " + sendeventCmd + " " + c);
            }
        }