Example #1
0
        internal void TriggerNotificationBalloon(NotificationBalloon balloonInfo)
        {
            NotificationBalloonEventArgs args = new NotificationBalloonEventArgs
            {
                Balloon = balloonInfo
            };

            NotificationBalloonShown?.Invoke(this, args);

            if (!args.Handled)
            {
                MissedNotifications.Add(balloonInfo);
            }
        }
        private void handleBalloonData(SafeNotifyIconData nicData, NotifyIcon notifyIcon)
        {
            if (string.IsNullOrEmpty(nicData.szInfoTitle))
            {
                return;
            }

            NotificationBalloon          balloonInfo = new NotificationBalloon(nicData, notifyIcon);
            NotificationBalloonEventArgs args        = new NotificationBalloonEventArgs
            {
                Balloon = balloonInfo
            };

            ShellLogger.Debug($"NotificationArea: Received notification \"{balloonInfo.Title}\" for {notifyIcon.Title}");

            NotificationBalloonShown?.Invoke(this, args);

            if (!args.Handled)
            {
                notifyIcon.TriggerNotificationBalloon(balloonInfo);
            }
        }