async void HideBtn_Clicked(System.Object sender, System.EventArgs e)
        {
            await SettingsButton.FadeTo(0, 200, Easing.Linear);

            await HomeButton.FadeTo(0, 200, Easing.Linear);

            await ExploreButton.FadeTo(0, 200, Easing.Linear);

            await HideButton.TranslateTo(-deviceWidth - 10, 0, 1000, Easing.SpringOut);

            await ExpandButton.FadeTo(100, 500, Easing.Linear);

            HideButton.Opacity = 0;
            await HideButton.TranslateTo(0, 0, 0);
        }
        async void RevealBtn_Clicked(System.Object s, System.EventArgs e)
        {
            await ExpandButton.TranslateTo(deviceWidth + 10, 0, 1000, Easing.SpringOut);

            await Task.WhenAll(
                ExploreButton.FadeTo(100, 1000, Easing.CubicIn),
                HomeButton.FadeTo(100, 1000, Easing.CubicIn),
                SettingsButton.FadeTo(100, 1000, Easing.CubicIn)
                );

            await HideButton.FadeTo(100, 500, Easing.Linear);

            ExpandButton.Opacity = 0;
            await ExpandButton.TranslateTo(0, 0, 0);
        }
        private void ShowORHideButton()
        {
            if (TextDis.Text.Length > 0 && TextFocus.Text.Length > 0)
            {
                int dis = int.Parse(TextDis.Text);
                int con = int.Parse(TextFocus.Text);

                if (dis >= 1 && con >= 1)
                {
                    ShowButton.Begin();
                }
                else if (BtComfirm.Visibility == Visibility.Visible)
                {
                    HideButton.Begin();
                }
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (WolfVIew != null)
            {
                WolfVIew.Dispose();
                WolfVIew = null;
            }

            if (HideButton != null)
            {
                HideButton.Dispose();
                HideButton = null;
            }

            if (ShowButton != null)
            {
                ShowButton.Dispose();
                ShowButton = null;
            }
        }
Ejemplo n.º 5
0
        private void setSize(double _width, double _height)
        {
            //Window size
            renderWindow.Height = _height;
            renderWindow.Width  = _width;

            //Render area size
            danmakuRender.Height = _height;
            danmakuRender.Width  = _width;

            //Border size
            visualBorder.Height = _height;
            visualBorder.Width  = _width;

            //Buttons postion
            settingButton.SetValue(Canvas.TopProperty, (double)0);

            pressureButton.SetValue(Canvas.TopProperty, (double)0);

            HideButton.SetValue(Canvas.TopProperty, (double)0);
        }
Ejemplo n.º 6
0
 private async void VerifyDistractions(ThreadPoolTimer timer)
 {
     if (!IsInternet())
     {
         await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
         {
             if ((ShowButton.GetCurrentState() == ClockState.Stopped || ShowButton.GetCurrentState() == ClockState.Filling) && BtNext.Visibility != Visibility.Visible)
             {
                 ShowButton.Begin();
             }
         });
     }
     else
     {
         await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
         {
             if ((HideButton.GetCurrentState() == ClockState.Stopped || HideButton.GetCurrentState() == ClockState.Filling) && BtNext.Visibility != Visibility.Collapsed)
             {
                 HideButton.Begin();
             }
         });
     }
 }
