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