void UpdateProcessVisibility() { if (Application.Current.Platform == null) { return; } if (_isProgressRunning) { _box = new ElmSharp.Box(TForms.NativeParent); _box.Show(); _progress = new ElmSharp.ProgressBar(TForms.NativeParent) { Style = "process/popup/small", }; _progress.Show(); _progress.PlayPulse(); _box.PackEnd(_progress); _layout.SetPartContent("elm.swallow.content", _box, true); UpdateTitle(); UpdateText(); } else { _layout.SetPartContent("elm.swallow.content", null, true); } }
void UpdateProcessVisibility() { if (!XForms.IsInitialized) { Log.Debug(FormsCircularUI.Tag, "Tizen Forms is not initialized"); return; } if (_isProgressRunning) { _box = new ElmSharp.Box(XForms.NativeParent); _box.Show(); _progress = new ElmSharp.ProgressBar(XForms.NativeParent) { Style = "process/popup/small", }; _progress.Show(); _progress.PlayPulse(); _box.PackEnd(_progress); _layout.SetPartContent("elm.swallow.content", _box, true); } else { if (_box != null) { if (_progress != null) { _progress.Unrealize(); _progress = null; } if (_progressLabel != null) { _progressLabel.Unrealize(); _progressLabel = null; } _box.Unrealize(); _box = null; } _layout.SetPartContent("elm.swallow.content", null, true); } UpdateTitle(); UpdateText(); }
void UpdateProcessVisibility() { if (Application.Current.Platform == null) { return; } if (_isProgressRunning) { _box = new ElmSharp.Box(TForms.NativeParent); _box.Show(); _progress = new ElmSharp.ProgressBar(TForms.NativeParent) { Style = "process/popup/small", }; _progress.Show(); _progress.PlayPulse(); _box.PackEnd(_progress); if (!string.IsNullOrEmpty(_text)) { var progressLabel = new ElmSharp.Label(TForms.NativeParent) { TextStyle = "DEFAULT = 'align=center'", }; progressLabel.Text = _text; progressLabel.Show(); _box.PackEnd(progressLabel); } _layout.SetPartContent("elm.swallow.content", _box, true); UpdateTitle(); UpdateText(); } else { _layout.SetPartContent("elm.swallow.content", null, true); } }