private void backToHomepage_Click(object sender, EventArgs e)
        {
            Homepage backToHomepage = new Homepage();

            this.Hide();
            backToHomepage.Show();
        }
Пример #2
0
        private void LoginButton_Click(object sender, EventArgs e)
        {
            var user = SQLiteDatabaseAccess.GetUser(usernameTextbox.Text, passwordTextbox.Text);

            if (user != null)
            {
                SQLiteDatabaseAccess.LoadUser(user);

                Homepage homepage = new Homepage();
                homepage.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Failed to login", "Failed", MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
            }
        }