/// <summary> /// Show the task-bar notification /// </summary> /// <param name="notificationEvent">The <see cref="TaskbarNotificationEvent"/> containing the data to show</param> private void ShowTaskBarNotification(TaskbarNotificationEvent notificationEvent) { BalloonIcon icon; switch (notificationEvent.NotificationKind) { case NotificationKind.BASIC: icon = BalloonIcon.None; break; case NotificationKind.INFO: icon = BalloonIcon.Info; break; case NotificationKind.WARNING: icon = BalloonIcon.Warning; break; case NotificationKind.ERROR: icon = BalloonIcon.Error; break; default: icon = BalloonIcon.None; break; } this.CdpTaskBarIcon.ShowBalloonTip(notificationEvent.Title, notificationEvent.Message, icon); }
public void VerifyThatPropertiesAreSetByConstructor() { var title = "this is a title"; var message = "this is a message"; var notificationKind = NotificationKind.BASIC; var notificationEvent = new TaskbarNotificationEvent(title, message, notificationKind); Assert.AreEqual(title, notificationEvent.Title); Assert.AreEqual(message, notificationEvent.Message); Assert.AreEqual(notificationKind, notificationEvent.NotificationKind); }