/// <summary> /// detaches the keyboard hook /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { KeyboardWatcher.stop(); if (disposing && components != null) { components.Dispose(); } }
/// <summary> /// Creates the notification icon and keyboard hook /// </summary> private void InitializeContext() { components = new System.ComponentModel.Container(); notifyIcon = new NotifyIcon(components) { ContextMenuStrip = new ContextMenuStrip(), Icon = Properties.Resources.AppIcon, Text = Properties.Resources.ResourceManager.GetString("ApplicationName"), Visible = true }; notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening; notifyIcon.DoubleClick += (object s, EventArgs eArgs) => ShowDetailsForm(); KeyboardWatcher.start(); }