private void SettingBtnClick(object sender, RoutedEventArgs e) { ScanSetting win = new ScanSetting(); win.m_docutype = m_docutype; win.m_scanResln = m_scanResln; win.m_paperSize = m_paperSize; win.m_color = m_color; win.m_brightness = m_brightness; win.m_contrast = m_contrast; win.Owner = m_MainWin; if (true == win.ShowDialog()) { m_docutype = win.m_docutype; m_scanResln = win.m_scanResln; m_paperSize = win.m_paperSize; m_color = win.m_color; m_brightness = win.m_brightness; m_contrast = win.m_contrast; txtBlkImgSize.Text = FormatSize(GetScanSize()); } }
private void combo_sel_change(object sender, SelectionChangedEventArgs e) { ComboBoxItem selItem = cboScanResln.SelectedItem as ComboBoxItem; if (null != selItem && null != selItem.DataContext) { m_scanResln = (EnumScanResln)selItem.DataContext; } }
private void btnDefault_Click(object sender, RoutedEventArgs e) { m_docutype = EnumScanDocType.Photo; m_scanResln = EnumScanResln._300x300; m_paperSize = EnumPaperSizeScan._A4; m_color = EnumColorType.color_24bit; m_brightness = 50; m_contrast = 50; InitControls(); InitScanResln(); InitScanSize(); }
public void ResetToDefaultValue() { m_docutype = EnumScanDocType.Photo; m_scanResln = EnumScanResln._300x300; m_paperSize = EnumPaperSizeScan._A4; m_color = EnumColorType.color_24bit; m_brightness = 50; m_contrast = 50; strInitalDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); btnPrint.IsEnabled = false; btnSave.IsEnabled = false; btnCancel.IsEnabled = false; btnSetting.IsEnabled = true; btnScan.IsEnabled = (false == common.IsOffline(m_currentStatus) && false == m_isScanning); //Configure the ProgressBar progressBar1.Minimum = 0; progressBar1.Maximum = 100; progressBar1.Value = 0; txtBlkImgSize.Text = FormatSize(GetScanSize()); }