コード例 #1
0
        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);
        }
コード例 #2
0
        private void settingsBtn_Click(object sender, RoutedEventArgs e)
        {
            SettingsDlg settingsDlg = new SettingsDlg();

            settingsDlg.Show();
        }
コード例 #3
0
 private void settingsBtn_Click(object sender, RoutedEventArgs e)
 {
     SettingsDlg settingsDlg = new SettingsDlg();
     settingsDlg.Show();
 }
コード例 #4
0
        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);
        }