コード例 #1
0
 //Compare password and allow/disallow access
 private void OkButton_Click(object sender, EventArgs e)
 {
     if (Weather.GetPassword(Weather.GetIndexOfUsername(Login.loggedInUser)) == passwordBox.Text)
     {
         allowUser = true;
         this.Close();
     }
     else
     {
         MessageBox.Show("The password you have entered is incorrect.");
     }
 }