Esempio n. 1
0
        private void Staff_btn_Click(object sender, RoutedEventArgs e)
        {
            StaffOnly StaffOnly = new StaffOnly();

            StaffOnly.Owner = this;
            StaffOnly.Show();
            StaffOnly.Closed += (s, eventarg) =>
            {
                this.Activate();
            };
        }
Esempio n. 2
0
        private void btnEnter_Click_1(object sender, RoutedEventArgs e)
        {
            User newUser = new User {
                Name = UserNameTextBox.Text, Password = Sha256Tools.GetHash(PasswordTextBox.Password)
            };

            if (Authentify(newUser))
            {
                StaffOnly staffOnly = new StaffOnly();
                staffOnly.Show();
                this.Close();
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("Username or password invalid", "User issue!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }