From d582d4846e7ff3c9cd1059232040c58b7de852ab Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 26 Jul 2022 20:02:47 +0800 Subject: [PATCH] Improve user experience --- v2rayN/v2rayN/Forms/MainForm.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index 42862793..eff1d682 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -932,7 +932,23 @@ namespace v2rayN.Forms } if (ConfigHandler.SetDefaultServer(ref config, lstVmess[index]) == 0) { - RefreshServers(); + //RefreshServers(); + for (int k = 0; k < lstVmess.Count; k++) + { + if (config.IsActiveNode(lstVmess[k])) + { + lvServers.Items[k].SubItems[0].Text = "√"; + lvServers.Items[k].ForeColor = Color.DodgerBlue; + lvServers.Items[k].Font = new Font(lvServers.Font, FontStyle.Bold); + } + else + { + lvServers.Items[k].SubItems[0].Text = ""; + lvServers.Items[k].ForeColor = lvServers.ForeColor; + lvServers.Items[k].Font = new Font(lvServers.Font, FontStyle.Regular); + } + } + RefreshServersMenu(); _ = LoadV2ray(); } return 0;