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(); }
public IDisposable Subscribe <T>(Action <T> action) { return(_studioEventAggregator?.GetEvent <T>().Subscribe(action)); }
public void Execute() { _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated); }