Exemple #1
0
        protected override int VisualMain()
        {
            if (!Ux.Agree(Res("EOemLockWarn")))
            {
                return(ERR_CANCELED_BY_USER);
            }
            if (!Ux.Agree(Res("EOemLockWarnAgain")))
            {
                return(ERR_CANCELED_BY_USER);
            }
            WriteInitInfo();
            var result = CmdStation.GetFastbootCommand(TargetDevice, "oem lock")
                         .To(OutputPrinter)
                         .Execute();

            WriteExitCode(result.ExitCode);
            return(result.ExitCode);
        }
Exemple #2
0
 //public EHoldMyHand() {
 //    throw new System.Exception();
 //}
 protected override int VisualMain()
 {
     WriteLine(Ux.Agree("w").ToString());
     Ux.Error("Ok");
     WriteInitInfo();
     WriteLine("开始执行");
     Thread.Sleep(3000);
     WriteLine("进度25");
     Progress = 25;
     Thread.Sleep(3000);
     WriteLine("现在可以被停止了");
     Progress  = 50;
     stoppable = true;
     new AdbCommand($"-s 01d1234 reboot")
     .To(OutputPrinter)
     .Execute();
     Thread.Sleep(2500);
     return(0);
 }
Exemple #3
0
        protected override int VisualMain()
        {
            if (!Ux.Agree(Res("EOemLockWarn")))
            {
                return(ERR);
            }
            if (!Ux.Agree(Res("EOemLockWarnAgain")))
            {
                return(ERR);
            }
            WriteInitInfo();
            ExecutingCommand = new FastbootCommand(TargetDevice, "oem lock");
            WriteCommand(ExecutingCommand);
            WriteLine(ExecutingCommand.ToString());
            var exeResult = ExecutingCommand.To(OutputPrinter).Execute();

            WriteExitCode(exeResult.ExitCode);
            return(exeResult.ExitCode);
        }
        protected virtual bool OnWarnUser()
        {
            string warnMsg = string.Format(Res("EGodPowerWarningFmt"), Res("AppNameThis"));

            return(Ux.Agree(warnMsg));
        }
Exemple #5
0
        protected override bool OnWarnUser()
        {
            var warnMsg = string.Format(Res("EGodPowerWarningFmt"), Res("AppNameStopApp"));

            return(Ux.Agree(warnMsg));
        }