예제 #1
0
        protected override void Initialize()
        {
            _editorController     = SdlTradosStudio.Application.GetController <EditorController>();
            _projectsController   = SdlTradosStudio.Application.GetController <ProjectsController>();
            _studioVersionService = new StudioVersionService();

            var commonService         = new ProjectFileService();
            var projectHelper         = new ProjectService(_projectsController, _studioVersionService);
            var analysisBands         = projectHelper.GetAnalysisBands(_projectsController.CurrentProject ?? _projectsController.SelectedProjects.FirstOrDefault());
            var filterItemService     = new FilterItemService(analysisBands);
            var sdlxliffMerger        = new SdlxliffMerger();
            var segmentBuilder        = new SegmentBuilder();
            var segmentVisitor        = new SegmentVisitor();
            var paragraphUnitProvider = new ParagraphUnitProvider(segmentVisitor, filterItemService);
            var sdlxliffExporter      = new SdlxliffExporter(segmentBuilder);
            var sdlXliffReader        = new SdlxliffReader();
            var displayFilter         = new DisplayFilter();

            var model = new StudioViewsEditorViewModel(_editorController, filterItemService,
                                                       commonService, sdlxliffMerger, sdlxliffExporter, sdlXliffReader, paragraphUnitProvider, displayFilter);

            _control = new StudioViewsEditorView {
                DataContext = model
            };
        }
예제 #2
0
        protected override void Initialize()
        {
            _editorController   = SdlTradosStudio.Application.GetController <EditorController>();
            _projectsController = SdlTradosStudio.Application.GetController <ProjectsController>();

            var commonService    = new ProjectFileService();
            var filterItemHelper = new FilterItemService();
            var projectHelper    = new ProjectService(_projectsController);
            var sdlxliffMerger   = new SdlxliffMerger();
            var sdlxliffExporter = new SdlxliffExporter();
            var sdlXliffReader   = new SdlxliffReader();

            var model = new StudioViewsEditorViewModel(_editorController, filterItemHelper, projectHelper,
                                                       commonService, sdlxliffMerger, sdlxliffExporter, sdlXliffReader);

            _control = new StudioViewsEditorView {
                DataContext = model
            };
        }