From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 14 十二月 2020 11:16:06 +0800 Subject: [PATCH] 合并了晾衣架(非新云端) --- ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs | 58 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 42 insertions(+), 16 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs index f856377..2fbc3d1 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs @@ -87,8 +87,19 @@ btnMore.InitControl(); btnMore.ButtonClickEvent += (sender, e) => { - var detailInfo = new DeviceDetailInfoForm(); - detailInfo.AddForm(device, nowSelectRoom); + //鑾峰彇璁惧灞炰簬銆愭櫨琛f灦銆� + var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice> { device }); + if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.Airer) + { + var form = new Shared.Phone.UserCenter.Device.DeviceFunctionSettionForm(); + form.AddForm(device, true); + } + else + { + var detailInfo = new DeviceDetailInfoForm(); + detailInfo.AddForm(device, nowSelectRoom); + } + }; //鍒濆鍖栦腑閮ㄤ俊鎭� @@ -126,7 +137,7 @@ btnDeviceName.Y = Application.GetRealHeight(46); btnDeviceName.TextSize = 15; btnDeviceName.IsBold = true; - btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(i_device); + btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device); btnDeviceName.Width = btnDeviceName.GetRealWidthByText(); btnDeviceName.TextAlignment = TextAlignment.Center; btnDeviceName.Gravity = Gravity.CenterHorizontal; @@ -146,7 +157,7 @@ frameRoomBlack.Height = Application.GetRealHeight(138); frameRoomBlack.Width = frameWhiteBack.Width; frameRoomBlack.BackgroundColor = 0xff232323; - frameRoomBlack.Radius= (uint)Application.GetRealHeight(17); + frameRoomBlack.Radius = (uint)Application.GetRealHeight(17); frameRoomBlack.Gravity = Gravity.BottomCenter; frameWhiteBack.AddChidren(frameRoomBlack); @@ -159,7 +170,7 @@ //鎴块棿鍥炬爣 var btnRoomIcon = new IconViewControl(81); - btnRoomIcon.X = HdlControlResourse.XXLeft; + btnRoomIcon.X = ControlCommonResourse.XXLeft; btnRoomIcon.UnSelectedImagePath = "Item/Room.png"; btnRoomIcon.Gravity = Gravity.CenterVertical; frameRoomBlack.AddChidren(btnRoomIcon); @@ -295,21 +306,36 @@ /// </summary> private void AddDeviceReportEvent() { - string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device); + string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device); //灞炴�т笂鎶� HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) => { - string mainKey2 = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(report); - if (mainKeys != mainKey2) + string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report); + + if (this.device.Type == DeviceType.Airer && this.device.DeviceAddr == report.DeviceAddr) { - //涓嶆槸鍚屼竴涓笢瑗� - return; + //鏅捐。鏋剁壒娈婏細5涓洖璺唬琛ㄤ笉鍚岀殑鍔熻兘锛屼絾鏄粯璁ゆ湰鍦板彧鏄剧ず浜嗙涓�涓洖璺� + //鎵�浠ユ潯浠剁壒娈婂垽鏂� + //妫�娴嬬粨鏋� + if (this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, report) == true) + { + //缁撴灉宸茬粡鎺ユ敹鍒� + this.ResponeResult = 1; + } } - //妫�娴嬬粨鏋� - if (this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, report) == true) + else { - //缁撴灉宸茬粡鎺ユ敹鍒� - this.ResponeResult = 1; + if (mainKeys != mainKey2) + { + //涓嶆槸鍚屼竴涓笢瑗� + return; + } + //妫�娴嬬粨鏋� + if (this.CheckResponeResultStatu(ReceiveComandDiv.A璁惧灞炴�т笂鎶�, report) == true) + { + //缁撴灉宸茬粡鎺ユ敹鍒� + this.ResponeResult = 1; + } } }); } @@ -337,7 +363,7 @@ else { //鍒锋柊鍚嶅瓧 - this.btnDeviceName.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(this.device); + this.btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(this.device); btnDeviceName.Width = btnDeviceName.GetRealWidthByText(); btnDeviceName.Gravity = Gravity.CenterHorizontal; if (this.nowSelectRoom == null) @@ -363,7 +389,7 @@ /// </summary> public override void CloseFormBefore() { - string mainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(this.device); + string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device); HdlGatewayReceiveLogic.Current.RemoveEvent("DeviceDetailCardAttribute" + mainKeys); //鍥炶皟鍑芥暟 -- Gitblit v1.8.0