コード例 #1
0
 /// <summary>
 /// 显示信息
 /// </summary>
 public virtual void ShowInformation()
 {
     Ux.Message($"Name:{Name}\n" +
                $"MinApi: {MinApiLevel}\n" +
                $"TargetApi: {TargetApiLevel}\n" +
                $"Loaded `IExtension`:{GetWrappers().Count()}");
 }
コード例 #2
0
 protected override void Processing(Dictionary <string, object> data)
 {
     Ux.ShowLoadingWindow();
     Ux.Message(Executor.Cmd("ping www.baidu.com").Output.ToString());
     Ux.CloseLoadingWindow();
     throw new Exception();
 }
コード例 #3
0
 protected override int VisualMain()
 {
     if (TargetDevice is NetDevice)
     {
         Ux.Message(Res("EGCMAlreadyEnableNetDebugging"));
         return(OK);
     }
     else if (TargetDevice is UsbDevice usbDevice)
     {
         WriteInitInfo();
         WriteRunning();
         usbDevice.OpenNetDebugging(5555, true);
         return(OK);
     }
     Ux.Warn(Res("EGCMNotSupported"));
     return(ERR);
 }
コード例 #4
0
ファイル: EBreventActivator.cs プロジェクト: zhanji/AutumnBox
        protected override int VisualMain()
        {
            WriteInitInfo();
            new ActivityManager(TargetDevice).StartActivity("me.piebridge.brevent", "ui.BreventActivity");
            var catCommand = CmdStation.GetShellCommand(TargetDevice, $"cat {SH_PATH}");

            state = stateCheck;
            while (catCommand.Execute().ExitCode != (int)LinuxReturnCode.None)
            {
                Ux.Message(Res("EBreventActivatorFirstMsg"));
                Thread.Sleep(2000);
            }


            state = stateExecutingShell;
            var result = CmdStation
                         .GetShellCommand(TargetDevice, $"sh {SH_PATH}")
                         .To(OutputPrinter)
                         .Execute();


            WriteExitCode(result.ExitCode);
            return(result.ExitCode);
        }