public virtual void ShowLoading(string title, MaskType?maskType)
 {
     if (this.loading == null)
     {
         this.loading = this.Loading(title, null, null, true, maskType);
     }
 }
Example #2
0
 public IProgressDialog Progress(
     string title      = null,
     Action onCancel   = null,
     string cancelText = null,
     bool show         = true,
     MaskType?maskType = null)
 {
     throw new NotImplementedException();
 }
        public void ShowLoading(string title, bool show, string cancelText, MaskType?maskType, Action onCancel)
        {
            try
            {
                var config = new ProgressDialogConfig
                {
                    Title           = title ?? ProgressDialogConfig.DefaultTitle,
                    AutoShow        = show,
                    CancelText      = cancelText ?? ProgressDialogConfig.DefaultCancelText,
                    MaskType        = maskType ?? ProgressDialogConfig.DefaultMaskType,
                    IsDeterministic = true,
                    OnCancel        = onCancel
                };

                ProgressDialog pr = new ProgressDialog(config, ModernAlertsHelper.currentActivity);
                pr.Show();
            }
            catch (Exception e)
            {
            }
        }
 public static LoadingDisposable ShowLoadingWhen <TSender>(this TSender This,
                                                           Expression <Func <TSender, bool> > property, string title = null, MaskType?maskType = null)
 {
     return(new LoadingDisposable(
                This.WhenAnyValue(property)
                .Subscribe(show =>
     {
         if (show)
         {
             UserDialogs.Instance.ShowLoading();
         }
         else
         {
             UserDialogs.Instance.HideLoading();
         }
     })));
 }
 public static LoadingDisposable ShowLoadingWhen <TSender>(this TSender This,
                                                           Func <TSender, IObservable <bool> > busy, string title = null, MaskType?maskType = null)
 {
     return(new LoadingDisposable(busy(This).Subscribe(show =>
     {
         if (show)
         {
             UserDialogs.Instance.ShowLoading();
         }
         else
         {
             UserDialogs.Instance.HideLoading();
         }
     })));
 }
 public void ShowLoading(string title = null, MaskType?maskType = null)
 {
 }
Example #7
0
 public void Progress(string title, bool show, MaskType?maskType = null)
 {
     UserDialogs.Instance.Progress(title, null, null, show, maskType);
 }
Example #8
0
 internal static string ToSerializedValue(this MaskType?value)
 {
     return(value == null ? null : ((MaskType)value).ToSerializedValue());
 }
Example #9
0
        public static async void ShowLoading(string title = "Loading..", MaskType?maskType = default(MaskType?))
        {
            await WaitInBackground();

            _userDialogs.Value.ShowLoading(title, maskType);
        }
Example #10
0
 public static IDisposable Loading(string title = "Loadin...", Action onCancel = default(Action), string cancelText = "Cancel", bool show = true, MaskType?maskType = default(MaskType?))
 {
     return(_userDialogs.Value.Loading(title, onCancel, cancelText, show, maskType));
 }
Example #11
0
 public IProgressDialog Loading(string title = null, Action onCancel = null, string cancelText = null, bool show = true, MaskType?maskType = default(MaskType?))
 {
     return(new ProgressDialogMock());
 }
Example #12
0
 public void ShowLoading(string title = null, MaskType?maskType = default(MaskType?))
 {
     return;
 }
 public void ShowLoading(string title = null, MaskType?maskType = null)
 {
     throw new NotImplementedException();
 }
Example #14
0
 /// <summary>
 /// 挂起繁忙状态
 /// </summary>
 public static void Busy(string title = "加载中...", MaskType?maskType = null)
 {
     UserDialogs.Instance.ShowLoading(title, maskType);
 }
 public IProgressDialog Loading(string title = null, Action onCancel = null, string cancelText = null, bool show = true, MaskType?maskType = null) =>
 UserDialogs.Instance.Loading(title, onCancel, cancelText, show, MaskType.Black);
Example #16
0
 /// <summary>
 /// 挂起繁忙状态
 /// </summary>
 protected void Busy(string title = "加载中...", MaskType?maskType = null)
 {
     MessageBox.Busy(title, maskType);
 }
Example #17
0
 public IProgressDialog Progress(string title = null, Action onCancel = null, string cancelText = null, bool show = true, MaskType?maskType = null)
 {
     return(UserDialogs.Instance.Progress(title, onCancel, cancelText, show, maskType));
 }
Example #18
0
 public IProgressDialog LoadingWithCancellation(string title, string cancelText, Action onCancel = null, bool show = true, MaskType?maskType = default)
 {
     return(this.UserDialogs.Loading(title, onCancel, cancelText, show, maskType));
 }
Example #19
0
 public void ShowLoading(string title = null, MaskType?maskType = null)
 {
     UserDialogs.Instance.ShowLoading(title, maskType);
 }
Example #20
0
 public IProgressDialog Loading(string title = null, Action onCancel = null, string cancelText = null, bool show = true, MaskType?maskType = null)
 {
     return(null);
 }
Example #21
0
 public virtual IProgressDialog Progress(string title, Action onCancel, string cancelText, bool show, MaskType?maskType)
 => this.Progress(new ProgressDialogConfig
 {
     Title           = title ?? ProgressDialogConfig.DefaultTitle,
     AutoShow        = show,
     CancelText      = cancelText ?? ProgressDialogConfig.DefaultCancelText,
     MaskType        = maskType ?? ProgressDialogConfig.DefaultMaskType,
     IsDeterministic = true,
     OnCancel        = onCancel
 });
Example #22
0
 public IProgressDialog Progress(string title = null, Action onCancel = null, string cancelText = null, bool show = true, MaskType?maskType = null)
 {
     return(new ProgressMock());
 }