예제 #1
0
 private void BtnConfirm_Click(object sender, EventArgs e)
 {
     errorProvider1.SetError(BtnConfirm, "");
     if (loginMap.ContainsValue(textBox1.Text))
     {
         foreach (KeyValuePair <string, string> keyValue in loginMap)
         {
             if (keyValue.Value.Equals(textBox1.Text))
             {
                 loginMap.Remove(keyValue.Key);
                 loginMap.Add(textBox2.Text, keyValue.Value);
                 break;
             }
         }
         startForm.Show();
         this.Close();
     }
     else
     {
         errorProvider1.SetError(BtnConfirm, "Incorrect login, try again!");
     }
 }
예제 #2
0
 private void BtnBack_Click(object sender, EventArgs e)
 {
     startForm.Show();
     this.Close();
 }