From adb12dcdbb2ddaeac687c3aa9e57bb7ed459ab7e Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 24 六月 2020 15:26:46 +0800
Subject: [PATCH] 2020.06.24.01
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs | 35 +++++++++++++++++++++--------------
1 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
index 1e53f96..601e1bd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -40,7 +40,7 @@
/// </summary>
private CommonDevice device = null;
/// <summary>
- /// 褰撳墠閫夋嫨鐨勫姛鑳界被鍨嬬储寮�
+ /// 褰撳墠閫夋嫨鐨勫姛鑳界被鍨嬬储寮� -1:杩樻病鏈夎缃繃 0:涓嶆寚瀹� 1:寮�鍏� 2:鐏厜 3:鎻掑骇
/// </summary>
private int nowSelectNo = -1;
@@ -108,17 +108,17 @@
var form = new BottomItemSelectForm();
form.CancelCallEvent = true;//鍏佽鍙栨秷
- form.AddForm(title, listText, nowSelectNo);
+ form.AddForm(title, listText, nowSelectNo - 1);
form.FinishSelectEvent += (selectNo) =>
{
- if (selectNo == nowSelectNo)
+ if (selectNo == nowSelectNo - 1)
{
//閫夋嫨鐨勬槸鐩稿悓鐨�
return;
}
//-1:閫夋嫨鍙栨秷
this.Text = selectNo == -1 ? string.Empty : listText[selectNo];
- nowSelectNo = selectNo;
+ nowSelectNo = selectNo + 1;
//璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨�
this.RefreshDfunctionType();
@@ -145,28 +145,34 @@
var myFunType = this.device.DfunctionType;
//鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛�
string strType = string.Empty;
- if (myFunType == DeviceFunctionType.A鐏厜)
+
+ if (this.device.DfunctionType == DeviceFunctionType.A涓嶆寚瀹�)
{
- strType = Language.StringByID(R.MyInternationalizationString.uLight);
- nowSelectNo = 1;
+ nowSelectNo = 0;
}
else if (this.device.DfunctionType == DeviceFunctionType.A寮�鍏�)
{
strType = Language.StringByID(R.MyInternationalizationString.uSwitch);
- nowSelectNo = 0;
+ nowSelectNo = 1;
+ }
+ else if (myFunType == DeviceFunctionType.A鐏厜)
+ {
+ strType = Language.StringByID(R.MyInternationalizationString.uLight);
+ nowSelectNo = 2;
}
else if (this.device.DfunctionType == DeviceFunctionType.A鎻掑骇)
{
strType = Language.StringByID(R.MyInternationalizationString.uSocket1);
- nowSelectNo = 2;
+ nowSelectNo = 3;
}
if (this.device.Type == DeviceType.ColorDimmableLight
+ || this.device.Type == DeviceType.ColorTemperatureLight
|| this.device.Type == DeviceType.DimmableLight)
{
//鐏厜绫诲浐瀹氫负 鐏厜
strType = Language.StringByID(R.MyInternationalizationString.uLight);
- nowSelectNo = 1;
+ nowSelectNo = 2;
}
else if (this.device.Type == DeviceType.WindowCoveringDevice)
{
@@ -223,6 +229,7 @@
|| this.device.Type == DeviceType.Thermostat//绌鸿皟
|| this.device.Type == DeviceType.FreshAir//鏂伴
|| this.device.Type == DeviceType.PMSensor //PM2.5
+ || this.device.Type == DeviceType.ColorTemperatureLight //鑹叉俯鐏�
|| this.device.Type == DeviceType.WindowCoveringDevice)//绐楀笜
{
return true;
@@ -253,7 +260,7 @@
/// </summary>
private void RefreshDfunctionType()
{
- if (this.nowSelectNo == 0)
+ if (this.nowSelectNo == 1)
{
this.device.DfunctionType = DeviceFunctionType.A寮�鍏�;
if (this.device.IsCustomizeImage == false)
@@ -262,7 +269,7 @@
this.device.IconPath = "Device/Switch.png";
}
}
- else if (this.nowSelectNo == 1)
+ else if (this.nowSelectNo == 2)
{
this.device.DfunctionType = DeviceFunctionType.A鐏厜;
if (this.device.IsCustomizeImage == false)
@@ -271,7 +278,7 @@
this.device.IconPath = "Device/Light.png";
}
}
- else if (this.nowSelectNo == 2)
+ else if (this.nowSelectNo == 3)
{
this.device.DfunctionType = DeviceFunctionType.A鎻掑骇;
if (this.device.IsCustomizeImage == false)
@@ -282,7 +289,7 @@
}
else
{
- this.device.DfunctionType = DeviceFunctionType.A鏈畾涔�;
+ this.device.DfunctionType = DeviceFunctionType.A涓嶆寚瀹�;
if (this.device.IsCustomizeImage == false)
{
//閲嶆柊璁剧疆鍥剧墖
--
Gitblit v1.8.0