示例#1
0
 public void Execute()
 {
     _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>();
     _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated);
     _notificationGroup = new SampleNotificationGroup(NotificationGroupId)
     {
         Title = "Sample notifications"
     };
 }
        protected override void Initialize(IViewContext context)
        {
            _pathInfo     = new PathInfo();
            _imageService = new ImageService(_pathInfo);
            _imageService.ExtractFlags();


            ActivationChanged += OnActivationChanged;


            _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>();
            _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>()?.Subscribe(OnStudioWindowCreatedNotificationEvent);

            _projectsController = SdlTradosStudio.Application.GetController <ProjectsController>();
            //var project = _projectsController.CurrentProject.GetProjectInfo();

            // TODO this will be replaced with a call to recover the relevant data from the projects loaded in Studio
            var testDataUtil = new TestDataUtil(_imageService);

            _projectModels = testDataUtil.GetTestProjectData();
        }
示例#3
0
 public IDisposable Subscribe <T>(Action <T> action)
 {
     return(_studioEventAggregator?.GetEvent <T>().Subscribe(action));
 }
示例#4
0
 public void Execute()
 {
     _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>();
     _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated);
 }