Esempio n. 1
0
        private void btn_user_login_Click(object sender, EventArgs e)
        {
            string username = txt_user_name.Text.Trim();
            string password = txt_user_password.Text.Trim();

            string existUsername = function.getSingleData("username", "testuser", username);

            if (existUsername == username)
            {
                string existPassword = function.getSingleData("userpassword", "testuser", function.EncodeSHA1(password));
                if (existPassword == function.EncodeSHA1(password))
                {
                    //MessageBox.Show("Login successfully");
                    Hide();
                    StartForm startForm = new StartForm();
                    startForm.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Password isn't correct. Please try again.");
                }
            }
            else
            {
                MessageBox.Show("Username isn't correct. Please try again.");
            }
        }
Esempio n. 2
0
        private void TestDropboxAPIForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            StartForm startForm = new StartForm();

            startForm.Show();
        }