Beispiel #1
0
        private void SignIn(object sender, RoutedEventArgs e)
        {
            try {
                _imgurhelper.Authorize();

                DoubleAnimation fadeBtnOut = Animations.FadeOut;
                fadeBtnOut.Completed += delegate {
                    DoubleAnimation fadePanelIn = Animations.FadeIn;
                    fadePanelIn.Completed += delegate { Btn_SignIn.Visibility = Visibility.Collapsed; };
                    Panel_PIN.Visibility   = Visibility.Visible;
                    Panel_PIN.BeginAnimation(OpacityProperty, fadePanelIn);
                };
                Btn_SignIn.BeginAnimation(OpacityProperty, fadeBtnOut);
            } catch { }
        }
Beispiel #2
0
        private void SignOut(object sender, RoutedEventArgs e)
        {
            DoubleAnimation fadeBtnOut = _fadeOut;

            fadeBtnOut.Completed += delegate {
                FileIO.DeleteToken();

                DoubleAnimation fadeBtnIn = _fadeIn;
                fadeBtnIn.Completed += delegate {
                    Btn_SignOut.Visibility = Visibility.Collapsed;

                    Label_Account.Content = "Imgur Account";
                };
                Btn_SignIn.Visibility = Visibility.Visible;
                Btn_SignIn.BeginAnimation(StackPanel.OpacityProperty, fadeBtnIn);
            };
            Btn_SignOut.BeginAnimation(Button.OpacityProperty, fadeBtnOut);
        }