123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using PDF_Master.Model;
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Regions;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
- {
- public class HomePageConverterCSVViewModel : BindableBase, INavigationAware
- {
- #region 委托声明
- public DelegateCommand<string> RadioButtonCommand { get; set; }
- public HomePageConverterDialogViewModel homePageConverterDialogViewModel { get; set; }
- #endregion
- public HomePageConverterCSVViewModel()
- {
- RadioButtonCommand = new DelegateCommand<string>(radiobutton);
- }
- #region 逻辑函数
- private void radiobutton(string e)
- {
- string radioButton = e;
- if (radioButton != null)
- {
- switch (radioButton)
- {
- case "ForEachPageRadioBtn":
- homePageConverterDialogViewModel.ConverterCSVModel.Options.IsMergeCsv = false;
- break;
- case "OnlyTableRadioBtn":
- homePageConverterDialogViewModel.ConverterCSVModel.Options.IsMergeCsv = true;
- break;
- default:
- break;
- }
- }
- }
- #endregion
- #region 构架行为
- public void OnNavigatedTo(NavigationContext navigationContext)
- {
- var homePageConverterVM = navigationContext.Parameters[ParameterNames.ViewContentViewModel] as HomePageConverterDialogViewModel;
- if (homePageConverterVM != null)
- {
- homePageConverterDialogViewModel = homePageConverterVM;
- homePageConverterDialogViewModel.ConverterCSVModel.Options.IsMergeCsv = false;
- }
- }
- public bool IsNavigationTarget(NavigationContext navigationContext)
- {
- return true;
- }
- public void OnNavigatedFrom(NavigationContext navigationContext)
- {
- }
- #endregion
- }
- }
|