Ejemplo n.º 1
0
 private void buttonStartPlayer_Click(object sender, EventArgs e) {
     if (!isPasswordProtected()) {
         callPlayer();
     } else {
         CheckPassword checkPassword = new CheckPassword();
         checkPassword.ShowDialog();
         if (checkPassword.Result == Result.OK) {
             callPlayer();
         }
         if (checkPassword.Result == Result.Wrong) {
             MessageBox.Show("Password wrong");
         }
     }
 }
Ejemplo n.º 2
0
 private void PartyMusic_FormClosing(object sender, FormClosingEventArgs e) {
     if (isPasswordProtected()) {
         CheckPassword checkPassword = new CheckPassword();
         checkPassword.ShowDialog();
         if ((checkPassword.Result == Result.Wrong) || (checkPassword.Result == Result.Cancle)) {
             if (checkPassword.Result == Result.Wrong) {
                 MessageBox.Show("Password wrong");
             }
             e.Cancel = true;
         }
     }
 }