From b9b3aed4ce15d0c18694ef50ed55bd9dffbad4eb Mon Sep 17 00:00:00 2001 From: JaredDC Date: Wed, 30 Jun 2021 02:30:37 +0800 Subject: [PATCH] double click is better --- v2rayN/v2rayN/Forms/MainForm.Designer.cs | 2 +- v2rayN/v2rayN/Forms/MainForm.cs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.Designer.cs b/v2rayN/v2rayN/Forms/MainForm.Designer.cs index 0ce8cff0..5e909089 100644 --- a/v2rayN/v2rayN/Forms/MainForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/MainForm.Designer.cs @@ -573,7 +573,7 @@ // resources.ApplyResources(this.notifyMain, "notifyMain"); this.notifyMain.ContextMenuStrip = this.cmsMain; - this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick); + this.notifyMain.DoubleClick += notifyIcon_DoubleClick; // // cmsMain // diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index 6b59477e..ba8b0d00 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -978,12 +978,11 @@ namespace v2rayN.Forms #region 托盘事件 - private void notifyMain_MouseClick(object sender, MouseEventArgs e) + private void notifyIcon_DoubleClick(object sender, EventArgs e) { - if (e.Button == MouseButtons.Left) - { - ShowForm(); - } + + ShowForm(); + } private void menuExit_Click(object sender, EventArgs e)