private void saveSettings() { SettingsDlg settingsdlg = new SettingsDlg(); scanSettings _scanSettings = new scanSettings(); _scanSettings.bpp = (int)parseSettings("Bpp"); _scanSettings.colorMode = (int)parseSettings("Color Mode"); _scanSettings.brightness = (int)parseSettings("Brightness"); _scanSettings.contrast = (int)parseSettings("Contrast"); if (dpiTxt.Text != "") { _scanSettings.dpi = Convert.ToInt32(dpiTxt.Text); } string[] allSettings = { "Bpp: " + _scanSettings.bpp, "Brightness: " + _scanSettings.brightness, "Color Mode: " + _scanSettings.colorMode, "Contrast: " + _scanSettings.contrast, "DPI: " + _scanSettings.dpi }; System.IO.File.WriteAllLines(ScannerSettings, allSettings); }
private void settingsBtn_Click(object sender, RoutedEventArgs e) { SettingsDlg settingsDlg = new SettingsDlg(); settingsDlg.Show(); }
private void saveSettings() { SettingsDlg settingsdlg = new SettingsDlg(); scanSettings _scanSettings = new scanSettings(); _scanSettings.bpp = (int)parseSettings("Bpp"); _scanSettings.colorMode = (int)parseSettings("Color Mode"); _scanSettings.brightness = (int)parseSettings("Brightness"); _scanSettings.contrast = (int)parseSettings("Contrast"); if (dpiTxt.Text != "") { _scanSettings.dpi = Convert.ToInt32(dpiTxt.Text); } string[] allSettings = {"Bpp: " + _scanSettings.bpp ,"Brightness: " + _scanSettings.brightness, "Color Mode: " + _scanSettings.colorMode, "Contrast: " + _scanSettings.contrast, "DPI: " + _scanSettings.dpi}; System.IO.File.WriteAllLines(ScannerSettings, allSettings); }