Ejemplo n.º 1
0
        private void viewProgressToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            ProgressFrom form = new ProgressFrom
            {
                StartPosition = FormStartPosition.CenterScreen
            };

            form.Show();
            Cursor.Current = Cursors.Default;
        }
Ejemplo n.º 2
0
        private void Enter_button_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (Username_textBox.Text != "" && Password_textBox.Text != "")
            {
                if (UserVerifications.VerifyPassword(Username_textBox.Text, Password_textBox.Text))
                {
                    if (UserVerifications.Admin)
                    {
                        SchoolManagementSystem smsForm =
                            new SchoolManagementSystem(this, UserVerifications.GetUserName(Username_textBox.Text));
                        smsForm.Show();

//                var form = new AddForm(AddForm.AddOperationMode.AddTeacher);
//                form.Show();
                    }
                    else
                    {
                        ProgressFrom progress = new ProgressFrom(false, this);
                        progress.Show();
                    }

                    Hide();

                    Username_textBox.Clear();
                    Password_textBox.Clear();
                }
                else
                {
                    MessageBox.Show(UserVerifications.ObtainTextOfError(Username_textBox.Text));
                    Password_textBox.Clear();
                }
            }

            Cursor.Current = Cursors.Default;
        }