Ejemplo n.º 1
0
        private void CreateAccount_btn_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (CreateAccount_btn.IsEnabled)
            {
                //Create a new account
                if (!Properties.Settings.Default.FirstTime)
                {
                    System.Windows.Forms.MessageBox.Show("PCC Student Database System does not allow you to configure multiple accounts on the same computer / server. Please use the 'Login' option to log in to your current account. If you're having problems signing to your account, please contact the Ultra Admin from the link given in the bottom right corner.", "Does not allow multiple accounts", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
                }
                else
                {
                    CreateAccountGrid.Margin = new Thickness(405, 0, 0, 0);

                    DoubleAnimation da = new DoubleAnimation();
                    da.From           = 0;
                    da.To             = 1;
                    da.Duration       = TimeSpan.FromSeconds(1);
                    da.EasingFunction = new QuinticEase();

                    SignUpCancelButton.IsEnabled = true;

                    CreateUserName.Focus();

                    CreateAccountGrid.BeginAnimation(OpacityProperty, da);
                }
            }
        }
Ejemplo n.º 2
0
        private void SignUpCancelButton_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            DoubleAnimation da = new DoubleAnimation();

            da.From           = 1;
            da.To             = 0;
            da.Duration       = TimeSpan.FromSeconds(1);
            da.EasingFunction = new QuinticEase();
            da.Completed     += Da_Completed;

            SignUpCancelButton.IsEnabled = false;

            CreateAccountGrid.BeginAnimation(OpacityProperty, da);
        }