public void Show() { Console.WriteLine("[ProgressbarPopupRenderer.Show] "); _progressbar.Value = 0; _popUp.Show(); _progressbar.PlayPulse(); }
void ShowActivityIndicatorDialog(bool enabled) { if (null == _pageBusyDialog) { _pageBusyDialog = new Native.Dialog(Forms.Context.MainWindow) { Orientation = PopupOrientation.Top, }; var activity = new EProgressBar(_pageBusyDialog) { Style = "process_large", IsPulseMode = true, }; activity.PlayPulse(); activity.Show(); _pageBusyDialog.Content = activity; } _pageBusyCount = Math.Max(0, enabled ? _pageBusyCount + 1 : _pageBusyCount - 1); if (_pageBusyCount > 0) { _pageBusyDialog.Show(); } else { _pageBusyDialog.Dismiss(); _pageBusyDialog = null; } }
void BusySetSignalNameHandler(Page sender, bool enabled) { // Verify that the page making the request is child of this platform if (!PageIsChildOfPlatform(sender)) { return; } if (null == _pageBusyDialog) { _pageBusyDialog = new Native.Dialog(Forms.NativeParent) { Orientation = PopupOrientation.Center, BackgroundColor = EColor.Transparent }; if (Device.Idiom == TargetIdiom.Phone) { _pageBusyDialog.SetPartColor("bg_title", EColor.Transparent); _pageBusyDialog.SetPartColor("bg_content", EColor.Transparent); } else if (Device.Idiom == TargetIdiom.Watch) { _pageBusyDialog.Style = "circle"; } var activity = new EProgressBar(_pageBusyDialog) { Style = "process_large", IsPulseMode = true, }; activity.PlayPulse(); activity.Show(); _pageBusyDialog.Content = activity; } _pageBusyCount = Math.Max(0, enabled ? _pageBusyCount + 1 : _pageBusyCount - 1); if (_pageBusyCount > 0) { _pageBusyDialog.Show(); } else { _pageBusyDialog.Dismiss(); _pageBusyDialog = null; } }
void OnBusySetRequest(Page sender, bool enabled) { // Verify that the page making the request is child of this platform if (!_platform.PageIsChildOfPlatform(sender)) { return; } if (null == _pageBusyDialog) { _pageBusyDialog = new Native.Dialog(Forms.NativeParent) { Orientation = PopupOrientation.Center, BackgroundColor = EColor.Transparent }; if (DeviceInfo.Idiom == DeviceIdiom.Phone) { _pageBusyDialog.SetTitleBackgroundColor(EColor.Transparent); _pageBusyDialog.SetContentBackgroundColor(EColor.Transparent); } else if (DeviceInfo.Idiom == DeviceIdiom.Watch) { _pageBusyDialog.SetWatchCircleStyle(); } var activity = new EProgressBar(_pageBusyDialog) { IsPulseMode = true }.SetLargeStyle(); activity.PlayPulse(); activity.Show(); _pageBusyDialog.Content = activity; } _pageBusyCount = Math.Max(0, enabled ? _pageBusyCount + 1 : _pageBusyCount - 1); if (_pageBusyCount > 0) { _pageBusyDialog.Show(); } else { _pageBusyDialog.Dismiss(); _pageBusyDialog = null; } }
void OnBusySetRequest(Page sender, bool enabled) { // Verify that the page making the request is child of this platform if (!PageIsInThisContext(sender)) { return; } _busyCount = Math.Max(0, enabled ? _busyCount + 1 : _busyCount - 1); if (null == _pageBusyDialog) { _pageBusyDialog = new Dialog(MauiContext.GetPlatformParent()) { Orientation = PopupOrientation.Center, BackgroundColor = EColor.Transparent }; _pageBusyDialog.SetTitleBackgroundColor(EColor.Transparent); _pageBusyDialog.SetContentBackgroundColor(EColor.Transparent); var activity = new EProgressBar(_pageBusyDialog) { IsPulseMode = true }.SetLargeStyle(); activity.PlayPulse(); activity.Show(); _pageBusyDialog.Content = activity; } if (_busyCount > 0) { _pageBusyDialog.Show(); } else { _pageBusyDialog.Dismiss(); _pageBusyDialog.Unrealize(); _pageBusyDialog = null; } }
void BusySetSignalNameHandler(Page sender, bool enabled) { // Verify that the page making the request is child of this platform if (!PageIsChildOfPlatform(sender)) { return; } if (null == _pageBusyDialog) { _pageBusyDialog = new Native.Dialog(Forms.NativeParent) { Orientation = PopupOrientation.Top, }; var activity = new EProgressBar(_pageBusyDialog) { Style = "process_large", IsPulseMode = true, }; activity.PlayPulse(); activity.Show(); _pageBusyDialog.Content = activity; } _pageBusyCount = Math.Max(0, enabled ? _pageBusyCount + 1 : _pageBusyCount - 1); if (_pageBusyCount > 0) { _pageBusyDialog.Show(); } else { _pageBusyDialog.Dismiss(); _pageBusyDialog = null; } }