| | |
| | | { |
| | | //过滤掉不支持的设备 |
| | | continue; |
| | | } |
| | | if (device.Type == DeviceType.DoorLock) |
| | | { |
| | | var myInfo = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | if (myInfo.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone) |
| | | { |
| | | //暂时不支持S-one门锁; |
| | | //过滤掉不支持S-one门锁设备; |
| | | continue; |
| | | }
|
| | | if (device.Type == DeviceType.DoorLock)
|
| | | {
|
| | | var myInfo = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
|
| | | if (myInfo.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone)
|
| | | {
|
| | | //暂时不支持S-one门锁;
|
| | | //过滤掉不支持S-one门锁设备;
|
| | | continue;
|
| | | } |
| | | } |
| | | deviceUIlist.Add(device); |
| | |
| | | { |
| | | succeed = true; |
| | | CurrentLogic.LogicId = logicifon.LogicId; |
| | | if (LogicView.IfString._Logic == if_logic || LogicView.IfString._SoneLogic == if_logic) |
| | | { |
| | | //自动化逻辑列表 |
| | | Common.Logic.LogicList.Add(CurrentLogic); |
| | | } |
| | | if (LogicView.IfString._LockLogic == if_logic) |
| | | { |
| | | //门锁联动事件逻辑列表 |
| | | Common.Logic.LockLogicList.Add(CurrentLogic); |
| | | } |
| | | else |
| | | if (LogicView.IfString._SoneLogic == if_logic) |
| | | { |
| | | //自动化逻辑列表 |
| | | Common.Logic.LogicList.Add(CurrentLogic); |
| | | //Sone门锁联动事件逻辑列表 |
| | | Common.Logic.SoneLogicList.Add(CurrentLogic); |
| | | |
| | | } |
| | | if (tag) |
| | |
| | | //TipView("添加自动化失败"); |
| | | //return; |
| | | } |
| | | |
| | | |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic");//移除所有标记Logic界面 |
| | | if (LogicView.IfString._Logic == if_logic) |
| | | { |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic"); |
| | | if (CurrentLogic.LogicType == 0) |
| | | { |
| | | //只刷新分类上下滑动view; |
| | | Phone.Category.CategoryMainForm.instance?.RefreshBodyView(); |
| | | // Category.Category.instance?.RefreshBodyView(); |
| | | } |
| | | else if (CurrentLogic.LogicType == 2) |
| | | { |
| | | //刷新整个分类; |
| | | //门锁常开模式特殊; |
| | | UserView.UserPage.Instance.ShowCategoryAutoListForm(); |
| | | |
| | | } |
| | | //只刷新分类-自动化上下滑动view; |
| | | Phone.Category.CategoryMainForm.instance?.RefreshBodyView(); |
| | | // Category.Category.instance?.RefreshBodyView(); |
| | | } |
| | | else if (LogicView.IfString._LockLogic == if_logic) |
| | | { |
| | | UserView.HomePage.Instance.RemoveViewByTag("Logic");//移除所有标记Logic界面 |
| | | //跳到门锁联动事件列表界面 |
| | | UserView.HomePage.Instance.RemoveViewByTag("LockListView");//移除所有标记LockListView界面 |
| | | var doorLockLogicList = new DoorLockLogic.LockLogicList(); |
| | | UserView.HomePage.Instance.AddChidren(doorLockLogicList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | doorLockLogicList.Show(); |
| | | } |
| | | else if (LogicView.IfString._SoneLogic == if_logic) |
| | | { |
| | | //跳到Sone门锁联动事件列表界面 |
| | | UserView.HomePage.Instance.RemoveViewByTag("SoneLogic");//移除所有标记LockListView界面 |
| | | var soneLogicList = new SoneLogicList(); |
| | | UserView.HomePage.Instance.AddChidren(soneLogicList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | soneLogicList.Show(); |
| | | } |
| | | |
| | | } |
| | | /// <summary> |