/// <summary> /// Shows advanced settings window. /// </summary> /// <param name="owner">owner</param> public void ShowAdvancedSettings(Window owner) { try { // get chosen printer by color setting Printer pr = GetChosenPrinterWithSettings(PrintWithColor); if (pr == null) { return; } UISettingsExtractor extractor = new UISettingsExtractor(ChosenPrinter.Name, DesktopHelper.GetDesktopWindow()); extractor.Start(); MainController.Singleton.ShowAdvancedPrinterSettings(new WindowInteropHelper(owner).Handle, ChosenPrinter.Name, ref PrinterSettings); extractor.Stop(); PrintBooklet = extractor.Booklet; LogHelper.LogDebug(PrintBooklet); pr.Settings = PrinterSettings; SetByPrinterSettings(); } catch (Exception ex) { WPFNotifier.DebugError(ex); } }
/// <summary> /// Shows advanced settings window. /// </summary> /// <param name="owner">owner</param> public void ShowAdvancedSettings(Window owner) { if (IsBlockedMode) { return; } try { // get chosen printer by color setting Printer pr = GetChosenPrinterWithSettings(PrintWithColor); if (pr == null) { return; } // initialize settings extractor UISettingsExtractor extractor = new UISettingsExtractor(ChosenPrinter.Name, DesktopHelper.GetDesktopWindow()); // start extractor extractor.Start(); // show advanced printer settings MainController.Singleton.ShowAdvancedPrinterSettings(new WindowInteropHelper(owner).Handle, ChosenPrinter.Name, ref PrinterSettings); // stop extractor extractor.Stop(); // get booklet data from extractor PrintBooklet = extractor.Booklet; LogHelper.LogDebug(PrintBooklet); // set changed printer settings pr.Settings = PrinterSettings; // set UI data by printer settings SetByPrinterSettings(); } catch (Exception ex) { WPFNotifier.Error(ex); } }