Update MainForm.cs

pull/2097/head
2dust 2022-03-06 20:24:35 +08:00
parent 03ea24f29b
commit bfdc0a2e77
1 changed files with 3 additions and 1 deletions

View File

@ -131,6 +131,7 @@ namespace v2rayN.Forms
SysProxyHandle.UpdateSysProxy(config, true);
}
StorageUI();
ConfigHandler.SaveConfig(ref config);
statistics?.SaveToFile();
statistics?.Close();
@ -170,7 +171,7 @@ namespace v2rayN.Forms
switch (Utils.ToInt(e.Name))
{
case (int)EGlobalHotkey.ShowForm:
ShowForm();
if (this.ShowInTaskbar) HideForm(); else ShowForm();
break;
case (int)EGlobalHotkey.SystemProxyClear:
SetListenerType(ESysProxyType.ForcedClear);
@ -834,6 +835,7 @@ namespace v2rayN.Forms
private void tsbClose_Click(object sender, EventArgs e)
{
StorageUI();
HideForm();
//this.WindowState = FormWindowState.Minimized;
}