private void NotificationsPopupClosed(object sender, EventArgs e)
        {
            var senderPopup = (GrowlPopup)sender;

            if (senderPopup == NotificationsPopup)
            {
                NotificationsPopup = null;
            }
        }
 protected virtual void EnsurePopup()
 {
     if (NotificationsPopup != null)
         return;
     NotificationsPopup = CreatePopup();
     if (NotificationsPopup == null)
         throw new InvalidOperationException("The GrowlPopup was not created! Make sure CreatePopup always returns an instance.");
     NotificationsPopup.NotificationOpened += NotificationsPopupNotificationOpened;
     NotificationsPopup.NotificationClicked += NotificationsPopupNotificationClicked;
     NotificationsPopup.NotificationClosed += NotificationsPopupNotificationClosed;
     NotificationsPopup.NotificationTimedout += NotificationsPopupNotificationTimedout;
     NotificationsPopup.Closed += NotificationsPopupClosed;
 }
 protected virtual void EnsurePopup()
 {
     if (NotificationsPopup != null)
     {
         return;
     }
     NotificationsPopup = CreatePopup();
     if (NotificationsPopup == null)
     {
         throw new InvalidOperationException("The GrowlPopup was not created! Make sure CreatePopup always returns an instance.");
     }
     NotificationsPopup.NotificationOpened   += NotificationsPopupNotificationOpened;
     NotificationsPopup.NotificationClicked  += NotificationsPopupNotificationClicked;
     NotificationsPopup.NotificationClosed   += NotificationsPopupNotificationClosed;
     NotificationsPopup.NotificationTimedout += NotificationsPopupNotificationTimedout;
     NotificationsPopup.Closed += NotificationsPopupClosed;
 }
 private void NotificationsPopupClosed(object sender, EventArgs e)
 {
     var senderPopup = (GrowlPopup)sender;
     if (senderPopup == NotificationsPopup)
         NotificationsPopup = null;
 }