protected override void Execute() { IStudioEventAggregator ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NOTIFICATION_GROUP_ID) { Title = "First Group title" }; notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "First notification title", AlwaysVisibleDetails = new List <string> { "First notification description" } }); notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "Second notification title", AlwaysVisibleDetails = new List <string> { "Third notification description", "Forth notification description" } }); // add group notification var addTestGroup = new AddStudioGroupNotificationEvent(notificationGroup); ea.Publish(addTestGroup); // remove group notification var removeTestGroup = new RemoveStudioGroupNotificationEvent(NOTIFICATION_GROUP_ID); ea.Publish(removeTestGroup); }
protected override void Execute() { IStudioEventAggregator ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var showNotification = new ShowStudioNotificationsViewEvent(true, true); ea.Publish(showNotification); }
public void Execute() { _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated); _notificationGroup = new SampleNotificationGroup(NotificationGroupId) { Title = "Sample notifications" }; }
public InSourceViewController() { _projectRequests = new List <ProjectRequest>(); _hasTemplateList = new List <bool>(); _hasFiles = new List <bool>(); _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); _notificationGroup = new InSourceNotificationGroup(NotificationGroupId) { Title = "InSource Notifications" }; }
public RateItViewModel(IShortcutService shortcutService, IActionProvider actionProvider, ISegmentSupervisor segmentSupervisor, IMessageBoxService messageBoxService, EditorController editorController, IStudioEventAggregator eventAggregator) { _actionProvider = actionProvider; _segmentSupervisor = segmentSupervisor; _messageBoxService = messageBoxService; _editorController = editorController; _eventAggregator = eventAggregator; _shortcutService = shortcutService; Initialize(); UpdateActionTooltips(); }
protected override void Execute() { IStudioEventAggregator ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NOTIFICATION_GROUP_ID) { Title = "First Group title" }; notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "First notification title", AlwaysVisibleDetails = new List <string> { "First notification description" } }); notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "Second notification title", AlwaysVisibleDetails = new List <string> { "Third notification description", "Forth notification description" } }); // add group notification var addTestGroup = new AddStudioGroupNotificationEvent(notificationGroup); ea.Publish(addTestGroup); // Add 1 Notification to group var notification1 = new StudioTestNotification(new Guid()) { Title = "Dog title", AlwaysVisibleDetails = new List <string> { "AAA", "BBB", "CCC" } }; var addTestNotification = new AddStudioNotificationToGroupEvent(NOTIFICATION_GROUP_ID, notification1); ea.Publish(addTestNotification); // show notifications and set focus var showNotification = new ShowStudioNotificationsViewEvent(showNotifications: true, setFocus: true); ea.Publish(showNotification); }
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(); }
protected override void Execute() { IStudioEventAggregator ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notification1 = new StudioTestNotification(new Guid()) { Title = "Dog title", AlwaysVisibleDetails = new List <string> { "AAA", "BBB", "CCC" } }; var addTestGroup1 = new AddStudioNotificationToGroupEvent(NOTIFICATION_GROUP_ID, notification1); ea.Publish(addTestGroup1); var notification2 = new StudioTestNotification(new Guid()) { Title = "Cat title", AlwaysVisibleDetails = new List <string> { "111" } }; var addTestGroup2 = new AddStudioNotificationToGroupEvent(NOTIFICATION_GROUP_ID, notification2); ea.Publish(addTestGroup2); }
public EventAggregatorService(IStudioEventAggregator studioEventAggregator) { _studioEventAggregator = studioEventAggregator; }
public void Execute() { _eventAggregator = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); _eventAggregator.GetEvent <StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated); }
public PackagesControl() { InitializeComponent(); _app = new StudioApplication(); _eventAggregator = _app.GetService <IStudioEventAggregator>(); }
public MyCustomAction() { _app = new StudioApplication(); _eventAggregator = _app.GetService <IStudioEventAggregator>(); }