HomePageConverterExcel.xaml.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using ComPDFKit_Conversion.Options;
  2. using PDF_Office.ViewModels.Dialog.ConverterDialogs;
  3. using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
  4. using System.Windows.Controls;
  5. namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
  6. {
  7. /// <summary>
  8. /// Interaction logic for HomePageConverterExcel
  9. /// </summary>
  10. public partial class HomePageConverterExcel : UserControl
  11. {
  12. public HomePageConverterExcel()
  13. {
  14. InitializeComponent();
  15. }
  16. private void OnlyTableComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  17. {
  18. switch (OnlyTableComboBox.SelectedIndex)
  19. {
  20. case 0:
  21. ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachTable, ContentOptions.OnlyTable);
  22. break;
  23. case 1:
  24. ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachPage, ContentOptions.OnlyTable);
  25. break;
  26. case 2:
  27. ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForTheDocument, ContentOptions.OnlyTable);
  28. break;
  29. default:
  30. break;
  31. }
  32. }
  33. }
  34. }