protected override int SetReciverAsDpm() { return(CmdStation.Register(GodPower .GetSetIceBoxCommand()) .To(OutputPrinter) .Execute() .ExitCode); }
protected sealed override int VisualMain() { WriteWaitingForUser(); if (!OnWarnUser()) { return(ERR_CANCELED_BY_USER); } ProcessBasedCommand command = null; IProcessBasedCommandResult result = null; WriteInitInfo(); GodPower = new GodPower(this, TargetDevice); WriteLineAndSetTip(Res("EGodPowerExtractingApk")); GodPower.Extract(); ThrowIfCanceled(); WriteLineAndSetTip(Res("EGodPowerPushingApk")); command = GodPower.GetPushCommand(); CmdStation.Register(command); result = command .To(OutputPrinter) .Execute(); WriteLineAndSetTip(Res("EGodPowerRmUser")); command = GodPower.GetRemoveUserCommand(); CmdStation.Register(command); result = command .To(OutputPrinter) .Execute(); ThrowIfCanceled(); WriteLineAndSetTip(Res("EGodPowerRmAcc")); command = GodPower.GetRemoveAccountCommnad(); CmdStation.Register(command); result = command .To(OutputPrinter) .Execute(); ThrowIfCanceled(); return(SetReciverAsDpm()); }
/// <summary> /// 开始录制 /// </summary> public void Start() { Logger <VideoRecorder> logger = new Logger <VideoRecorder>(); string command = $"screenrecord " + $"--size {Size.Width}x{Size.Height} " + $"--bit-rate {BitRate} " + $"--time-limit {Seconds} "; if (EnableVerbose) { command += "--verbose "; } command += TmpFile; logger.Info("The command of recoding:" + command); var cmd = new RealtimeShellCommand(Device, command); CmdStation.Register(cmd); cmd .To(RaiseOutput) .Execute() .ThrowIfExitCodeNotEqualsZero(); }