protected override void OnInitializeTask() { CloseDocuments(); _logReport = new StringBuilder(); _projectInfo = Project.GetProjectInfo(); _segmentBuilder = new SegmentBuilder(); _pathInfo = new PathInfo(); _customerProvider = new CustomerProvider(); _imageService = new ImageService(); _reportService = new ReportService(); _projectSettingsService = new ProjectSettingsService(); _exportSettings = GetSetting <XliffManagerExportSettings>(); if (_exportSettings.ExportOptions == null) { CreateDefaultContext(); } _isError = false; _xliffManagerController = GetXliffManagerController(); CreateWizardContext(); WriteLogReportHeader(); SubscribeToWindowClosing(); _logReport.AppendLine(); _logReport.AppendLine("Phase: Export - Started " + FormatDateTime(DateTime.UtcNow)); base.OnInitializeTask(); }
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); }