From 20023339d3792ae250a89480bf1104d0770d4cd7 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Thu, 25 Dec 2014 21:49:17 +0800 Subject: [PATCH] only left button will trigger double click on notify icon --- shadowsocks-csharp/View/MenuViewController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index 2bcf4cd..2ff0e76 100755 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -59,7 +59,7 @@ namespace Shadowsocks.View UpdateTrayIcon(); _notifyIcon.Visible = true; _notifyIcon.ContextMenu = contextMenu1; - _notifyIcon.DoubleClick += notifyIcon1_DoubleClick; + _notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick; this.updateChecker = new UpdateChecker(); updateChecker.NewVersionFound += updateChecker_NewVersionFound; @@ -393,9 +393,12 @@ namespace Shadowsocks.View Process.Start("https://github.com/clowwindy/shadowsocks-csharp"); } - private void notifyIcon1_DoubleClick(object sender, EventArgs e) + private void notifyIcon1_DoubleClick(object sender, MouseEventArgs e) { - ShowConfigForm(); + if (e.Button == MouseButtons.Left) + { + ShowConfigForm(); + } } private void EnableItem_Click(object sender, EventArgs e)