黄学彪
2020-03-06 a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -60,7 +60,8 @@
            };
            topRowLayout.AddChidren(clickBtn);
            clickBtn.MouseDownEventHandler += (sender, e) =>
            {
            {
                action();
                RemoveFromParent();
            };
@@ -763,7 +764,7 @@
                                                {
                                                    if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
                                                    {
                                                        devicestatus.Text = Common.Logic.CurrentLogic.Accounts[a]["Account"];
                                                        devicestatus.Text = Common.Logic.CurrentLogic.Accounts[a]["AccountName"];
                                                        break;
                                                    }
@@ -1531,7 +1532,7 @@
                        case 2:
                            {
                                //在本地查找该场景;
                                var sceneinof = Common.Room.AllRoomSceneUIList.Find((obj) => { return obj.Id.ToString() == actions["DeviceAddr"].ToString(); });
                                var sceneinof = UserCenter.HdlSceneLogic.Current.GetAllRoomSceneList().Find((obj) => { return obj.Id.ToString() == actions["DeviceAddr"].ToString(); });
                                //本地没有存在;
                                if (sceneinof == null)
                                {
@@ -1582,7 +1583,7 @@
                                actionsrowLayout.AddChidren(btnregionname);
                                /////通过设备找到区域(房间)名称
                                Common.Room room = new Common.Room();
                                btnregionname.Text = room.GetRoomNameBySceneId(sceneinof.Id);
                                btnregionname.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id);
                                //Send.RoomNmae(btnregionname, deviceinof);
@@ -1984,7 +1985,7 @@
            custompushback.MouseUpEventHandler += customclick;
            custompushRowLayout.MouseUpEventHandler += customclick;
            bool tag = false;//标记开关状态;
            btnswitch.MouseUpEventHandler += (sender1, e1) =>
            btnswitch.MouseUpEventHandler +=(sender1, e1) =>
              {
                  btnswitch.IsSelected = !btnswitch.IsSelected;
                  if (btnswitch.IsSelected)
@@ -1992,10 +1993,6 @@
                      tag = true;
                      custompushFrameLayout.Height = Application.GetRealHeight(160);
                      Common.Logic.CurrentLogic.LogicIsCustomPushText = 1;
                      if (Common.Logic.CurrentLogic.LogicId != 0)
                      {
                          Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                      }
                  }
                  else
@@ -2003,20 +2000,21 @@
                      tag = false;
                      custompushFrameLayout.Height = Application.GetRealHeight(0);
                      Common.Logic.CurrentLogic.LogicIsCustomPushText = 0;
                      if (Common.Logic.CurrentLogic.LogicId != 0)
                      {
                          Send.Data("删除", "/App/DelHomeLogicConfig", "POST");
                      }
                  }
                  Send.Zj(tag,Common.Logic.CurrentLogic);
              };
            if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0)
            {
                tag = false;
                btnswitch.IsSelected = false;
                custompushFrameLayout.Height = Application.GetRealHeight(0);
            }
            else
            {
                tag = true;
                btnswitch.IsSelected = true;
                custompushFrameLayout.Height = Application.GetRealHeight(160);
            }
            #endregion
@@ -2056,7 +2054,7 @@
                        Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
                        if (tag)
                        {
                            Send.Data("添加/更新", "/App/HomeLogicConfig", "POST");
                            Send.Zj(tag, Common.Logic.CurrentLogic);
                        }
                    }
                }