| | |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | CompleteView completeView = new CompleteView(); |
| | | flMain.AddChidren(completeView.Show(1)); |
| | | completeView.Btntitle.Text = common.DeviceEpointName; |
| | | completeView.Btntitle.Text = LocalDevice.Current.GetDeviceEpointName(common); |
| | | EventHandler<MouseEventArgs> clickcancel = (sender, e) => |
| | | { |
| | | if (!edit) |
| | |
| | | break; |
| | | case DeviceType.DoorLock: |
| | | { |
| | | if (_if[0] == "condition") |
| | | { |
| | | flMain.RemoveFromParent(); |
| | | var memberList = new MemberList(); |
| | | UserView.HomePage.Instance.AddChidren(memberList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | MemberList.edit = false; |
| | | memberList.Show(common); |
| | | } |
| | | else |
| | | { |
| | | completeView.Btntitle.TextID = MyInternationalizationString.openmode; |
| | | completeView.Show(2).AddChidren(openView.Show()); |
| | | completeView.Show(2).AddChidren(closeView.Show()); |
| | | openView.titleBtn.TextID = MyInternationalizationString.logicopen; |
| | | closeView.titleBtn.TextID = MyInternationalizationString.logicclose; |
| | | //门锁数据特殊,进行特殊处理; |
| | | if (actionsInfo.ContainsKey("LinkType")) |
| | | { |
| | | actionsInfo.Remove("LinkType"); |
| | | } |
| | | //目标门锁类型是8; |
| | | actionsInfo.Add("LinkType", 8); |
| | | if (actionsInfo.ContainsKey("TaskList")) |
| | | { |
| | | actionsInfo.Remove("TaskList"); |
| | | } |
| | | if (actionsInfo.ContainsKey("Time")) |
| | | { |
| | | actionsInfo.Remove("Time"); |
| | | } |
| | | closeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | /// |
| | | openView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | SelectedDeviceStatus = "DoorLock"; |
| | | if (actionsInfo.ContainsKey("PassData")) |
| | | { |
| | | actionsInfo.Remove("PassData"); |
| | | } |
| | | actionsInfo.Add("PassData", "055704010112");//门锁常开 |
| | | }; |
| | | ///点击取消事件 |
| | | closeView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | SelectedDeviceStatus = "DoorLock"; |
| | | if (actionsInfo.ContainsKey("PassData")) |
| | | { |
| | | actionsInfo.Remove("PassData"); |
| | | } |
| | | actionsInfo.Add("PassData", "055704010113");//门锁常关 |
| | | |
| | | }; |
| | | if (edit) |
| | | { |
| | | foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions) |
| | | { |
| | | if (deviceinfo["LinkType"].ToString() == "8") |
| | | { |
| | | if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString()) |
| | | { |
| | | if (deviceinfo["PassData"].ToString() == "055704010112") |
| | | {//开启 |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | } |
| | | else |
| | | {//关闭 |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | flMain.RemoveFromParent(); |
| | | var memberList = new MemberList(); |
| | | UserView.HomePage.Instance.AddChidren(memberList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | MemberList.edit = false; |
| | | memberList.Show(common); |
| | | } |
| | | break; |
| | | case DeviceType.TemperatureSensor: |