Ejemplo n.º 7
0
        private void Init()
        {
            Layout = new qxDotNet.UI.Layout.Dock();
            _img   = new qxDotNet.UI.Basic.Image();

            _img.Width  = 48;
            _img.Source = "resource/qx/icon/Oxygen/48/status/dialog-information.png";
            switch (_icon)
            {
            case MessageBoxIconEnum.Information:
                _img.Source = "resource/qx/icon/Oxygen/48/status/dialog-information.png";
                break;

            case MessageBoxIconEnum.Warning:
                _img.Source = "resource/qx/icon/Oxygen/48/status/dialog-warning.png";
                break;

            case MessageBoxIconEnum.Question:
                _img.Source = "resource/qx/icon/Oxygen/48/status/dialog-warning.png";
                break;

            case MessageBoxIconEnum.Error:
                _img.Source = "resource/qx/icon/Oxygen/48/status/dialog-error.png";
                break;

            default:
                break;
            }

            _panelButtons = new qxDotNet.UI.Container.Composite();
            var layout = new qxDotNet.UI.Layout.Flow();

            layout.AlignX        = AlignXEnum.center;
            layout.SpacingX      = 5;
            layout.SpacingY      = 15;
            _panelButtons.Layout = layout;
            Add(_panelButtons, new Map().Add("edge", "south"));
            Add(_img, new Map().Add("edge", "west"));
            switch (_buttons)
            {
            case MessageBoxButtonsEnum.Ok:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonOk;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);
                break;

            case MessageBoxButtonsEnum.OkCancel:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonOk;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);

                _btn2          = new HideButton(this);
                _btn2.Label    = _buttonCancel;
                _btn2.MinWidth = 60;
                _btn2.Execute += new EventHandler(_btn2_Execute);
                _panelButtons.Add(_btn2);
                break;

            case MessageBoxButtonsEnum.YesNo:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonYes;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);

                _btn2          = new HideButton(this);
                _btn2.Label    = _buttonNo;
                _btn2.MinWidth = 60;
                _btn2.Execute += new EventHandler(_btn2_Execute);
                _panelButtons.Add(_btn2);
                break;

            case MessageBoxButtonsEnum.YesNoCancel:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonYes;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);

                _btn2          = new HideButton(this);
                _btn2.Label    = _buttonNo;
                _btn2.MinWidth = 60;
                _btn2.Execute += new EventHandler(_btn2_Execute);
                _panelButtons.Add(_btn2);

                _btn3          = new HideButton(this);
                _btn3.Label    = _buttonCancel;
                _btn3.MinWidth = 60;
                _btn3.Execute += new EventHandler(_btn3_Execute);
                _panelButtons.Add(_btn3);

                break;

            case MessageBoxButtonsEnum.AbortRetryIgnore:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonAbort;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);

                _btn2          = new HideButton(this);
                _btn2.Label    = _buttonRetry;
                _btn2.MinWidth = 60;
                _btn2.Execute += new EventHandler(_btn2_Execute);
                _panelButtons.Add(_btn2);

                _btn3          = new HideButton(this);
                _btn3.Label    = _buttonIgnore;
                _btn3.MinWidth = 60;
                _btn3.Execute += new EventHandler(_btn3_Execute);
                _panelButtons.Add(_btn3);
                break;

            case MessageBoxButtonsEnum.RetryCancel:
                _btn1          = new HideButton(this);
                _btn1.Label    = _buttonRetry;
                _btn1.MinWidth = 60;
                _btn1.Execute += new EventHandler(_btn1_Execute);
                _panelButtons.Add(_btn1);

                _btn2          = new HideButton(this);
                _btn2.Label    = _buttonCancel;
                _btn2.MinWidth = 60;
                _btn2.Execute += new EventHandler(_btn2_Execute);
                _panelButtons.Add(_btn2);
                break;
            }

            switch (_defaultButton)
            {
            case MessageBoxDefaultButtonEnum.Button1:
                if (_btn1 != null)
                {
                    _btn1.Focus();
                }
                break;

            case MessageBoxDefaultButtonEnum.Button2:
                if (_btn2 != null)
                {
                    _btn2.Focus();
                }
                break;

            case MessageBoxDefaultButtonEnum.Button3:
                if (_btn3 != null)
                {
                    _btn3.Focus();
                }
                break;

            default:
                break;
            }

            Width               = 300;
            Height              = 150;
            _label              = new qxDotNet.UI.Basic.Label();
            _label.PaddingTop   = 20;
            _label.PaddingLeft  = 10;
            _label.TextAlign    = TextAlignEnum.center;
            _label.AllowShrinkX = false;
            Add(_label, new Map().Add("edge", "center"));
            Modal = true;
        }
