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
{
///
/// Interaction logic for PrinterDialog
///
public partial class HomePagePrinterDialog : UserControl
{
private IContainerProvider containerProvider;
public HomePagePrinterDialog(IContainerProvider containerProvider)
{
InitializeComponent();
this.containerProvider = containerProvider;
var regionManager = containerProvider.Resolve();
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;
}
}
}
}