Пример #1
0
        private void LoadDataContext()
        {
            var versionService    = new VersionService();
            var shortcutService   = new ShortcutService(versionService);
            var actionProvider    = new ActionProvider();
            var messageBoxService = new MessageBoxService();

            var editorController = MtCloudApplicationInitializer.EditorController;

            var rateItViewModel = new RateItViewModel(shortcutService, actionProvider, MtCloudApplicationInitializer.SegmentSupervisor, messageBoxService,
                                                      editorController);

            _rateItWindow = new RateItView
            {
                DataContext = rateItViewModel
            };

            RatingService = rateItViewModel;

            rateItElementHost.Child = _rateItWindow;
        }
Пример #2
0
        private void LoadDataContext()
        {
            var shortcutService   = new ShortcutService();
            var actionProvider    = new ActionProvider();
            var messageBoxService = new MessageBoxService();

            var editorController  = SdlTradosStudio.Application.GetController <EditorController>();
            var segmentSupervisor = new SegmentSupervisor(editorController);
            var eventAggregator   = SdlTradosStudio.Application.GetService <IStudioEventAggregator>();

            var rateItViewModel = new RateItViewModel(shortcutService, actionProvider, segmentSupervisor, messageBoxService,
                                                      editorController, eventAggregator);

            _rateItWindow = new RateItView
            {
                DataContext = rateItViewModel
            };

            RatingService = rateItViewModel;

            rateItElementHost.Child = _rateItWindow;
        }