예제 #1
0
        private void logonButton_Click(object sender, EventArgs e)
        {
            //generic username/password for entry
            if (usernameTextBox.Text == username && passwordTextBox.Text == password)
            {
                HomeScreen homeScreenForm = new HomeScreen();

                this.Hide();
                homeScreenForm.Show();
            }
            else
            {
                MessageBox.Show("Wrong username or password entered");
            }
        }
        private void returnToPrevious()
        {
            if (Program.fromHomeScreen)
            {
                //resets bool
                Program.fromHomeScreen = false;

                HomeScreen homeScreen = new HomeScreen();

                homeScreen.Show();
                this.Hide();
            }
            else
            {
                InventoryScreen inventoryScreen = new InventoryScreen();

                this.Hide();
                inventoryScreen.Show();
            }
        }