コード例 #1
0
 private void DisplayDisappearMessage()
 {
     disappearMessage.Content = Texts.DisappearMessage;
     RoundProgressbar.FadeControlToOpacity(disappearMessage, 1);
     progressBar.AnimateCircleAngle(100, 0, Core.FinalScreenShowTime, false, false);
     StartDisappearTimer();
 }
コード例 #2
0
        private void DisplayResult(int returnValue)
        {
            //Password error scheme
            //Code 1 = User not found
            //Code 2 = Reset limit exceeded
            //Code 3 = Success
            //Code 4 = Unknown error
            //Code 5 = Account is disabled

            //Red = Software error
            //Orange = User error
            //Green = ~Success!

            switch (returnValue)
            {
            case 1:     //User not found (sad)
                progressBar.AnimateCircleColor(Colors.Red, 300);
                progressBar.face.EmotionState = Controls.State.Sad;
                resultLabel.Content           = Texts.UserNotFoundMessage;
                resultLabel.Foreground        = Brushes.Red;
                RoundProgressbar.FadeControlToOpacity(resultLabel, 1);
                break;

            case 2:     //Reset limit exceeded (neutral)
                progressBar.AnimateCircleColor(Colors.Orange, 300);
                progressBar.face.EmotionState = Controls.State.Neutral;
                resultLabel.Content           = Texts.ExceededLimitFailMessage;
                resultLabel.Foreground        = Brushes.Orange;
                RoundProgressbar.FadeControlToOpacity(resultLabel, 1);
                break;

            case 3:     //Succesful (happy)
                progressBar.AnimateCircleColor(Colors.Green, 300);
                progressBar.face.EmotionState = Controls.State.Happy;
                resultLabel.Content           = Texts.SuccessMessage;
                resultLabel.Foreground        = Brushes.Green;
                RoundProgressbar.FadeControlToOpacity(resultLabel, 1);
                break;

            case 4:     // No internet connection
                progressBar.AnimateCircleColor(Colors.Red, 300);
                progressBar.face.EmotionState = Controls.State.Sad;
                resultLabel.Content           = Texts.NoConnectErrorMessage;
                resultLabel.Foreground        = Brushes.Red;
                RoundProgressbar.FadeControlToOpacity(resultLabel, 1);
                break;

            case 5:     // Account disabled
                progressBar.AnimateCircleColor(Colors.Orange, 300);
                progressBar.face.EmotionState = Controls.State.Neutral;
                resultLabel.Content           = Texts.AccountDisabledMessage;
                resultLabel.Foreground        = Brushes.Orange;
                RoundProgressbar.FadeControlToOpacity(resultLabel, 1);
                break;
            }
            //Exit screen animation
            DisplayDisappearMessage();
        }
コード例 #3
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            grid.Opacity = 0;
            RoundProgressbar.FadeControlToOpacity(grid, 1);
            OriginalBackgroundColor = Window.GetWindow(this).Background;
            ScreenSafetyRefresh();

            while (true)
            {
                if (!InputBox.IsFocused)
                {
                    InputBox.Focus();
                }

                await Task.Delay(500);
            }
        }
コード例 #4
0
 private void Page_Loaded(object sender, RoutedEventArgs e)
 {
     grid.Opacity = 0;
     RoundProgressbar.FadeControlToOpacity(grid, 1);
     ProcessRequest(Input);
 }