private void okButton_Click(object sender, EventArgs e) { result = ServiceInstallerDialogResult.OK; if (passwordEdit.Text == confirmPassword.Text) { DialogResult = DialogResult.OK; } else { MessageBoxOptions options = (MessageBoxOptions)0; Control current = this; while (current.RightToLeft == RightToLeft.Inherit) { current = current.Parent; } if (current.RightToLeft == RightToLeft.Yes) { options = MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign; } DialogResult = DialogResult.None; MessageBox.Show(Res.GetString(Res.Label_MissmatchedPasswords), Res.GetString(Res.Label_SetServiceLogin), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, options); passwordEdit.Text = string.Empty; confirmPassword.Text = string.Empty; passwordEdit.Focus(); } // Consider, V2, jruiz: check to make sure the password is correct for the given account. }
private void okButton_Click(object sender, EventArgs e) { this.result = ServiceInstallerDialogResult.OK; if (this.passwordEdit.Text == this.confirmPassword.Text) { base.DialogResult = DialogResult.OK; } else { MessageBoxOptions options = 0; Control parent = this; while (parent.RightToLeft == RightToLeft.Inherit) { parent = parent.Parent; } if (parent.RightToLeft == RightToLeft.Yes) { options = MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign; } base.DialogResult = DialogResult.None; MessageBox.Show(Res.GetString("Label_MissmatchedPasswords"), Res.GetString("Label_SetServiceLogin"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, options); this.passwordEdit.Text = string.Empty; this.confirmPassword.Text = string.Empty; this.passwordEdit.Focus(); } }
private void okButton_Click(object sender, EventArgs e) { result = ServiceInstallerDialogResult.OK; if (passwordEdit.Text == confirmPassword.Text) { DialogResult = DialogResult.OK; } else { DialogResult = DialogResult.None; MessageBox.Show(Res.GetString(Res.Label_MissmatchedPasswords), Res.GetString(Res.Label_SetServiceLogin), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); passwordEdit.Text = string.Empty; confirmPassword.Text = string.Empty; passwordEdit.Focus(); } // Consider, V2, jruiz: check to make sure the password is correct for the given account. }
private void cancelButton_Click(object sender, EventArgs e) { result = ServiceInstallerDialogResult.Canceled; DialogResult = DialogResult.Cancel; }
private void cancelButton_Click(object sender, EventArgs e) { this.result = ServiceInstallerDialogResult.Canceled; base.DialogResult = DialogResult.Cancel; }