Exemplo n.º 1
0
        public void UpdateDeviceList(ABCDeviceModel abc)
        {
            ABCDeviceModel m = _mDeviceList.FirstOrDefault(c => { return(c.DeviceID == abc.DeviceID); });

            if (m == null)
            {
                _mDeviceList.Add(abc);
            }
            else
            {
                m.Update(abc);
            }
        }
Exemplo n.º 2
0
 public void UpdateDeviceList(string name = "", string area = "")
 {
     if (name == "")
     {//全刷新
         foreach (var d in _mDeviceList)
         {
             d.Update();
         }
     }
     else
     {
         ABCDeviceModel m = _mDeviceList.FirstOrDefault(c => { return(c.DeviceID == name); });
         if (m == null)
         {
             _mDeviceList.Add(new ABCDeviceModel(name, area));
             _mDeviceNameList.Add(name);
         }
     }
 }