// ============================================ // PROTECTED (Methods) Event Handlers // ============================================ protected void OnMainWindowStarted(object sender) { EventBox eb = new EventBox(); eb.Add(new Image("NyFolderIcon", IconSize.Menu)); // hooking event eb.ButtonPressEvent += new ButtonPressEventHandler(OnImageClick); notificationArea = new NotificationArea("NyFolder"); notificationArea.Add(eb); // showing the trayicon notificationArea.ShowAll(); }
protected void OnMainAppQuit(object sender) { if (notificationArea != null) notificationArea.Destroy(); notificationArea = null; }