Пример #1
0
        private void Button_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;

            LoginCancelButton.IsEnabled = false;

            LoginAccountGrid.BeginAnimation(OpacityProperty, da);
        }
Пример #2
0
        private void Login_btn_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            //Log in to the account
            if (Properties.Settings.Default.FirstTime)
            {
                System.Windows.Forms.MessageBox.Show("No Administration account found in this computer. Please use the 'Create a New Account' button to create a new administration account to start working with this software", "No account found", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
            }
            else
            {
                LoginAccountGrid.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();

                LoginCancelButton.IsEnabled = true;

                LoginUserName.Focus();

                LoginAccountGrid.BeginAnimation(OpacityProperty, da);
            }
        }