HomePageBatchProcessingDialog.xaml.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using PDF_Office.Model.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
  2. using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs;
  3. using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing;
  4. using Prism.Ioc;
  5. using Prism.Regions;
  6. using System.Windows.Controls;
  7. namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing
  8. {
  9. /// <summary>
  10. /// Interaction logic for HomePageBatchProcessingDialog
  11. /// </summary>
  12. public partial class HomePageBatchProcessingDialog : UserControl
  13. {
  14. private IContainerProvider containerProvider;
  15. public HomePageBatchProcessingDialog(IContainerProvider containerProvider)
  16. {
  17. InitializeComponent();
  18. this.containerProvider = containerProvider;
  19. var regionManager = containerProvider.Resolve<IRegionManager>();
  20. RegionManager.SetRegionManager(this, regionManager);
  21. RegionManager.UpdateRegions();
  22. SetPathVisibility(HomePageBatchProcessingDialogModel.BatchProcessingIndex);
  23. }
  24. public void SetPathVisibility(int index)
  25. {
  26. switch (index)
  27. {
  28. case 0:
  29. this.ShiftingBtn.IsChecked=true;
  30. break;
  31. case 1:
  32. this.CompressBtn.IsChecked = true;
  33. break;
  34. case 2:
  35. this.SecurityBtn.IsChecked = true;
  36. break;
  37. case 3:
  38. this.WatermarkBtn.IsChecked = true;
  39. break;
  40. case 4:
  41. this.BackgroundBtn.IsChecked = true;
  42. break;
  43. case 5:
  44. this.HeaderFooterBtn.IsChecked = true;
  45. break;
  46. case 6:
  47. this.BatesBtn.IsChecked = true;
  48. break;
  49. case 7:
  50. this.RemoveSecurityBtn.IsChecked = true;
  51. break;
  52. }
  53. }
  54. }
  55. }