From 9d3c2727f1cd12f0a29c75f4ddff851d5243ac81 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 16 四月 2020 18:29:38 +0800
Subject: [PATCH] 新版本
---
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 50 +++++++++++++++++++++++++++++++-------------------
1 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index 29791bd..4722fd7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -20,7 +20,7 @@
/// <summary>
/// 鍒楄〃鎺т欢
/// </summary>
- private VerticalListControl listview = null;
+ private FrameListControl listview = null;
/// <summary>
/// 璁惧鐨勮澶囩被鍨�
/// </summary>
@@ -81,15 +81,19 @@
//娓呯┖bodyFrame
this.ClearBodyFrame();
+ var listBackControl = new VerticalFrameControl();
+ listBackControl.Height = bodyFrameLayout.Height;
+ bodyFrameLayout.AddChidren(listBackControl);
+
//鍒濆鍖栨甯�
var tableContr = new InformationEditorControl();
- this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 369, 1368);
+ this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uInfoEditor), 1368);
//鍥剧墖
var btnPic = new DeviceInfoIconControl();
btnPic.Y = Application.GetRealHeight(92);
btnPic.Gravity = Gravity.CenterHorizontal;
- bodyFrameLayout.AddChidren(btnPic);
+ listBackControl.frameTable.AddChidren(btnPic);
btnPic.InitControl(listNewDevice[0]);
//璁惧澶囨敞
@@ -171,7 +175,7 @@
this.AddAllMenuRow();
//鍒濆鍖栨甯冨畬鎴�
- tableContr.FinishInitControl(bodyFrameLayout, this.listview);
+ tableContr.FinishInitControl();
tableContr = null;
//淇濆瓨
@@ -303,7 +307,7 @@
};
actionNone = () =>
{
- Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
+ Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock);
};
HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
}
@@ -324,7 +328,7 @@
};
actionNone = () =>
{
- Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action);
+ Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock);
};
HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone);
@@ -928,10 +932,19 @@
var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
var form = new BottomItemSelectForm();
+ form.CancelCallEvent = true;//鍏佽鍙栨秷
form.AddForm(title, listText, nowSelectNo);
form.FinishSelectEvent += (selectNo) =>
{
- btnFunction.Text = listText[selectNo];
+ if (selectNo == -1)
+ {
+ //閫夋嫨鍙栨秷
+ btnFunction.Text = string.Empty;
+ }
+ else
+ {
+ btnFunction.Text = listText[selectNo];
+ }
nowSelectNo = selectNo;
//璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨�
if (selectNo == 0)
@@ -952,13 +965,22 @@
this.listNewDevice[0].IconPath = "Device/Light.png";
}
}
- else
+ else if (selectNo == 2)
{
this.listNewDevice[0].DfunctionType = DeviceFunctionType.A鎻掑骇;
if (this.listNewDevice[0].IsCustomizeImage == false)
{
//閲嶆柊璁剧疆鍥剧墖
this.listNewDevice[0].IconPath = "Device/Socket1.png";
+ }
+ }
+ else
+ {
+ this.listNewDevice[0].DfunctionType = DeviceFunctionType.A鏈畾涔�;
+ if (this.listNewDevice[0].IsCustomizeImage == false)
+ {
+ //閲嶆柊璁剧疆鍥剧墖
+ this.listNewDevice[0].IconPath = "Device/Switch.png";
}
}
this.listNewDevice[0].ReSave();
@@ -1184,18 +1206,8 @@
{
//妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘(鎷跨鐐规渶灏忕殑閭d釜鍥炶矾鍘诲畾浣�)
bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
- if (this.deviceEnumInfo.BeloneType == DeviceBeloneType.A鏅鸿兘闂ㄩ攣)
- {
- canTest = false;
- }
- else if (this.deviceEnumInfo.BeloneType == DeviceBeloneType.A浼犳劅鍣�
- && this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir)
- {
- //浼犳劅鍣ㄩ櫎浜哖ir閮芥病鏈夊畾浣嶅姛鑳�
- canTest = false;
- }
+
var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
-
string deviceMenu = string.Empty;
if (canTest == true)
{
--
Gitblit v1.8.0