From caf9d97d5c445fa459b777c5569625bbfd0ff5fc Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 07 五月 2020 09:29:53 +0800
Subject: [PATCH] 2020-05-07-1
---
ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs | 113 ++++++++------------------------------------------------
1 files changed, 17 insertions(+), 96 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
old mode 100644
new mode 100755
index 203f4c8..8dbb478
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs
@@ -19,7 +19,7 @@
UserView.HomePage.Instance.ScrollEnabled = false;
CompleteView completeView = new CompleteView();
flMain.AddChidren(completeView.Show(1));
- completeView.Btntitle.Text = common.DeviceEpointName;
+ completeView.Btntitle.Text = LocalDevice.Current.GetDeviceEpointName(common);
EventHandler<MouseEventArgs> clickcancel = (sender, e) =>
{
if (!edit)
@@ -492,97 +492,14 @@
}
break;
case DeviceType.DoorLock:
- {
- if (_if[0] == "condition")
- {
- flMain.RemoveFromParent();
- var memberList = new MemberList();
- UserView.HomePage.Instance.AddChidren(memberList);
- UserView.HomePage.Instance.PageIndex += 1;
- MemberList.edit = false;
- memberList.Show(common);
- }
- else
- {
- completeView.Btntitle.TextID = MyInternationalizationString.openmode;
- completeView.Show(2).AddChidren(openView.Show());
- completeView.Show(2).AddChidren(closeView.Show());
- openView.titleBtn.TextID = MyInternationalizationString.logicopen;
- closeView.titleBtn.TextID = MyInternationalizationString.logicclose;
- //闂ㄩ攣鏁版嵁鐗规畩锛岃繘琛岀壒娈婂鐞�;
- if (actionsInfo.ContainsKey("LinkType"))
- {
- actionsInfo.Remove("LinkType");
- }
- //鐩爣闂ㄩ攣绫诲瀷鏄�8锛�
- actionsInfo.Add("LinkType", 8);
- if (actionsInfo.ContainsKey("TaskList"))
- {
- actionsInfo.Remove("TaskList");
- }
- if (actionsInfo.ContainsKey("Time"))
- {
- actionsInfo.Remove("Time");
- }
- closeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
- ///
- openView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
- {
- openView.selectedIconBtn.Visible = true;
- closeView.selectedIconBtn.Visible = false;
- openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- SelectedDeviceStatus = "DoorLock";
- if (actionsInfo.ContainsKey("PassData"))
- {
- actionsInfo.Remove("PassData");
- }
- actionsInfo.Add("PassData", "055704010112");//闂ㄩ攣甯稿紑
- };
- ///鐐瑰嚮鍙栨秷浜嬩欢
- closeView.clickviewBtn.MouseUpEventHandler += (sender, e) =>
- {
- openView.selectedIconBtn.Visible = false;
- closeView.selectedIconBtn.Visible = true;
- openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- SelectedDeviceStatus = "DoorLock";
- if (actionsInfo.ContainsKey("PassData"))
- {
- actionsInfo.Remove("PassData");
- }
- actionsInfo.Add("PassData", "055704010113");//闂ㄩ攣甯稿叧
+ {
- };
- if (edit)
- {
- foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
- {
- if (deviceinfo["LinkType"].ToString() == "8")
- {
- if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
- {
- if (deviceinfo["PassData"].ToString() == "055704010112")
- {//寮�鍚�
- openView.selectedIconBtn.Visible = true;
- closeView.selectedIconBtn.Visible = false;
- openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
- closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- }
- else
- {//鍏抽棴
- openView.selectedIconBtn.Visible = false;
- closeView.selectedIconBtn.Visible = true;
- openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
- closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
-
- }
- break;
- }
- }
- }
- }
- }
+ flMain.RemoveFromParent();
+ var memberList = new MemberList();
+ UserView.HomePage.Instance.AddChidren(memberList);
+ UserView.HomePage.Instance.PageIndex += 1;
+ MemberList.edit = false;
+ memberList.Show(common);
}
break;
case DeviceType.TemperatureSensor:
@@ -618,7 +535,7 @@
Send.dictionary(deviceConditionsInfo, "Cluster_ID", "1026");
Send.dictionary(deviceConditionsInfo, "AttriButeId", "0");
Send.dictionary(deviceConditionsInfo, "Range", "1");//1:绛変簬AttriButeData1鏃惰Е鍙戝姩浣�
- Send.dictionary(deviceConditionsInfo, "AttriButeData1", "50");//榛樿娓╁害鍊�50鈩�
+ Send.dictionary(deviceConditionsInfo, "AttriButeData1", "5000");//榛樿娓╁害鍊�50鈩�
Send.dictionary(deviceConditionsInfo, "AttriButeData2", "0");
}
else
@@ -627,7 +544,7 @@
Send.dictionary(deviceConditionsInfo, "Cluster_ID", "1029");
Send.dictionary(deviceConditionsInfo, "AttriButeId", "0");
Send.dictionary(deviceConditionsInfo, "Range", "1");//1:绛変簬AttriButeData1鏃惰Е鍙戝姩浣�
- Send.dictionary(deviceConditionsInfo, "AttriButeData1", "50");//榛樿婀垮害鍊�50%
+ Send.dictionary(deviceConditionsInfo, "AttriButeData1", "5000");//榛樿婀垮害鍊�50%
Send.dictionary(deviceConditionsInfo, "AttriButeData2", "0");
}
mUIPickerView.setNPicker(mList1, mList2, mList3);
@@ -636,8 +553,10 @@
mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) =>
{
+ ///娓╁害杩涚巼杞崲*100
+ var strValue = (int.Parse(mList2[s2]) * 100).ToString();
SelectedDeviceStatus = "TemperatureSensor";
- Send.dictionary(deviceConditionsInfo, "AttriButeData1", mList2[s2]);
+ Send.dictionary(deviceConditionsInfo, "AttriButeData1", strValue);
switch (mList1[s1])
{
case ">":
@@ -703,8 +622,10 @@
break;
}
//鏌ユ壘绱㈠紩
- index1 = mList1.IndexOf(s);
- index2 = mList2.IndexOf(devices["AttriButeData1"]);
+ index1 = mList1.IndexOf(s);
+ //杞崲娓╁害鍊�/100
+ var dd = (int.Parse(devices["AttriButeData1"])/100).ToString();
+ index2 = mList2.IndexOf(dd);
}
///鏇存柊鏈�鏂扮姸鎬侊紱
--
Gitblit v1.8.0