private void ScanPreferences_Button_Click(object sender, EventArgs e) { using (var scanOptionsForm = new ScanOptionsForm(_scanOptions)) { if (scanOptionsForm.ShowDialog() == DialogResult.OK) { _scanOptions = scanOptionsForm.ScanOption; } } }
private void FaxOptions_Button_Click(object sender, EventArgs e) { _faxOptions.ScanJobType = "ScanToFax"; using (var scanOptionsForm = new ScanOptionsForm(_faxOptions)) { if (scanOptionsForm.ShowDialog() == DialogResult.OK) { _faxOptions = scanOptionsForm.ScanOption; } } }