public void ResetToDefaultValue() { CurrentDuplexType = DuplexPrintType.NonDuplex; IsPortrait = true; needFitToPage = true; IsCopiesValidate = true; scalingValue = 100; }
private void AdvancedSettingButtonClick(object sender, RoutedEventArgs e) { bool?result = null; dll.SetCopies(m_MainWin.statusPanelPage.m_selectedPrinter, (short)spinnerControl1.Value); PrintSettingPage printWin = new PrintSettingPage(); printWin.Owner = App.Current.MainWindow; printWin.m_MainWin = m_MainWin; printWin.m_copies = (short)spinnerControl1.Value; printWin.m_CurrentPrintType = CurrentPrintType; result = printWin.ShowDialog(); if (result == true) { needFitToPage = (bool)printWin.chk_FitToPaperSize.IsChecked; IsPortrait = (bool)printWin.rdBtnPortrait.IsChecked; spinnerControl1.Value = (short)printWin.m_copies; scalingValue = (int)printWin.spinnerScaling.Value; if (printWin.chk_DuplexPrint.IsChecked == true) { if (printWin.rdBtnFlipOnShortEdger.IsChecked == true) { CurrentDuplexType = DuplexPrintType.FlipOnShortEdge; } else { CurrentDuplexType = DuplexPrintType.FlipOnLongEdge; } } else { CurrentDuplexType = DuplexPrintType.NonDuplex; } } }