Пример #1
0
 private void LoginComboBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         PasswordComboBox.Focus();
     }
 }
Пример #2
0
 private void LogInButton_Click(object sender, EventArgs e)
 {
     if (AccessToScaning(Convert.ToInt32(LoginComboBox.SelectedValue), PasswordComboBox.Text) == 0)
     {
         PasswordComboBox.ResetText();
         return;
     }
     UserID               = Convert.ToInt32(LoginComboBox.SelectedValue);
     PressOK              = true;
     FormEvent            = eClose;
     AnimateTimer.Enabled = true;
 }
Пример #3
0
        private void LogInButton_Click(object sender, EventArgs e)
        {
            if (Security.Enter(Convert.ToInt32(LoginComboBox.SelectedValue), PasswordComboBox.Text) == 0)
            {
                PasswordComboBox.ResetText();
                return;
            }

            if (Security.Enter(Convert.ToInt32(LoginComboBox.SelectedValue), PasswordComboBox.Text) == -1)
            {
                DialogResult result = MessageBox.Show("Хотите закрыть уже запущенную версию Инфиниума?", "Закрытие", MessageBoxButtons.YesNoCancel);
                if (result == DialogResult.Yes)
                {
                    Security.SetForciblyOffline(Convert.ToInt32(LoginComboBox.SelectedValue), true);
                    MessageBox.Show("Подождите 5 секунд и нажмите Войти заново", "Вход");
                    //LogInButton.Enabled = false;
                    return;
                }
                else
                {
                    NoAccessPanel.Visible = true;
                    PasswordComboBox.ResetText();
                    return;
                }
            }

            Security.SetCurrentUserLogin(Convert.ToInt32(LoginComboBox.SelectedValue));

            Security.CreateJournalRecord();

            Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); });

            T.Start();

            while (!SplashForm.bCreated)
            {
                ;
            }

            LightStartForm LightStartForm = new LightStartForm(this);

            LightStartForm.Show();
        }
Пример #4
0
 private void LoginComboBox_SelectionChanged(object sender, EventArgs e)
 {
     PasswordComboBox.Focus();
 }