From c4c05bfafd2b2b2e50ca86560eae02334ced8560 Mon Sep 17 00:00:00 2001 From: YFdyh000 Date: Wed, 19 Feb 2020 01:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=97=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E7=BA=A0=E6=AD=A3=EF=BC=8C=E5=8F=8A=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2rayN/v2rayN/Forms/MainForm.cs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index c2f749a8..da552b57 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -198,13 +198,13 @@ namespace v2rayN.Forms ListViewItem lvItem = null; if (statistics != null && statistics.Enable) { - var index = statistics.Statistic.FindIndex(item_ => item_.itemId == item.getItemId()); - if (index != -1) + var sItem = statistics.Statistic.Find(item_ => item_.itemId == item.getItemId()); + if (sItem != null) { - totalUp = Utils.HumanFy(statistics.Statistic[index].totalUp); - totalDown = Utils.HumanFy(statistics.Statistic[index].totalDown); - todayUp = Utils.HumanFy(statistics.Statistic[index].todayUp); - todayDown = Utils.HumanFy(statistics.Statistic[index].todayDown); + totalUp = Utils.HumanFy(sItem.totalUp); + totalDown = Utils.HumanFy(sItem.totalDown); + todayUp = Utils.HumanFy(sItem.todayUp); + todayDown = Utils.HumanFy(sItem.todayDown); } lvItem = new ListViewItem(new string[] @@ -220,10 +220,10 @@ namespace v2rayN.Forms item.network, item.getSubRemarks(config), item.testResult, - totalUp, - totalDown, + todayDown, todayUp, - todayDown + totalDown, + totalUp }); } else @@ -241,10 +241,6 @@ namespace v2rayN.Forms item.network, item.getSubRemarks(config), item.testResult - //totalUp, - //totalDown, - //todayUp, - //todayDown, }); }