示例#1
0
 private void materialRaisedButton1_Click(object sender, EventArgs e)
 {
     if (sf.hashData(metroTextBox1.Text) == sf.getStoredUsername() && sf.hashData(metroTextBox2.Text) == sf.getStoredPassword())
     {
         nowCreateNewUserAccount();
     }
     else if (sf.hashData(metroTextBox1.Text) != sf.getStoredUsername())
     {
         MetroMessageBox.Show(this, "Check Username ..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (sf.hashData(metroTextBox2.Text) != sf.getStoredPassword())
     {
         MetroMessageBox.Show(this, "Check Password ..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         MetroMessageBox.Show(this, "Check Username or Password..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#2
0
        private void metroTextBox2_TextChanged(object sender, EventArgs e)
        {
            SavingFeatures sf = new SavingFeatures();

            if (sf.hashData(metroTextBox2.Text) == sf.getStoredPassword())
            {
                metroCheckBox1.Checked = true;
            }
            else
            {
                metroCheckBox1.Checked = false;
            }
        }
示例#3
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            SavingFeatures sf = new SavingFeatures();

            if (sf.hashData(metroTextBox1.Text) == sf.getStoredUsername() && sf.hashData(metroTextBox2.Text) == sf.getStoredPassword())
            {
                this.Hide();
                MainWindow mw = new MainWindow();
                mw.ShowDialog();
            }
            else if (sf.hashData(metroTextBox1.Text) != sf.getStoredUsername())
            {
                MetroMessageBox.Show(this, "Check Username ..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (sf.hashData(metroTextBox2.Text) != sf.getStoredPassword())
            {
                MetroMessageBox.Show(this, "Check Password ..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MetroMessageBox.Show(this, "Check Username or Password..you have entered wrong.", "Wrong entry", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }