123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Microsoft.Office.Interop.Excel;
- using PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter;
- using Prism.Ioc;
- using Prism.Regions;
- using System.Windows.Controls;
- using UserControl = System.Windows.Controls.UserControl;
- namespace PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter
- {
- /// <summary>
- /// Interaction logic for PrinterDialog
- /// </summary>
- public partial class HomePagePrinterDialog : UserControl
- {
- private IContainerProvider containerProvider;
- public HomePagePrinterDialog(IContainerProvider containerProvider)
- {
- InitializeComponent();
- this.containerProvider = containerProvider;
- var regionManager = containerProvider.Resolve<IRegionManager>();
- RegionManager.SetRegionManager(this, regionManager);
- RegionManager.UpdateRegions();
- }
- private void PageRangeComboBox_Loaded(object sender, System.Windows.RoutedEventArgs e)
- {
- if (((HomePagePrinterDialogViewModel)this.DataContext).isCurrentPage)
- {
- PageRangeComboBox.CurrentPage = true;
- if (PageRangeComboBox.CurrentPage)
- {
- ComboBoxItem comboBoxItem = new ComboBoxItem();
- comboBoxItem.Content = "当前页面";
- PageRangeComboBox.writableComboBox.Items.Insert(1, comboBoxItem);
- }
- if (!string.IsNullOrEmpty( ((HomePagePrinterDialogViewModel)this.DataContext).PageListString))
- PageRangeComboBox.writableTextBox.Text = ((HomePagePrinterDialogViewModel)this.DataContext).PageListString;
- }
- }
- }
- }
|