gxc
2020-01-02 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -60,14 +60,19 @@
            framePic.Width = Application.GetMinRealAverage(887);
            framePic.Height = Application.GetMinRealAverage(444);
            framePic.Gravity = Gravity.CenterHorizontal;
            framePic.Radius = 8;
            framePic.Radius = (uint)Application.GetRealHeight(17);
            framePic.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
            bodyFrameLayout.AddChidren(framePic);
            var btnPic = new ImageView();
            btnPic.Radius = 8;
            btnPic.Radius = (uint)Application.GetRealHeight(17);
            btnPic.ImagePath = "RoomIcon/0.JPG";
            framePic.AddChidren(btnPic);
            btnPic.MouseUpEventHandler += (sender, e) =>
            //在上面放一层阴影
            var btnPicBack = new FrameLayout();
            btnPicBack.Radius = (uint)Application.GetRealHeight(17);
            btnPicBack.BackgroundColor = 0x26000000;
            framePic.AddChidren(btnPicBack);
            btnPicBack.MouseUpEventHandler += (sender, e) =>
            {
                //房间图片选择
                this.RoomPictrueSelect(btnPic);
@@ -282,7 +287,7 @@
            btnTemper.Text = Language.StringByID(R.MyInternationalizationString.uGetting);
            HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A设备属性上报, (Action<ZigBee.Device.CommonDevice>)((report) =>
            HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A设备属性上报, ((report) =>
            {
                string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
                if (newRoom.TemperatrueDevice != mainKeys || btnTemper == null)
@@ -295,6 +300,8 @@
                foreach (var data in report.DeviceStatusReport.AttriBute)
                {
                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                    {
                        if (data.AttriButeData == 0)
                        {
@@ -316,6 +323,7 @@
                            strValue = strValue.Substring(0, strValue.Length - 1);
                            btnTemper.Text = strValue.Insert(strValue.Length - 1, ".") + "℃";
                        }
                        });
                    }
                }
            }));
@@ -388,6 +396,8 @@
                {
                    if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                        if (data.AttriButeData == 0)
                        {
                            //0
@@ -400,6 +410,7 @@
                            strValue = strValue.Substring(0, strValue.Length - 1);
                            btnHumi.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
                        }
                        });
                    }
                }
            });