public CloseNetDebugging(DevicesPanel root, DeviceSerialNumber serial)
 {
     InitializeComponent();
     _serial   = serial;
     TBIP.Text = serial.ToString();
     this.root = root;
 }
示例#2
0
 /// <summary>
 /// 实例化
 /// </summary>
 /// <param name="id"></param>
 public AndroidShell(DeviceSerialNumber serial)
 {
     _mainProcess = new Process
     {
         StartInfo = new ProcessStartInfo()
         {
             StandardOutputEncoding = Encoding.UTF8,
             StandardErrorEncoding  = Encoding.UTF8,
             RedirectStandardError  = true,
             RedirectStandardInput  = true,
             RedirectStandardOutput = true,
             CreateNoWindow         = true,
             UseShellExecute        = false,
             FileName  = AdbConstants.FullAdbFileName,
             Arguments = $" -s {serial.ToString()} shell"
         }
     };
     _mainProcess.OutputDataReceived += (s, e) => { OnOutputReceived(new OutputReceivedEventArgs(e, false)); };
     _mainProcess.ErrorDataReceived  += (s, e) => { OnOutputReceived(new OutputReceivedEventArgs(e, true)); };
 }