Exemplo n.º 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 { }
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        private void Init()
        {
            BackgroundColor          = Constants.BackgroundColor;
            Lbl_Username.TextColor   = Constants.MainTextColor;
            Lbl_Username.FontSize    = 20;
            Lbl_Password.FontSize    = 20;
            Lbl_Password.TextColor   = Constants.MainTextColor;
            Entry_Username.TextColor = Constants.MainTextColor;
            Entry_Password.TextColor = Constants.MainTextColor;
            //Btn_SignIn.BackgroundColor = Constants.ButtonColor;
            //Btn_SignIn.TextColor = Constants.ButtonTextColor;


            Icon.HeightRequest = Constants.LoginIconHeight;
            //App.StartCheckIfInternet(lbl_NoInternet, this);
            Entry_Username.Completed += (s, e) => Entry_Password.Focus();
            //Entry_Password.Completed += (s, e) => SignInProcedure(s, e);
            Entry_Password.Completed += (s, e) => Btn_SignIn.Focus();
        }