protected override void Execute() { var ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NotificationGroupId) { 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(NotificationGroupId); ea.Publish(removeTestGroup); }
protected override void Execute() { IStudioEventAggregator ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NOTIFICATION_GROUP_ID) { Title = NOTIFICATION_GROUP_TITLE }; notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "First G title", AlwaysVisibleDetails = new List <string> { "First G description" } }); notificationGroup.Notifications.Add(new StudioTestNotification(new Guid()) { Title = "Second G title", AlwaysVisibleDetails = new List <string> { "Third G description", "Forth G description" } }); var addTestGroup = new AddStudioGroupNotificationEvent(notificationGroup); ea.Publish(addTestGroup); }
protected override void Execute() { var ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NotificationGroupId) { Title = NotificationGroupTitle, IsActionVisible = true, Action = new BasicCommand() { CommandIcon = ImageResources.MyAction } }; var notificationId = Guid.NewGuid(); var completeNotification = new StudioTestNotification(notificationId) { Title = "Sample Notification Title", AlwaysVisibleDetails = new List <string> { "This is a sample notification that has all the elements of a notification visible" }, OtherDetails = new List <string> { "Use this section to display additional details within a notifcation.", "These details can be seen / hidden as per user needs" }, AllowsUserToDismiss = true, ClearNotificationAction = new ClearNotificationAction(NotificationGroupId, notificationId), IsExpanderVisible = true, IsLinkVisible = true, LinkAction = new OpenLinkCommand("https://appstore.sdl.com/language/developers/sdk.html") { CommandText = "Learn more on the Studio 2019 SDK", CommandToolTip = "Learn more on the Studio 2019 SDK" }, IsActionVisible = true, Action = new BasicCommand() { CommandText = "Click me!", CommandToolTip = "Click me!", CommandIcon = ImageResources.MyAction } }; notificationGroup.Notifications.Add(completeNotification); var addTestGroup = new AddStudioGroupNotificationEvent(notificationGroup); ea.Publish(addTestGroup); }
protected override void Execute() { var ea = SdlTradosStudio.Application.GetService <IStudioEventAggregator>(); var notificationGroup = new StudioTestNotificationsGroup(NotificationGroupId) { 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(NotificationGroupId, notification1); ea.Publish(addTestNotification); // show notifications and set focus var showNotification = new ShowStudioNotificationsViewEvent(showNotifications: true, setFocus: true); ea.Publish(showNotification); }