/// <summary> /// 显示信息 /// </summary> public virtual void ShowInformation() { Ux.Message($"Name:{Name}\n" + $"MinApi: {MinApiLevel}\n" + $"TargetApi: {TargetApiLevel}\n" + $"Loaded `IExtension`:{GetWrappers().Count()}"); }
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(); }
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); }
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); }