PageRangeDialog.xaml.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using ComPDFKit.PDFDocument;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Runtime.CompilerServices;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows;
  11. using System.Windows.Controls;
  12. using System.Windows.Data;
  13. using System.Windows.Documents;
  14. using System.Windows.Input;
  15. using System.Windows.Media;
  16. using System.Windows.Media.Imaging;
  17. using System.Windows.Shapes;
  18. namespace Compdfkit_Tools.PDFControl
  19. {
  20. /// <summary>
  21. /// Interaction logic for PageRangeDialog.xaml
  22. /// </summary>
  23. public partial class PageRangeDialog : Window
  24. {
  25. private List<int> _pageIndexList = new List<int>();
  26. public List<int> PageIndexList
  27. {
  28. get => _pageIndexList;
  29. set
  30. {
  31. _pageIndexList = value;
  32. PreviewControl.PageRangeList = _pageIndexList;
  33. }
  34. }
  35. private FileInfoWithRange fileInfo;
  36. public PageRangeDialog()
  37. {
  38. this.DataContext = this;
  39. InitializeComponent();
  40. }
  41. public void InitWithFileInfo(FileInfoWithRange fileInfo)
  42. {
  43. this.fileInfo = fileInfo;
  44. }
  45. private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
  46. {
  47. }
  48. private void CancelBtn_Click(object sender, RoutedEventArgs e)
  49. {
  50. }
  51. private void Window_Loaded(object sender, RoutedEventArgs e)
  52. {
  53. PreviewControl.InitPreview(fileInfo.Document, fileInfo.PageRangeList);
  54. }
  55. }
  56. }