internal Notify(NotifyIconEvents notifyIconEvents) { _notifyIconEvents = notifyIconEvents; _notifyIcon = new WF.NotifyIcon() { BalloonTipIcon = WF.ToolTipIcon.Info, ContextMenu = CreateContextMenu(), Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location) }; _notifyIcon.MouseDoubleClick += _notifyIcon_MouseDoubleClick; _notifyIcon.Visible = true; }
public StartUpWindow() { InitializeComponent(); CheckCommandLineArgs(); _globalHotKeyEvents = new GlobalHotKeyEvents(); _globalHotKeyEvents.GlobalHotKeyOpenFormMessage += _globalHotKeyEvents_GlobalHotKeyOpenFormMessage; _notifyIconEvents = new NotifyIconEvents(); _notifyIconEvents.NotifyIconOpenFormEvent += _notifyIconEvents_NotifyIconOpenFormEvent; _notifyIconEvents.NotifyIconShowFormMessageEvent += _notifyIconEvents_NotifyIconShowFormMessageEvent; _notifyIconEvents.NotifyIconExitAppEvent += _notifyIconEvents_NotifyIconExitAppEvent; _notify = new Notify(_notifyIconEvents); _globalHotKeyManager = new GlobalHotKeyManager(_globalHotKeyEvents); }