示例#1
0
        public virtual bool checkDUT()
        {
            if (pipe == null)
            {
                pipe = new AdbPipe();
            }

            return((DeviceID = pipe.GetDeviceID()) != null);
        }
示例#2
0
        public string GetSerialNumber()
        {
            if (pipe == null)
            {
                pipe = new AdbPipe();
            }

            return(pipe.GetDeviceDSN());
        }
示例#3
0
        public virtual bool ChangePanelColor(string panelColorName)
        {
            bool flag = false;

            if (string.IsNullOrEmpty(panelColorName))
            {
                return(flag);
            }

            string name = panelColorName.ToLower();

            if (pipe == null)
            {
                pipe = new AdbPipe();
            }
            pipe.ReadToEnd();

            if (name.Equals("white"))
            {
                flag = pipe.SetWhiteMode();
            }
            else if (name.Equals("black"))
            {
                flag = pipe.SetBlackMode();
            }
            else if (name.Equals("red"))
            {
                flag = pipe.SetRedMode();
            }
            else if (name.Equals("green"))
            {
                flag = pipe.SetGreenMode();
            }
            else if (name.Equals("blue"))
            {
                flag = pipe.SetBlueMode();
            }

            return(flag);
        }
示例#4
0
        public static DUT Instance()
        {
            string  id   = null;
            DUT     dut  = null;
            AdbPipe pipe = new AdbPipe();

            while ((id = pipe.GetDeviceID()) == null)
            {
                System.Threading.Thread.Sleep(100);
            }

            if (id == "xxxx")
            {
                dut = new Hodor();
            }
            else
            {
                dut = new Bran();
            }

            return(dut);
        }