黄学彪
2019-12-20 23fb45dd846ed8b62304c408c6bbe64265d4ac8b
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -18,7 +18,7 @@
            Tag = "Logic";
        }
        EditText logicTextBox;
        public void Show(Action action)
        public async void Show(Action action)
        {
            
            #region  最上面的布局代码
@@ -497,7 +497,8 @@
                                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
@@ -1195,9 +1196,11 @@
                                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
                                {
@@ -1503,11 +1506,25 @@
                            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";
@@ -1539,7 +1556,6 @@
                                Common.Room room = new Common.Room();
                                btnregionname.Text = room.GetRoomNameBySceneId(sceneinof.Id);
                                //Send.RoomNmae(btnregionname, deviceinof);
                            }
@@ -1752,6 +1768,7 @@
                            if (e1)
                            {
                                Common.Logic.CurrentLogic.Actions.Remove(actions);
                                // devicesFrameLayout.RemoveFromParent();
                                var logicCommunalPage = new LogicCommunalPage();
                                UserView.HomePage.Instance.AddChidren(logicCommunalPage);
                                UserView.HomePage.Instance.PageIndex += 1;
@@ -1888,23 +1905,11 @@
                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);
@@ -1952,7 +1957,18 @@
            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
@@ -2523,7 +2539,7 @@
        }
        /// <summary>
        /// 闪现提示框的方法
        /// 闪现式提示框的方法
        /// </summary>
        /// <param name="tipText">提示内容</param>
        /// <param name="second">停留时间单位为s</param>