From 5da99fed2eb0d08b6338064da5f998891252c7b8 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 18 五月 2020 16:39:59 +0800 Subject: [PATCH] 2020-05-18-2 --- ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 61 ++++++++++++++++-------------- 1 files changed, 33 insertions(+), 28 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs index a28b690..d4b37b1 100755 --- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs +++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs @@ -248,7 +248,8 @@ //鑷姩鍖� else if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 2) { - this.ShowAutotion(); + //鑷姩鍖栧姛鑳戒唬鐮佸叆鍙� + Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView); //闅愯棌妤煎眰 floorVisible = false; //鏄剧ず鍙充笂瑙掔殑鍔犲彿 @@ -438,8 +439,8 @@ var noFunction = new Button() { Y = Application.GetRealHeight(320), - Width = Application.GetMinRealAverage(757), - Height = Application.GetMinRealAverage(435), + Width = this.GetPictrueRealSize(757), + Height = this.GetPictrueRealSize(435), UnSelectedImagePath = "Item/NoFunction.png", Gravity = Gravity.CenterHorizontal }; @@ -506,51 +507,56 @@ //绐楀笜 if (device.Type == DeviceType.WindowCoveringDevice) { - cardContr = new Controls.DeviceCurtainRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceCurtainRowControl(); } //缁х數鍣� else if (device.Type == DeviceType.OnOffOutput) { - cardContr = new Controls.DeviceRelayRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceRelayRowControl(); } //绌烘皵寮�鍏� else if (device.Type == DeviceType.AirSwitch) { - cardContr = new Controls.DeviceAirSwitchRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceAirSwitchRowControl(); } //绌鸿皟 else if (device.Type == DeviceType.Thermostat) { - cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceAcRowControl(); + } + // 鏂伴 + else if (device.Type == DeviceType.FreshAir) + { + cardContr = new Controls.DeviceFreshAirRowControl(); } //褰╃伅(璋冨厜鍣�) else if (device.Type == DeviceType.DimmableLight) { - cardContr = new Controls.DeviceColorLightRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceColorLightRowControl(); } //浼犳劅鍣� else if (device.Type == DeviceType.IASZone) { - cardContr = new Controls.DeviceSensorRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceSensorRowControl(); } //娓╂箍搴� else if (device.Type == DeviceType.TemperatureSensor) { - cardContr = new Controls.DeviceTemperatureRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceTemperatureRowControl(); } //闂ㄩ攣 else if (device.Type == DeviceType.DoorLock) { - cardContr = new Controls.DeviceDoorLockRowControl(listView.rowSpace / 2); + cardContr = new Controls.DeviceDoorLockRowControl(); } //鏃犳硶璇嗗埆 else { - cardContr = new Controls.DeviceRowCommon(listView.rowSpace / 2); + cardContr = new Controls.DeviceRowCommon(); //娌℃湁鐘舵�佸姛鑳� cardContr.hadStatuFunction = false; } - + cardContr.chidrenYaxis = listView.rowSpace / 2; //鍒濆鍖栧崱鐗� listView.AddChidren(cardContr); cardContr.InitControl(device); @@ -761,8 +767,8 @@ var noFunction = new Button() { Y = Application.GetRealHeight(320), - Width = Application.GetMinRealAverage(757), - Height = Application.GetMinRealAverage(435), + Width = this.GetPictrueRealSize(757), + Height = this.GetPictrueRealSize(435), UnSelectedImagePath = "Item/NoFunction.png", Gravity = Gravity.CenterHorizontal }; @@ -808,6 +814,11 @@ //绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu(); } + if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0) + { + //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 + this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu(); + } this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice); } }, ShowErrorMode.NO); @@ -822,7 +833,8 @@ if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true) { //鍒锋柊鍗$墖鐘舵�� - this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(report.IsOnline == 1); + bool bolOnline = LocalDevice.Current.CheckDeviceIsOnline(report); + this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(bolOnline); return; } @@ -914,6 +926,11 @@ LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2); dic[typeInfo.BeloneTextId].IconPath = path1; dic[typeInfo.BeloneTextId].IconPathSelected = path2; + if (device.Type == DeviceType.FreshAir) + { + dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png"; + dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png"; + } dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId; } dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device)); @@ -994,18 +1011,6 @@ /// 璁惧鍥炶矾涓婚敭 /// </summary> public List<string> listDeviceKeys = new List<string>(); - } - - #endregion - - #region 鈼� 鑷姩鍖朹_________________________ - - /// <summary> - /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙� - /// </summary> - private void ShowAutotion() - { - Shared.Phone.Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView); } #endregion -- Gitblit v1.8.0