From a7a6907b3df65db9c4b2bb1237f709db5c985b52 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 03 十二月 2019 10:25:20 +0800 Subject: [PATCH] 2019.12.3 --- ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 128 ++------------------ ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 19 +- ZigbeeApp/Shared/Phone/Device/CommonForm/RoomMainView.cs | 6 ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs | 99 ++++++++++++++++ ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 24 ++-- ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs | 15 +- ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs | 22 ++- ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs | 7 9 files changed, 163 insertions(+), 157 deletions(-) diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index 046ba72..807f630 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -2,17 +2,17 @@ <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.M7BBB18B19152766" /> <MonoDevelop.Ide.ItemProperties.GateWay.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.8c0bdb303f25d82c2a42fb8bfca449bfaca00260" /> <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> - <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/CommonForm/SceneMainView.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/UserView/UserHomeView.cs"> <Files> - <File FileName="Shared/Phone/UserView/UserHomeView.cs" Line="738" Column="1" /> + <File FileName="Shared/Phone/UserView/UserHomeView.cs" Line="515" Column="62" /> <File FileName="Shared/Phone/Device/Category/Category.cs" /> <File FileName="Shared/Phone/Device/AC/ACControl.cs" /> <File FileName="Shared/Phone/ZigBee/Device/CommonDevice.cs" /> <File FileName="Shared/Phone/Device/DeviceLogic/ReadDeviceAttributeLogic.cs" /> - <File FileName="Shared/Common/ZigbeeColor.cs" /> - <File FileName="Shared/Phone/Device/Room/EditRoom.cs" /> - <File FileName="Shared/Phone/Device/CommonForm/RoomView.cs" Line="20" Column="1" /> - <File FileName="Shared/Phone/Device/CommonForm/SceneMainView.cs" Line="1" Column="1" /> + <File FileName="Shared/Phone/Device/CommonForm/SceneCategoryView.cs" /> + <File FileName="Shared/Phone/Device/CommonForm/SceneMainView.cs" /> + <File FileName="Shared/Phone/Device/Category/CategoryAddScene.cs" /> + <File FileName="Shared/Phone/Device/CommonForm/RoomView.cs" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -21,6 +21,9 @@ <Node name="GateWay.Droid" expanded="True"> <Node name="Assets" expanded="True"> <Node name="Phone" expanded="True"> + <Node name="Item" expanded="True"> + <Node name="SelectHouse.png" selected="True" /> + </Node> <Node name="Room" expanded="True" /> <Node name="RoomIcon" expanded="True" /> </Node> @@ -31,9 +34,7 @@ <Node name="Phone" expanded="True"> <Node name="Device" expanded="True"> <Node name="Category" expanded="True" /> - <Node name="CommonForm" expanded="True"> - <Node name="SceneMainView.cs" selected="True" /> - </Node> + <Node name="CommonForm" expanded="True" /> <Node name="Room" expanded="True" /> </Node> <Node name="UserView" expanded="True" /> diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide index c64deaf..58131e7 100644 --- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide +++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide Binary files differ diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index e4b3ceb..5d270db 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -59,7 +59,7 @@ /// <summary> /// backGround /// </summary> - private Button backGround; + private ImageView backGround; /// <summary> /// 鏄惁淇敼 @@ -320,13 +320,13 @@ }; bodyFrameLayout.AddChidren(imgFL); - backGround = new Button() + backGround = new ImageView() { Width = Application.GetMinRealAverage(930), Height = Application.GetMinRealAverage(464), Gravity = Gravity.Center, Radius = (uint)Application.GetMinRealAverage(CommonFormResouce.BigFormRadius), - UnSelectedImagePath = "SceneIcon/3.jpg" + ImagePath = "SceneIcon/3.jpg" }; imgFL.AddChidren(backGround); backGround.SetViewShadow(true); @@ -436,11 +436,11 @@ } if (modifySceneUI.IconPathType==0) { - backGround.UnSelectedImagePath = modifySceneUI.IconPath; + backGround.ImagePath = modifySceneUI.IconPath; } else { - backGround.UnSelectedImagePath = System.IO.Path.Combine(Config.Instance.FullPath, modifySceneUI.IconPath); + backGround.ImagePath = System.IO.Path.Combine(Config.Instance.FullPath, modifySceneUI.IconPath); } nameRow.SetTitle(modifySceneUI.Name); zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(modifyRoom.FloorId)},{modifyRoom.Name}"); @@ -544,7 +544,7 @@ { IconPathType = 0; backGround.ImageBytes = null; - backGround.UnSelectedImagePath = imgPath; + backGround.ImagePath = imgPath; }; }; selectPhotographBtn.MouseUpEventHandler += (send, ee) => @@ -559,13 +559,13 @@ { if (IconPathType != 0) { - Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath); + Global.DeleteFilebyHomeId(backGround.ImagePath); } } IconPathType = 1; backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath); - backGround.UnSelectedImagePath = imagePath; + backGround.ImagePath = imagePath; System.IO.File.Delete(imagePath); }, fileName, 2, 1); @@ -583,13 +583,13 @@ { if (IconPathType != 0) { - Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath); + Global.DeleteFilebyHomeId(backGround.ImagePath); } } IconPathType = 2; backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath); - backGround.UnSelectedImagePath = imagePath; + backGround.ImagePath = imagePath; System.IO.File.Delete(imagePath); }, fileName, 2,1); @@ -871,7 +871,7 @@ } else { - modifySceneUI.IconPath = backGround.UnSelectedImagePath; + modifySceneUI.IconPath = backGround.ImagePath; } modifySceneUI.IconPathType = IconPathType; @@ -1027,7 +1027,7 @@ } else { - imgPath = backGround.UnSelectedImagePath; + imgPath = backGround.ImagePath; } if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) { diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomMainView.cs index a39d1ff..3ac3e26 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomMainView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomMainView.cs @@ -8,7 +8,7 @@ /// <summary> /// SceneIcon /// </summary> - public Button Icon; + public ImageView Icon; /// <summary> /// RoomNameButton /// </summary> @@ -45,7 +45,7 @@ }; AddChidren(CardBG); - Icon = new Button + Icon = new ImageView { X = Application.GetMinRealAverage(14), Width = Application.GetMinRealAverage(467), @@ -89,7 +89,7 @@ /// <param name="imagePath"></param> public void SetRoomIcon(string imagePath) { - Icon.UnSelectedImagePath = imagePath; + Icon.ImagePath = imagePath; } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs index 2d8fdcb..667f29f 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs @@ -1,5 +1,6 @@ 锘縰sing System; using Shared.Common; +using Shared.Phone.UserCenter; using Shared.Phone.UserView; namespace Shared.Phone.Device.CommonForm @@ -15,6 +16,13 @@ /// </summary> public Action action; + public override void RemoveFromParent() + { + HdlDeviceAttributeLogic.Current.RemoveEvent("TemperatrueDevice"); + HdlDeviceAttributeLogic.Current.RemoveEvent("HumidityDevice"); + base.RemoveFromParent(); + } + /// <summary> /// RoomView /// </summary> @@ -24,8 +32,8 @@ { X = Application.GetRealWidth(x); Y = Application.GetRealHeight(y); - Width = Application.GetRealWidth(487); - Height = Application.GetRealHeight(348); + Width = Application.GetRealWidth(717); + Height = Application.GetRealHeight(478); } /// <summary> @@ -123,6 +131,93 @@ roomTemperatureBackground.AddChidren(humidityText); + if (string.IsNullOrEmpty(room.TemperatrueDevice) == false) + { + HdlDeviceAttributeLogic.Current.RemoveEvent("TemperatrueDevice"); + HdlDeviceAttributeLogic.Current.AddAttributeEvent("TemperatrueDevice", "DeviceStatusReport", (Action<ZigBee.Device.CommonDevice>)((report) => + { + string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report); + if (room.TemperatrueDevice != mainKeys) + { + return; + } + //绉婚櫎鎺変簨浠� + HdlDeviceAttributeLogic.Current.RemoveEvent("TemperatrueDevice"); + + foreach (var data in report.DeviceStatusReport.AttriBute) + { + if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue) + { + if (data.AttriButeData == 0) + { + //0鈩� + temperatureText.Text = "0.0鈩�"; + } + else if (data.AttriButeData > 32767) + { + //璐熸暟(鐗规畩澶勭悊) + string strValue = (data.AttriButeData - 65536).ToString(); + //灏忔暟鐐归渶瑕佷竴浣� + strValue = strValue.Substring(0, strValue.Length - 1); + temperatureText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; + } + else + { + //灏忔暟鐐归渶瑕佷竴浣� + string strValue = data.AttriButeData.ToString(); + strValue = strValue.Substring(0, strValue.Length - 1); + temperatureText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�"; + } + } + } + })); + //鍙戦�佽幏鍙栨俯搴︾殑鍛戒护 + var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); + if (dev != null) + { + (dev as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity(); + } + } + + if (string.IsNullOrEmpty(room.HumidityDevice) == false) + { + HdlDeviceAttributeLogic.Current.RemoveEvent("HumidityDevice"); + HdlDeviceAttributeLogic.Current.AddAttributeEvent("HumidityDevice", "DeviceStatusReport", (report) => + { + string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report); + if (room.HumidityDevice != mainKeys) + { + return; + } + //绉婚櫎鎺変簨浠� + HdlDeviceAttributeLogic.Current.RemoveEvent("HumidityDevice"); + foreach (var data in report.DeviceStatusReport.AttriBute) + { + if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue) + { + if (data.AttriButeData == 0) + { + //0 + humidityText.Text = "0.0%"; + } + else + { + //灏忔暟鐐归渶瑕佷竴浣�(婀垮害娌℃湁璐熸暟) + string strValue = data.AttriButeData.ToString(); + strValue = strValue.Substring(0, strValue.Length - 1); + humidityText.Text = strValue.Insert(strValue.Length - 1, ".") + "%"; + } + } + } + }); + //鍙戦�佽幏鍙栨箍搴︾殑鍛戒护 + var dev = Common.LocalDevice.Current.GetDevice(room.HumidityDevice); + if (dev != null) + { + (dev as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity(); + } + } + var roomListBtn = new Button() { X = roomBackView.Width - Application.GetRealWidth(100 + 20), diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs index 7748134..35d3ee2 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs @@ -23,7 +23,7 @@ /// <summary> /// sceneImg /// </summary> - private Button sceneImg; + private ImageView sceneImg; /// <summary> /// SceneCategoryView @@ -64,16 +64,15 @@ }; AddChidren(sceneRowLayout); - sceneImg = new Button() + sceneImg = new ImageView() { X = Application.GetRealWidth(179), Width = Application.GetRealWidth(844), Height = Application.GetRealHeight(400), - UnSelectedImagePath = scene.IconPathType == 0 ? scene.IconPath : System.IO.Path.Combine(Config.Instance.FullPath, scene.IconPath), + ImagePath = scene.IconPathType == 0 ? scene.IconPath : System.IO.Path.Combine(Config.Instance.FullPath, scene.IconPath), Radius = (uint)Application.GetRealHeight(17) }; sceneRowLayout.AddChidren(sceneImg); - sceneImg.SetViewShadow(true); var leftFL = new FrameLayout diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs index cc1ab49..db2a05a 100644 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs @@ -16,7 +16,7 @@ /// <summary> /// SceneIcon /// </summary> - public Button SceneIcon; + public ImageView SceneIcon; /// <summary> /// statu /// </summary> @@ -92,16 +92,15 @@ }; AddChidren(CardBG); - SceneIcon = new Button + SceneIcon = new ImageView { - X = Application.GetMinRealAverage(14), Width = Application.GetMinRealAverage(458), - Height = Application.GetRealHeight(305), - Gravity = Gravity.CenterHorizontal + Height = Application.GetMinRealAverage(305), + Gravity = Gravity.CenterHorizontal, }; AddChidren(SceneIcon); SceneIcon.SetViewShadow(true); - + SceneIcon.SetCornerWithSameRadius(Application.GetRealHeight(100), HDLUtils.RectCornerBottomRight); //sceneBG = new Button //{ @@ -219,11 +218,11 @@ { if (scene.IconPathType == 0) { - SceneIcon.UnSelectedImagePath = iconPath; + SceneIcon.ImagePath = iconPath; } else { - SceneIcon.UnSelectedImagePath = System.IO.Path.Combine(Config.Instance.FullPath, iconPath); + SceneIcon.ImagePath = System.IO.Path.Combine(Config.Instance.FullPath, iconPath); } } diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs index 7145309..b0c6df1 100644 --- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs @@ -116,10 +116,14 @@ Height = Application.GetMinRealAverage(444), Gravity = Gravity.CenterHorizontal, Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius), - ImagePath = room.BackgroundImageType==0? room.BackgroundImage: System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage) + ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage) }; bodyFrameLayout.AddChidren(backGround); backGround.SetViewShadow(true); + if (room.BackgroundImageType != 0) + { + backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(backGround.ImagePath); + } backGround.MouseUpEventHandler += backGroundIMGHander; var infoFL = new FrameLayout @@ -150,6 +154,10 @@ nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.RoomName)} :"); nameRow.SetTitle(room.Name); infoFL.AddChidren(nameRow); + if(room.IsLove) + { + nameRow.NameText.Enable = false; + } var floorRow = new DeviceInfoRow(308); floorRow.Init(); @@ -397,7 +405,7 @@ } if (IconPathType == 0) { - room.BackgroundImage = backGround.UnSelectedImagePath; + room.BackgroundImage = backGround.ImagePath; } else { @@ -509,7 +517,7 @@ { IconPathType = 0; backGround.ImageBytes = null; - backGround.UnSelectedImagePath = imgPath; + backGround.ImagePath = imgPath; }; }; selectPhotographBtn.MouseUpEventHandler += (send, ee) => @@ -522,12 +530,12 @@ { if (IconPathType != 0) { - Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath); + Global.DeleteFilebyHomeId(backGround.ImagePath); } IconPathType = 1; backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath); - backGround.UnSelectedImagePath = imagePath; + backGround.ImagePath = imagePath; System.IO.File.Delete(imagePath); }, fileName, 2, 1); @@ -543,12 +551,12 @@ { if (IconPathType != 0) { - Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath); + Global.DeleteFilebyHomeId(backGround.ImagePath); } IconPathType = 2; backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath); - backGround.UnSelectedImagePath = imagePath; + backGround.ImagePath = imagePath; System.IO.File.Delete(imagePath); }, fileName, 2, 1); diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs index 6747f9f..ca7e2fb 100644 --- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs @@ -503,7 +503,7 @@ Y = Application.GetRealHeight(248), Width = Application.GetMinRealAverage(449), Height = Application.GetMinRealAverage(478), - UnSelectedImagePath = "Item/SelectHouse" + UnSelectedImagePath = "Item/SelectHouse.png" }; closeBGview.AddChidren(bg); @@ -511,8 +511,8 @@ { X = Application.GetRealWidth(35), Y = Application.GetRealHeight(271), - Height = Application.GetRealHeight(449), - Width = Application.GetRealWidth(440), + Height = Application.GetMinRealAverage(449), + Width = Application.GetMinRealAverage(440), Radius = CommonPage.BigFormRadius, BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; @@ -650,114 +650,12 @@ Room.CurrentRoom = rList[0]; foreach (var room in rList) { - var roomBackView = new FrameLayout() + var roomView = new Device.CommonForm.RoomView(0, 0); + roomPageView.AddChidren(roomView); + roomView.Init(room); + roomView.action += () => { - Width = Application.GetRealWidth(717), - Height=Application.GetRealHeight(478) - }; - roomPageView.AddChidren(roomBackView); - - var roomImg = new ImageView() - { - ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage), - Radius = (uint)Application.GetRealHeight(17) - }; - roomBackView.AddChidren(roomImg); - - var roomNameBackground = new FrameLayout - { - X = Application.GetRealWidth(29), - Y = Application.GetRealHeight(282), - Width = Application.GetRealWidth(200), - Height = Application.GetRealHeight(80), - BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor2 - }; - roomBackView.AddChidren(roomNameBackground); - roomNameBackground.SetCornerWithSameRadius(Application.GetRealHeight(40), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight); - - var roomName = new Button() - { - X = Application.GetRealWidth(5), - Width = Application.GetRealWidth(190), - Text = room.Name, - TextColor = ZigbeeColor.Current.GXCTextWhiteColor, - }; - roomNameBackground.AddChidren(roomName); - - - var roomTemperatureBackground = new FrameLayout - { - X = Application.GetRealWidth(29), - Y = Application.GetRealHeight(374), - Width = Application.GetRealWidth(340), - Height = Application.GetRealHeight(80), - BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor2 - }; - roomBackView.AddChidren(roomTemperatureBackground); - roomTemperatureBackground.SetCornerWithSameRadius(Application.GetRealHeight(40), HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight); - - var temperatureIcon = new Button - { - X = Application.GetRealWidth(12), - Width = Application.GetMinRealAverage(58), - Height = Application.GetMinRealAverage(58), - Gravity = Gravity.CenterVertical, - UnSelectedImagePath = "Room/Temperature.png" - }; - roomTemperatureBackground.AddChidren(temperatureIcon); - - var temperatureText = new Button - { - X = Application.GetRealWidth(69), - Width = Application.GetRealWidth(86), - Height = Application.GetRealHeight(58), - Gravity = Gravity.CenterVertical, - Text="26鈩�" - }; - roomTemperatureBackground.AddChidren(temperatureText); - - var humidityIcon = new Button - { - X = Application.GetRealWidth(179), - Width = Application.GetMinRealAverage(58), - Height = Application.GetMinRealAverage(58), - Gravity = Gravity.CenterVertical, - UnSelectedImagePath = "Room/Humidity.png" - }; - roomTemperatureBackground.AddChidren(humidityIcon); - - var humidityText = new Button - { - X = Application.GetRealWidth(236), - Width = Application.GetRealWidth(86), - Height = Application.GetRealHeight(58), - Gravity = Gravity.CenterVertical, - Text = "13%" - }; - roomTemperatureBackground.AddChidren(humidityText); - - - var roomListBtn = new Button() - { - X = roomBackView.Width - Application.GetRealWidth(100 + 20), - Y = Application.GetRealHeight(20), - Width = Application.GetMinRealAverage(100), - Height = Application.GetMinRealAverage(100), - UnSelectedImagePath = "Room/List.png", - }; - roomBackView.AddChidren(roomListBtn); - - roomListBtn.MouseUpEventHandler += (send, e) => - { - CommonPage.Instance.IsDrawerLockMode = true; - var editRoom = new Device.Room.EditRoom(); - HomePage.Instance.AddChidren(editRoom); - HomePage.Instance.PageIndex += 1; - editRoom.Show(room); - editRoom.action += () => - { - Show(); - }; + Show(); }; } @@ -781,7 +679,8 @@ TextColor = ZigbeeColor.Current.GXCTextGrayColor3, SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, TextID = R.MyInternationalizationString.Scence, - IsSelected = false + IsSelected = true, + TextSize=16 }; functionSceneView.AddChidren(sceneBtn); @@ -795,7 +694,8 @@ TextColor = ZigbeeColor.Current.GXCTextGrayColor3, SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, TextID = R.MyInternationalizationString.Function, - IsSelected = false + IsSelected = false, + TextSize=14 }; functionSceneView.AddChidren(functionBtn); @@ -814,6 +714,8 @@ { sceneBtn.IsSelected = false; functionBtn.IsSelected = true; + sceneBtn.TextSize = 14; + functionBtn.TextSize = 16; RefreshBodyView(); }; //閫夋嫨鍦烘櫙鍒嗘爮 @@ -821,6 +723,8 @@ { functionBtn.IsSelected = false; sceneBtn.IsSelected = true; + sceneBtn.TextSize = 16; + functionBtn.TextSize = 14; RefreshBodyView(); }; -- Gitblit v1.8.0