| | |
| | | Tag = "Logic"; |
| | | } |
| | | EditText logicTextBox; |
| | | public void Show(Action action) |
| | | public async void Show(Action action) |
| | | { |
| | | |
| | | #region 最上面的布局代码 |
| | |
| | | var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == conditions["MacAddr"] && obj.DeviceEpoint.ToString() == conditions["Epoint"]; }); |
| | | if (deviceinof == null) |
| | | { |
| | | continue; |
| | | deviceinof = new ZigBee.Device.CommonDevice(); |
| | | //continue; |
| | | } |
| | | ///显示设备名称 |
| | | var btndevice = new Button |
| | |
| | | var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return ((obj.DeviceAddr == obj1) && (obj.DeviceEpoint.ToString() == obj2)); }); |
| | | if (deviceinof == null) |
| | | { |
| | | continue; |
| | | |
| | | deviceinof = new ZigBee.Device.CommonDevice(); |
| | | // continue; |
| | | } |
| | | |
| | | |
| | | ///设备名称Button |
| | | var btndevicename = new Button |
| | | { |
| | |
| | | break; |
| | | case 2: |
| | | { |
| | | |
| | | //在本地查找该场景; |
| | | var sceneinof = Common.Room.AllRoomSceneUIList.Find((obj) => { return obj.Id.ToString() == actions["DeviceAddr"].ToString(); }); |
| | | //本地没有存在; |
| | | if (sceneinof == null) |
| | | { |
| | | continue; |
| | | //在网关查找该场景; |
| | | sceneinof =await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString())); |
| | | //网关没有存在; |
| | | if (sceneinof == null) |
| | | { |
| | | |
| | | //注解:本地和网关都不存在该场景,界面将不会显示该场景; |
| | | //sceneinof = new SceneUI(); |
| | | //移除该场景数据; |
| | | Common.Logic.CurrentLogic.Actions.Remove(actions); |
| | | //移除该场景视图; |
| | | devicesFrameLayout.RemoveFromParent(); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | actionsIcon.UnSelectedImagePath = "ZigeeLogic/scene.png"; |
| | |
| | | Common.Room room = new Common.Room(); |
| | | btnregionname.Text = room.GetRoomNameBySceneId(sceneinof.Id); |
| | | //Send.RoomNmae(btnregionname, deviceinof); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | if (e1) |
| | | { |
| | | Common.Logic.CurrentLogic.Actions.Remove(actions); |
| | | // devicesFrameLayout.RemoveFromParent(); |
| | | var logicCommunalPage = new LogicCommunalPage(); |
| | | UserView.HomePage.Instance.AddChidren(logicCommunalPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | pushswitchRowlayout.AddChidren(btnswitch); |
| | | btnswitch.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | btnswitch.IsSelected = !btnswitch.IsSelected; |
| | | if (btnswitch.IsSelected) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | }; |
| | | |
| | | |
| | | var custompushFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | | Height = Application.GetRealHeight(0), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, |
| | | }; |
| | | middle.AddChidren(custompushFrameLayout); |
| | |
| | | btncustompush.MouseUpEventHandler += customclick; |
| | | custompushback.MouseUpEventHandler += customclick; |
| | | custompushRowLayout.MouseUpEventHandler += customclick; |
| | | |
| | | btnswitch.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | btnswitch.IsSelected = !btnswitch.IsSelected; |
| | | if (btnswitch.IsSelected) |
| | | { |
| | | custompushFrameLayout.Height = Application.GetRealHeight(160); |
| | | } |
| | | else |
| | | { |
| | | custompushFrameLayout.Height = Application.GetRealHeight(0); |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 闪现提示框的方法 |
| | | /// 闪现式提示框的方法 |
| | | /// </summary> |
| | | /// <param name="tipText">提示内容</param> |
| | | /// <param name="second">停留时间单位为s</param> |