From 7acc73a38dd180e435e4e43c70c0ad7ade79dc6b Mon Sep 17 00:00:00 2001 From: JaredDC Date: Tue, 6 Jul 2021 12:24:10 +0800 Subject: [PATCH] click icon change connect mode for MicroSoft TODO --- v2rayN/v2rayN/Forms/MainForm.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index 60676e69..dc344961 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -36,7 +36,7 @@ namespace v2rayN.Forms { MyAppExit(false); }; - + notifyMain.Click += new EventHandler(notifyMain_Click); var _timer = new System.Timers.Timer(); /*_timer.Interval = 1000 * 60 * mins;*/ _timer.Interval = 1000 * 60 * 60 * 3; // every 3 hours @@ -1545,5 +1545,16 @@ namespace v2rayN.Forms } #endregion + private void notifyMain_Click(object sender, EventArgs e) + { + if (config.sysProxyType == ESysProxyType.ForcedClear) + { + SetListenerType(ESysProxyType.ForcedChange); + } + else if(config.sysProxyType == ESysProxyType.ForcedChange) + { + SetListenerType(ESysProxyType.ForcedClear); + } + } } }