/// <summary> /// Populates the selected profile and closes the form /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOK_Click(object sender, EventArgs e) { // Make sure they have selected a profile if (cboProfile.Text.Equals("")) { MessageBox.Show("Please select a valid profile", "Select Profile", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } // Set the selected profile this._objSelectedProfile = UserProfiles.GetProfileByName(cboProfile.Text); // Set the reporting action if (radSpam.Checked == true) { this._enumAction = SGGlobals.ReportAction.ReportSpam; } else { this._enumAction = SGGlobals.ReportAction.ReportHam; } // Set dialog result this.DialogResult = DialogResult.OK; // Close the form this.Close(); }