Browse Source

refine code

pull/695/head
YFdyh000 5 years ago
parent
commit
f3e6bd2736
  1. 6
      v2rayN/v2rayN/Forms/MainForm.cs

6
v2rayN/v2rayN/Forms/MainForm.cs

@ -210,9 +210,9 @@ namespace v2rayN.Forms
/// </summary> /// </summary>
private void RefreshServersView() private void RefreshServersView()
{ {
lvServers.BeginUpdate();
lvServers.Items.Clear(); lvServers.Items.Clear();
List<ListViewItem> lst = new List<ListViewItem>();
for (int k = 0; k < config.vmess.Count; k++) for (int k = 0; k < config.vmess.Count; k++)
{ {
string def = string.Empty; string def = string.Empty;
@ -273,9 +273,9 @@ namespace v2rayN.Forms
lvItem.Font = new Font(lvItem.Font, FontStyle.Bold); lvItem.Font = new Font(lvItem.Font, FontStyle.Bold);
} }
if (lvItem != null) lvServers.Items.Add(lvItem); if (lvItem != null) lst.Add(lvItem);
} }
lvServers.EndUpdate(); lvServers.Items.AddRange(lst.ToArray());
//if (lvServers.Items.Count > 0) //if (lvServers.Items.Count > 0)
//{ //{

Loading…
Cancel
Save