Exemplo n.º 1
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);
            }
        }
Exemplo n.º 2
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);
            }
        }
Exemplo n.º 3
0
        public static void setNoxPort(string nox_path)
        {
            string output = CommandLineHandler.doCommand(nox_path + "nox_adb devices");
            string pat    = @"127.0.0.1:62\d\d\d	device";
            Regex  r      = new Regex(pat, RegexOptions.IgnoreCase);

            Match  m    = r.Match(output);
            string line = "";

            while (m.Success)
            {
                line = m.Groups[0].ToString();
                m    = m.NextMatch();
            }

            devicesPath = "127.0.0.1:" + line.Replace("	device", "").Replace("127.0.0.1:", "");
        }