private void _notifyIcon_DoubleClick(object sender, EventArgs e) { _timerForm.Show(); }
public TimerAppContext() { Application.ApplicationExit += new EventHandler(this.OnApplicationExit); _notifyIcon = new NotifyIcon() { ContextMenuStrip = new ContextMenuStrip(), Icon = new Icon("clock.ico"), Text = "Test Tooltip Text", Visible = true }; _timerForm = new TimerForm(); _notifyIcon.ContextMenuStrip.Items.Add("Set Timer", null, (object s, EventArgs e) => _timerForm.Show()); _notifyIcon.ContextMenuStrip.Items.Add("E&xit", null, (object sender, EventArgs e) => ExitThread()); _notifyIcon.DoubleClick += _notifyIcon_DoubleClick; }