/// <summary>
 /// 在那之前...
 /// </summary>
 /// <param name="args"></param>
 public override void Before(ExtBeforeCreateArgs args)
 {
     if (!InstallApplication(args.TargetDevice, Value as string))
     {
         bool ignore = false;
         args.Context.App.RunOnUIThread(() =>
         {
             var choice = args.Context.Ux.DoChoice("OpenFxInstallAppFirst", "OpenFxInstallBtnIgnore", "OpenFxInstallBtnOk");
             ignore     = choice == ChoiceResult.Deny;
         });
         args.Prevent = !ignore;
     }
 }
Example #2
0
 /// <summary>
 /// 在创建前
 /// </summary>
 /// <param name="args"></param>
 public override void Before(ExtBeforeCreateArgs args)
 {
     if (!VersionCheck(args.TargetDevice, Value as Version))
     {
         args.Context.App.RunOnUIThread(() =>
         {
             var fmt = args.Context.App.GetPublicResouce <string>("OpenFxLowAndroidVersionFmt");
             var msg = string.Format(fmt, Value);
             args.Context.Ux.Warn(msg);
         });
         args.Prevent = true;
     }
 }
Example #3
0
 public override void Before(ExtBeforeCreateArgs args)
 {
     if ((!(bool)Value) || args.TargetDevice == null)
     {
         return;
     }
     if (!DeviceHaveRoot(args.TargetDevice) && (bool)Value)
     {
         args.Context.App.RunOnUIThread(() =>
         {
             args.Context.Ux.Warn("OpenFxNoRoot!");
         });
         args.Prevent = true;
     }
 }
 /// <summary>
 /// 在创建前调用的方法,必须要实现
 /// </summary>
 /// <param name="args"></param>
 public abstract void Before(ExtBeforeCreateArgs args);