Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (_isDisposed)
            {
                return;
            }

            if (disposing)
            {
                if (_bottomButton != null)
                {
                    _bottomButton.Unrealize();
                    _bottomButton = null;
                }

                if (_box != null)
                {
                    _box.Unrealize();
                    _box = null;
                }

                if (_progress != null)
                {
                    _progress.Unrealize();
                    _progress = null;
                }

                if (_progressLabel != null)
                {
                    _progressLabel.Unrealize();
                    _progressLabel = null;
                }

                if (_popUp != null)
                {
                    _layout.Unrealize();
                    _layout = null;
                    _popUp.BackButtonPressed -= BackButtonPressedHandler;
                    _popUp.Unrealize();
                    _popUp = null;
                }
            }

            _isDisposed = true;
        }
        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);
            }
        }
Exemple #5
0
        public void Dismiss()
        {
            _popUp.Hide();

            if (_bottomButton != null)
            {
                _bottomButton.Unrealize();
                _bottomButton = null;
                _popUp.SetPartContent("button1", null);
            }

            if (_box != null)
            {
                _box.Unrealize();
                _box = null;
            }

            if (_progress != null)
            {
                _progress.Unrealize();
                _progress = null;
            }

            if (_progressLabel != null)
            {
                _progressLabel.Unrealize();
                _progressLabel = null;
            }

            if (_popUp != null)
            {
                _layout.Unrealize();
                _layout = null;
                _popUp.BackButtonPressed -= BackButtonPressedHandler;
                _popUp.Unrealize();
                _popUp = null;
            }
        }