HomePageConverterImg.xaml.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using ComPDFKit_Conversion.Converter;
  2. using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
  3. using System.Diagnostics;
  4. using System.Windows.Controls;
  5. namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
  6. {
  7. /// <summary>
  8. /// Interaction logic for HomePageConverterImg
  9. /// </summary>
  10. public partial class HomePageConverterImg : UserControl
  11. {
  12. public HomePageConverterImg()
  13. {
  14. InitializeComponent();
  15. }
  16. private void ImageTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  17. {
  18. if (((HomePageConverterImgViewModel)this.DataContext).homePageConverterDialogViewModel==null)
  19. return;
  20. ((HomePageConverterImgViewModel)this.DataContext).UpdateImageType(ImageTypeComboBox.SelectedIndex);
  21. }
  22. private void ImageDPIComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  23. {
  24. switch (ImageDPIComboBox.SelectedIndex)
  25. {
  26. case 0:
  27. Trace.WriteLine("50");
  28. break;
  29. case 1:
  30. Trace.WriteLine("72");
  31. break;
  32. case 2:
  33. Trace.WriteLine("96");
  34. break;
  35. case 3:
  36. Trace.WriteLine("150");
  37. break;
  38. case 4:
  39. Trace.WriteLine("300");
  40. break;
  41. case 5:
  42. Trace.WriteLine("600");
  43. break;
  44. default:
  45. break;
  46. }
  47. }
  48. }
  49. }