public WizardPageExportOptionsViewModel(Window owner, object view, WizardContext wizardContext, IDialogService dialogService) : base(owner, view, wizardContext) { _dialogService = dialogService; XLIFFSupportItems = Enumerators.GetXLIFFSupportItems(); SelectedXliffSupportItem = XLIFFSupportItems.FirstOrDefault(a => a.SupportType == WizardContext.ExportOptions.XliffSupport); OutputFolder = WizardContext.TransactionFolder; CopySourceToTarget = wizardContext.ExportOptions.CopySourceToTarget; IncludeTranslations = wizardContext.ExportOptions.IncludeTranslations; FilterItems = new List <FilterItem>(Enumerators.GetFilterItems()); SelectedExcludeFilterItems = new ObservableCollection <FilterItem>(Enumerators.GetFilterItems(FilterItems, WizardContext.ExportOptions.ExcludeFilterIds)); LoadPage += OnLoadPage; LeavePage += OnLeavePage; }
public ExportOptionsViewModel(XliffManagerExportSettings exportSettings, IDialogService dialogService) { _dialogService = dialogService; if (exportSettings.ExportOptions == null) { exportSettings.ExportOptions = new ExportOptions(); } XLIFFSupportItems = Enumerators.GetXLIFFSupportItems(); SelectedXliffSupportItem = XLIFFSupportItems.FirstOrDefault(a => a.SupportType == exportSettings.ExportOptions.XliffSupport); OutputFolder = exportSettings.TransactionFolder; CopySourceToTarget = exportSettings.ExportOptions.CopySourceToTarget; IncludeTranslations = exportSettings.ExportOptions.IncludeTranslations; InitializeFilterItems(exportSettings.ExportOptions.ExcludeFilterIds); }