From a4924de3136289d10cabbf2f61a228387d44ded7 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 07 十一月 2019 13:48:36 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 72 +++++++++++++++++++++++++++--------- 1 files changed, 54 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs old mode 100755 new mode 100644 index 2c7eb8b..1afc4c9 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -248,15 +248,15 @@ case DeviceType.Thermostat: //AC鍔熻兘 - if (common.DeviceStatusReport.CluterID == 513) + if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 513) { - var attriButeList = common.DeviceStatusReport.AttriBute; + var attriButeList = (common as ZigBee.Device.AC).DeviceStatusReport.AttriBute; if (attriButeList == null || attriButeList.Count == 0) { return; } var ac = deviceUI.CommonDevice as ZigBee.Device.AC; - ac.DeviceStatusReport = common.DeviceStatusReport; + ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport; switch (attriButeList[0].AttributeId) { case 0: @@ -305,7 +305,7 @@ } } - if (common.DeviceStatusReport.CluterID == 3) + if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 3) { var ac = deviceUI.CommonDevice as ZigBee.Device.AC; ac.IsOnline = 1; @@ -450,7 +450,7 @@ /// <param name="selectedBtn">閫変腑閭d釜鐣岄潰 0--鍔熻兘 1--鍦烘櫙 2--鑷姩鍖� </param> public void Show(int selectedBtn = 1) { - + ZbGateway.StatusList.Add(this); RemoveAll(); @@ -714,6 +714,15 @@ UserView.HomePage.Instance.PageIndex += 1; addLogicPage.Show(); } + /// <summary> + /// HidenFloor + /// </summary> + /// <param name="statu"></param> + private void HidenFloor(bool statu) + { + selectFloorBtn.Visible = !statu; + floorBtn.Visible = !statu; + } #endregion @@ -726,14 +735,17 @@ functionSceneAutoBodyView.RemoveAll(); if (functionBtn.IsSelected) { + HidenFloor(false); ShowFunction(); } else if (sceneBtn.IsSelected) { + HidenFloor(false); ShowScene(); } else if (automationBtn.IsSelected) { + HidenFloor(true); ShowAutotion(); } } @@ -945,13 +957,32 @@ deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => { - var lightControl = new Phone.Device.Light.LightControl(); - UserView.HomePage.Instance.AddChidren(lightControl); - UserView.HomePage.Instance.PageIndex += 1; - //lightControl.action = RefreshBodyView; - lightControl.Show(deviceUI, room); + if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A寮�鍏�) + { + var lightControl = new Phone.Device.Light.OnOffControl(); + UserView.HomePage.Instance.AddChidren(lightControl); + UserView.HomePage.Instance.PageIndex += 1; + //lightControl.action = RefreshBodyView; + lightControl.Show(deviceUI, room); + } + else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A鎻掑骇) + { + var lightControl = new Phone.Device.Light.PlugControl(); + UserView.HomePage.Instance.AddChidren(lightControl); + UserView.HomePage.Instance.PageIndex += 1; + //lightControl.action = RefreshBodyView; + lightControl.Show(deviceUI, room); + } + else + { + var lightControl = new Phone.Device.Light.LightControl(); + UserView.HomePage.Instance.AddChidren(lightControl); + UserView.HomePage.Instance.PageIndex += 1; + //lightControl.action = RefreshBodyView; + lightControl.Show(deviceUI, room); + } }; - + var editBtn = new CommonForm.RowLayoutEditButton() { Tag = deviceUI, @@ -1044,6 +1075,7 @@ deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => { + var lightControl = new Phone.Device.Light.AirSwitchControl(); UserView.HomePage.Instance.AddChidren(lightControl); UserView.HomePage.Instance.PageIndex += 1; @@ -1284,6 +1316,7 @@ UserHomeView.ReadStatus(rollerShade, () => { rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + rollerShade.ReadWcdCurrentPositionLiftPercentage(); }); } else @@ -1292,6 +1325,7 @@ if ((DateTime.Now - rollerShade.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan) { rollerShade.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); + rollerShade.ReadWcdCurrentPositionLiftPercentage(); } } @@ -1452,7 +1486,7 @@ { RefreshFunction(room); } - + } roomBtn.MouseUpEventHandler += (sender, e) => { @@ -1473,7 +1507,7 @@ } }; } - + } #endregion @@ -1558,7 +1592,7 @@ Tag = scene }; leftFL.AddChidren(collectionBtn); - + var sceneNameBtn = new Button() { Width = Application.GetRealWidth(176), @@ -1707,7 +1741,7 @@ } }; } - + }; deleteBtn.MouseUpEventHandler += delEvent; //缂栬緫鍦烘櫙 @@ -1763,6 +1797,7 @@ #endregion + #region 鈼� 鑷姩鍖朹_________________________ /// <summary> @@ -1772,6 +1807,7 @@ { functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; + var bjFrameLayout = new FrameLayout { Width = Application.GetRealWidth(1080 - 58), @@ -1933,7 +1969,7 @@ var Idlist = await Logic.Send.GetLogicId(0); if (Idlist.Count != 0) { - var listlogic = await Logic.Send.ReadList(Idlist.Count,0); + var listlogic = await Logic.Send.ReadList(Idlist.Count, 0); //foreach鍙兘闆嗗悎宸茶淇敼,鏋氫妇鎿嶄綔鍙兘涓嶄細鎵ц,鍙兘鍑虹幇宕╂簝(寤鸿for)銆� for (int j = 0; j < listlogic.Count; j++) { @@ -1949,7 +1985,7 @@ //鑷姩鍖� Automationview(logicScrolView); CommonPage.Loading.Hide(); - + } /// <summary> @@ -2557,6 +2593,6 @@ #endregion - + } } -- Gitblit v1.8.0