internal FormOptions(ConfigurationOptions configurationOptions) { if (configurationOptions == null) { //throw new ArgumentNullException(nameof(configurationOptions)); _configurationOptions2 = new ConfigurationOptions(); } else { _configurationOptions2 = configurationOptions; } InitializeComponent(); checkBoxOption1.Checked = ConfigurationOptions2.Option1Name; checkBoxOption2.Checked = ConfigurationOptions2.Option2Name; }
private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { FormOptions frmOptions = new FormOptions(_configurationOptions); if (frmOptions.ShowDialog() == DialogResult.OK) { _configurationOptions = frmOptions.ConfigurationOptions2; } }