| | |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]); |
| | | selecteddevice.deviceNameBtn.Visible = true; |
| | | selecteddevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof); |
| | | selecteddevice.deviceNameBtn.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceinof); |
| | | selecteddevice.regionNameBtn.Visible = true; |
| | | Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof); |
| | | selecteddevice.edit.Tag = i; |
| | |
| | | ///删除控件 |
| | | selecteddevice.del.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, |
| | | var alert = new ShowMsgControl(ShowMsgType.Confirm, |
| | | Language.StringByID(MyInternationalizationString.doyouwanttodelete), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | |
| | | { |
| | | |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | name =LocalDevice.Current.GetDeviceEpointName(deviceinof); |
| | | name =HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceinof); |
| | | actiondevice.regionNameBtn.Visible = true; |
| | | Method.RoomNmae(actiondevice.regionNameBtn, deviceinof); |
| | | |
| | |
| | | break; |
| | | case 2: |
| | | { |
| | | actiondevice.edit.Visible = false;//隐藏编辑按钮(场景不需要编辑)
|
| | | //在本地查找该场景;
|
| | | var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString())); |
| | | actiondevice.edit.Visible = false;//隐藏编辑按钮(场景不需要编辑) |
| | | //在本地查找该场景; |
| | | var sceneinof = HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString())); |
| | | //本地没有存在; |
| | | if (sceneinof == null) |
| | | { |
| | |
| | | name = sceneinof.Name; |
| | | actiondevice.regionNameBtn.Visible = true; |
| | | /////通过设备找到区域(房间)名称 |
| | | actiondevice.regionNameBtn.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id); |
| | | actiondevice.regionNameBtn.Text = HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id); |
| | | |
| | | } |
| | | break; |
| | |
| | | actiondevice.selecetddevicestateBtn.Text = state; |
| | | |
| | | ///编辑 |
| | | actiondevice.edit.Tag = i.ToString(); |
| | | actiondevice.edit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | switch (linkType) |
| | |
| | | case 8: |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | if (deviceinof.Type != DeviceType.ColorTemperatureLight) |
| | | { |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_lockaction"); |
| | | } |
| | | else |
| | | { |
| | | var nightlight = new Nightlight(); |
| | | UserView.HomePage.Instance.AddChidren(nightlight); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | nightlight.Show(deviceinof, true, "lockaction",actions); |
| | | } |
| | | |
| | | |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_lockaction", int.Parse(actiondevice.edit.Tag.ToString())); |
| | | } |
| | | break; |
| | | |
| | |
| | | actiondevice.del.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, |
| | | var alert = new ShowMsgControl(ShowMsgType.Confirm, |
| | | Language.StringByID(MyInternationalizationString.doyouwanttodelete), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |