xm
2020-07-21 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d
ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -52,7 +52,7 @@
        {
            X = Application.GetRealWidth(58),
            Y = Application.GetRealHeight(184 + 200 + 280 + 40),
            Height = Application.GetRealHeight(1920 - 40 - 184 - 280 - 200),
            Height = Application.GetRealHeight(Method.H - 40 - 184 - 280 - 200),
            BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
        };
@@ -245,7 +245,7 @@
                };
                fra.AddChidren(roomnameBtn);
                if (i == 0)//
                if (i == 0)//默认选中第一个房间
                {
                    roombjButton.IsSelected = false;
                    roombjButton = roombjBtn;
@@ -343,7 +343,17 @@
                    TextSize = 10,
                };
                deviceRowLayout.AddChidren(devicetypename);
                //if (i == 0)//默认选中第一个设备类型
                //{
                //    devicetypeButton.IsSelected = false;
                //    devicetypeButton = backgroundColor;
                //    backgroundColor.IsSelected = true;
                //    var list = Method.GetDeviceType(devicetypename.Text);
                //    ConditionDeviceView(list, devicelist);
                //}
                EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
                {
                    devicetypeButton.IsSelected = false;
@@ -361,6 +371,7 @@
            ///显示房间所有设备
            ConditionDeviceView(new List<DeviceType>(), devicelist);
        }
        /// <summary>
        /// 加载该类型设备视图方法
@@ -369,6 +380,7 @@
        /// <param name="devicelist">设备列表</param>
        void ConditionDeviceView(List<DeviceType> deviceTypelist, List<CommonDevice> devicelist)
        {
            middle.RemoveAll();
            foreach (var common in devicelist)
            {
@@ -448,8 +460,7 @@
                    devicename.IsSelected = true;
                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                    this.AddChidren(flMain);
                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType);
                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType,0);
                };
                deviceFramelayout.MouseUpEventHandler += devicclick;
                bjFramelayout.MouseUpEventHandler += devicclick;