public virtual bool checkDUT() { if (pipe == null) { pipe = new AdbPipe(); } return((DeviceID = pipe.GetDeviceID()) != null); }
public string GetSerialNumber() { if (pipe == null) { pipe = new AdbPipe(); } return(pipe.GetDeviceDSN()); }
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); }
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); }