HomePageConverterCSVViewModel.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using PDF_Office.Model;
  2. using Prism.Commands;
  3. using Prism.Mvvm;
  4. using Prism.Regions;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
  9. {
  10. public class HomePageConverterCSVViewModel : BindableBase, INavigationAware
  11. {
  12. #region 委托声明
  13. public DelegateCommand<string> RadioButtonCommand { get; set; }
  14. public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
  15. #endregion
  16. public HomePageConverterCSVViewModel()
  17. {
  18. RadioButtonCommand = new DelegateCommand<string>(radiobutton);
  19. }
  20. #region 逻辑函数
  21. private void radiobutton(string e)
  22. {
  23. string radioButton = e;
  24. if (radioButton != null)
  25. {
  26. switch (radioButton)
  27. {
  28. case "ForEachPageRadioBtn":
  29. break;
  30. case "OnlyTableRadioBtn":
  31. break;
  32. default:
  33. break;
  34. }
  35. }
  36. }
  37. #endregion
  38. #region 构架行为
  39. public void OnNavigatedTo(NavigationContext navigationContext)
  40. {
  41. var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
  42. if (homePageConverterVM != null)
  43. {
  44. homePageConverterDialogViewModel = homePageConverterVM;
  45. }
  46. }
  47. public bool IsNavigationTarget(NavigationContext navigationContext)
  48. {
  49. return true;
  50. }
  51. public void OnNavigatedFrom(NavigationContext navigationContext)
  52. {
  53. }
  54. #endregion
  55. }
  56. }