| | |
| | | {
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(list[i]);
|
| | | string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(list[j]);
|
| | | if (listView.Parent == null || dicData.ContainsKey(mainkeys) == false || listCheck.Contains(mainkeys) == true)
|
| | | {
|
| | | return;
|
| | |
| | | listCheck.Add(mainkeys);
|
| | |
|
| | | var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
|
| | | if (localDevice != null && localDevice.IsOnline != list[i].IsOnline)
|
| | | if (localDevice != null && localDevice.IsOnline != list[j].IsOnline)
|
| | | {
|
| | | //在线状态一样的话,不需要刷新
|
| | | localDevice.IsOnline = list[i].IsOnline;
|
| | | localDevice.IsOnline = list[j].IsOnline;
|
| | | localDevice.ReSave();
|
| | | }
|
| | | if (list[i].IsOnline == 1)
|
| | | if (Common.LocalDevice.Current.CheckDeviceIsOnline(list[j]) == true)
|
| | | {
|
| | | dicData[mainkeys].OnlineCount += 1;
|
| | | dicData[mainkeys].btnOnline.Text = dicData[mainkeys].OnlineCount + "/" + dicData[mainkeys].listDeviceKeys.Count;
|