Ejemplo n.º 8
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (BottomConstraint != null)
            {
                BottomConstraint.Dispose();
                BottomConstraint = null;
            }

            if (DistanceText != null)
            {
                DistanceText.Dispose();
                DistanceText = null;
            }

            if (EditSelf != null)
            {
                EditSelf.Dispose();
                EditSelf = null;
            }

            if (EditSelfBack != null)
            {
                EditSelfBack.Dispose();
                EditSelfBack = null;
            }

            if (EditSelfHeader != null)
            {
                EditSelfHeader.Dispose();
                EditSelfHeader = null;
            }

            if (EditSpacer != null)
            {
                EditSpacer.Dispose();
                EditSpacer = null;
            }

            if (HeaderBackground != null)
            {
                HeaderBackground.Dispose();
                HeaderBackground = null;
            }

            if (HideButton != null)
            {
                HideButton.Dispose();
                HideButton = null;
            }

            if (LastActiveDate != null)
            {
                LastActiveDate.Dispose();
                LastActiveDate = null;
            }

            if (LikeButton != null)
            {
                LikeButton.Dispose();
                LikeButton = null;
            }

            if (LocationTime != null)
            {
                LocationTime.Dispose();
                LocationTime = null;
            }

            if (MapBottomSeparator != null)
            {
                MapBottomSeparator.Dispose();
                MapBottomSeparator = null;
            }

            if (MapSatellite != null)
            {
                MapSatellite.Dispose();
                MapSatellite = null;
            }

            if (MapStreet != null)
            {
                MapStreet.Dispose();
                MapStreet = null;
            }

            if (MapTopSeparator != null)
            {
                MapTopSeparator.Dispose();
                MapTopSeparator = null;
            }

            if (MenuBlock != null)
            {
                MenuBlock.Dispose();
                MenuBlock = null;
            }

            if (MenuContainer != null)
            {
                MenuContainer.Dispose();
                MenuContainer = null;
            }

            if (MenuIcon != null)
            {
                MenuIcon.Dispose();
                MenuIcon = null;
            }

            if (MenuLayer != null)
            {
                MenuLayer.Dispose();
                MenuLayer = null;
            }

            if (MenuReport != null)
            {
                MenuReport.Dispose();
                MenuReport = null;
            }

            if (Name != null)
            {
                Name.Dispose();
                Name = null;
            }

            if (NavigationSpacer != null)
            {
                NavigationSpacer.Dispose();
                NavigationSpacer = null;
            }

            if (NextButton != null)
            {
                NextButton.Dispose();
                NextButton = null;
            }

            if (PercentProgress != null)
            {
                PercentProgress.Dispose();
                PercentProgress = null;
            }

            if (PreviousButton != null)
            {
                PreviousButton.Dispose();
                PreviousButton = null;
            }

            if (ProfileImageContainer != null)
            {
                ProfileImageContainer.Dispose();
                ProfileImageContainer = null;
            }

            if (ProfileImageScroll != null)
            {
                ProfileImageScroll.Dispose();
                ProfileImageScroll = null;
            }

            if (ProfileViewDescription != null)
            {
                ProfileViewDescription.Dispose();
                ProfileViewDescription = null;
            }

            if (ProfileViewMap != null)
            {
                ProfileViewMap.Dispose();
                ProfileViewMap = null;
            }

            if (ProfileViewScroll != null)
            {
                ProfileViewScroll.Dispose();
                ProfileViewScroll = null;
            }

            if (RegisterDate != null)
            {
                RegisterDate.Dispose();
                RegisterDate = null;
            }

            if (ResponseRate != null)
            {
                ResponseRate.Dispose();
                ResponseRate = null;
            }

            if (RippleImageNext != null)
            {
                RippleImageNext.Dispose();
                RippleImageNext = null;
            }

            if (RippleImagePrev != null)
            {
                RippleImagePrev.Dispose();
                RippleImagePrev = null;
            }

            if (RippleProfileView != null)
            {
                RippleProfileView.Dispose();
                RippleProfileView = null;
            }

            if (RoundBottom != null)
            {
                RoundBottom.Dispose();
                RoundBottom = null;
            }

            if (ScrollBottomConstraint != null)
            {
                ScrollBottomConstraint.Dispose();
                ScrollBottomConstraint = null;
            }

            if (SendLocation != null)
            {
                SendLocation.Dispose();
                SendLocation = null;
            }

            if (Snackbar != null)
            {
                Snackbar.Dispose();
                Snackbar = null;
            }

            if (SnackBottomConstraint != null)
            {
                SnackBottomConstraint.Dispose();
                SnackBottomConstraint = null;
            }

            if (SnackTopConstraint != null)
            {
                SnackTopConstraint.Dispose();
                SnackTopConstraint = null;
            }

            if (Username != null)
            {
                Username.Dispose();
                Username = null;
            }

            if (ViewportConstraint != null)
            {
                ViewportConstraint.Dispose();
                ViewportConstraint = null;
            }
        }