黄学彪
2019-11-07 82a773d1783549caca563831aac8affc059deedf
ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -108,7 +108,7 @@
            ///没有房间直接返回去;
            if (Common.Room.Lists.Count == 0)
            {
                return;
                return;
            }
            ///房间滑动控件
            var roomhorizontalScrol = new HorizontalScrolViewLayout()
@@ -144,7 +144,7 @@
            middle = new VerticalScrolViewLayout();
            middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
            middle.Height =Application.GetRealHeight(1920-40) - devicetypehorizontalScrol.Bottom;
            middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
            middle.X = Application.GetRealWidth(58);
            middle.Radius = (uint)Application.GetRealHeight(50);
@@ -176,7 +176,7 @@
                    Height = Application.GetRealHeight(780),
                    X = Application.GetRealWidth(1080 - 468 - 35),
                    Y = Application.GetRealHeight(184),
                    BackgroundImagePath= "Item/SelectFloor_Right.png",
                    BackgroundImagePath = "Item/SelectFloor_Right.png",
                };
                flMain.AddChidren(foolrbjicon);
@@ -195,7 +195,7 @@
                {
                    Width = Application.GetRealWidth(450),
                    Height =foolrbjicon.Height - btnfoolrtext.Height,
                    Height = foolrbjicon.Height - btnfoolrtext.Height,
                    X = Application.GetRealWidth(80),
                    Y = btnfoolrtext.Bottom,
                };
@@ -206,7 +206,7 @@
                    var foolrRowLayout = new RowLayout
                    {
                        Height = Application.GetRealHeight(150),
                        LineColor= ZigbeeColor.Current.LogicMiddleBackgroundColor,
                        LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                    };
                    foolrbj.AddChidren(foolrRowLayout);
@@ -215,7 +215,7 @@
                        Width = Application.GetRealWidth(81),
                        Height = Application.GetRealHeight(81),
                        UnSelectedImagePath = "Floor/Floor.png",
                        Gravity=Gravity.CenterVertical,
                        Gravity = Gravity.CenterVertical,
                    };
                    foolrRowLayout.AddChidren(btnfoolricon);
@@ -228,10 +228,11 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                        Tag = foolr.Key,
                        X= btnfoolricon.Right+Application.GetRealWidth(12),
                        X = btnfoolricon.Right + Application.GetRealWidth(12),
                    };
                    foolrRowLayout.AddChidren(btnfoolrname);
                    if (foolrname.Text == foolr.Value) {
                    if (foolrname.Text == foolr.Value)
                    {
                        btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png";
                        btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor;
                    }
@@ -245,7 +246,7 @@
                        foolrname.Text = btnfoolrname.Text;
                        flMain.RemoveFromParent();
                        var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
                        AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
                    };
                    foolrRowLayout.MouseUpEventHandler += foolrnameclick;
@@ -303,20 +304,20 @@
                    Width = Application.GetRealWidth(255),
                    UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
                    SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
                    Y=Application.GetRealHeight(21),
                    Y = Application.GetRealHeight(21),
                };
                fra.AddChidren(roombjBtn);
                var roomnameBtn= new Button
                var roomnameBtn = new Button
                {
                    Height = Application.GetRealHeight(152-26-20),
                    Width = Application.GetRealWidth(255-20-50),
                    Height = Application.GetRealHeight(152 - 26 - 20),
                    Width = Application.GetRealWidth(255 - 20 - 50),
                    Text = room.Name,
                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                    SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                    Y=Application.GetRealHeight(21 +13+10),
                    X=Application.GetRealWidth(10+25),
                    Y = Application.GetRealHeight(21 + 13 + 10),
                    X = Application.GetRealWidth(10 + 25),
                };
                fra.AddChidren(roomnameBtn);
@@ -334,7 +335,8 @@
                    var list = new List<DeviceUI>();
                    foreach (var device in room.DeviceUIList)
                    {
                        if (device.CommonDevice==null) {
                        if (device.CommonDevice == null)
                        {
                            continue;
                        }
                        if (!deviceTypeList.Contains(device.CommonDevice.Type))
@@ -343,7 +345,7 @@
                        }
                        list.Add(device);
                    }
                    AllDeviceTypeView(list, devicetypehorizontalScrol);
                }
@@ -364,7 +366,8 @@
                    var list = new List<DeviceUI>();
                    foreach (var device in room.DeviceUIList)
                    {
                        if (device.CommonDevice==null) {
                        if (device.CommonDevice == null)
                        {
                            continue;
                        }
                        if (!deviceTypeList.Contains(device.CommonDevice.Type))
@@ -373,7 +376,7 @@
                        }
                        list.Add(device);
                    }
                    AllDeviceTypeView(list, devicetypehorizontalScrol);
@@ -404,7 +407,7 @@
                devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains));
            }
            var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone|| device.CommonDevice.Type == DeviceType.TemperatureSensor);
            var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone || device.CommonDevice.Type == DeviceType.TemperatureSensor);
            if (iASZonejosn != null)
            {
                devicetypelist.Add(Language.StringByID(MyInternationalizationString.sensor));
@@ -685,11 +688,11 @@
        /// 选中该设备功能作为条件的视图方法
        /// </summary>
        /// <param name="common">Common.</param>
        public async static  void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
        public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
        {
            //不让当前界面滑动
            UserView.HomePage.Instance.ScrollEnabled = false;
            List<Dictionary<string, string>> doorlockConditionsInfo= new List<Dictionary<string, string>>();
            List<Dictionary<string, string>> doorlockConditionsInfo = new List<Dictionary<string, string>>();
            Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>();
            dictionary(deviceConditionsInfo, "Type", "1");
            dictionary(deviceConditionsInfo, "IsValid", "1");
@@ -1386,12 +1389,12 @@
                        var buttonSelected = new SelectedButton();
                        buttonRow.AddChidren(buttonSelected);
                        EventHandler<MouseEventArgs> buttonclick = (sender, e) =>
                       {
                           buttonSelected.Visible = true;
                           SelectedDeviceStatuscondition = "OnOffSwitch";
                           button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                        {
                            buttonSelected.Visible = true;
                            SelectedDeviceStatuscondition = "OnOffSwitch";
                            button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
                       };
                        };
                        buttonRow.MouseUpEventHandler += buttonclick;
                        button.MouseUpEventHandler += buttonclick;
                        buttonSelected.MouseUpEventHandler += buttonclick;
@@ -1544,7 +1547,7 @@
            deviceConditionsInfo.Add(Key, Value);
        }
    }
}