From bdb67e76871e6ad47c353cd0350a1ac04d913823 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 13:32:25 +0800
Subject: [PATCH] 20201223-5
---
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 97 ++++++++++++++++++++++--------------------------
1 files changed, 44 insertions(+), 53 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
old mode 100644
new mode 100755
index 5474311..bb24069
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -46,12 +46,12 @@
case FunctionType.Dimmer:
case FunctionType.RGB:
case FunctionType.RGBW:
- case FunctionType.CCT:
+ case FunctionType.ColorTemperature:
case FunctionType.Relay:
//绐楀笜
case FunctionType.Curtain:
- case FunctionType.RollerCurtain:
- case FunctionType.TrietexCurtain:
+ case FunctionType.RollingShutter:
+ case FunctionType.MotorCurtain:
//绌鸿皟
case FunctionType.AC:
//鍦扮儹
@@ -77,10 +77,6 @@
}
break;
-
-
-
-
}
#region 淇濆瓨
@@ -133,12 +129,44 @@
}
/// <summary>
- /// 绉婚櫎鎺т欢
+ /// 寮�鍏冲姛鑳藉睍寮�鐣岄潰
/// </summary>
/// <param name="frame"></param>
- private void RemView(FrameLayout frame)
+ /// <param name="device"></param>
+ /// <param name="button"></param>
+ /// <param name="len"></param>
+ public void SwitchViewMethod(FrameLayout frame, Entity.Function device, Button button, int len)
{
- frame.RemoveFromParent();
+
+ LogicView.SwitchView switchView = new LogicView.SwitchView();
+ switchView.FLayoutView(frame, len, button.Text, (strValue) =>
+ {
+ int id = 0;
+ switch (strValue)
+ {
+ case "on":
+ {
+ id = StringId.onLogic;
+ }
+ break;
+ case "off":
+ {
+ id = StringId.offLogic;
+ }
+ break;
+ }
+ button.TextID = id;
+ keyVlaue = "on_off";
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ LogicMethod.dictionary(dic, "key", "on_off");
+ LogicMethod.dictionary(dic, "comparator", "=");
+ LogicMethod.dictionary(dic, "data_type", "string");
+ LogicMethod.dictionary(dic, "value", strValue);
+ AddDictionaryData(dicSateteList, keyVlaue, dic);
+ selectedState = device.functionType + "_" + strValue;
+
+ });
+
}
/// <summary>
/// 鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
@@ -166,12 +194,12 @@
case FunctionType.Dimmer:
case FunctionType.RGB:
case FunctionType.RGBW:
- case FunctionType.CCT:
+ case FunctionType.ColorTemperature:
case FunctionType.Relay:
//绐楀笜
case FunctionType.Curtain:
- case FunctionType.RollerCurtain:
- case FunctionType.TrietexCurtain:
+ case FunctionType.RollingShutter:
+ case FunctionType.MotorCurtain:
//绌鸿皟
case FunctionType.AC:
//鍦扮儹
@@ -257,49 +285,12 @@
}
/// <summary>
- /// 寮�鍏冲姛鑳藉睍寮�鐣岄潰
+ /// 绉婚櫎鎺т欢
/// </summary>
/// <param name="frame"></param>
- /// <param name="device"></param>
- /// <param name="button"></param>
- /// <param name="len"></param>
- public void SwitchViewMethod(FrameLayout frame, Entity.Function device, Button button, int len)
+ private void RemView(FrameLayout frame)
{
-
- LogicView.SwitchView switchView = new LogicView.SwitchView();
- switchView.FLayoutView(frame, len);
- Dictionary<string, string> dic = new Dictionary<string, string>();
- LogicMethod.dictionary(dic, "key", "on_off");
- LogicMethod.dictionary(dic, "comparator", "=");
- LogicMethod.dictionary(dic, "data_type", "string");
- keyVlaue = "on_off";
- switchView.btnOn.MouseUpEventHandler += (sender2, e2) =>
- {
- LogicMethod.dictionary(dic, "value", "on");
- button.TextID = StringId.onLogic;
- selectedState = device.functionType + "_on";
- AddDictionaryData(dicSateteList, keyVlaue, dic);
- RemView(frame);
- };
- switchView.btnOff.MouseUpEventHandler += (sender3, e3) =>
- {
- LogicMethod.dictionary(dic, "value", "off");
- button.TextID = StringId.offLogic;
- selectedState = device.functionType + "_off";
- AddDictionaryData(dicSateteList, keyVlaue, dic);
- RemView(frame);
- };
- if (button.Text != "")
- {
- if (button.Text == switchView.btnOn.Text)
- {
- switchView.btnOn.TextColor = CSS.CSS_Color.textConfirmColor;
- }
- else if (button.Text == switchView.btnOff.Text)
- {
- switchView.btnOff.TextColor = CSS.CSS_Color.textConfirmColor;
- }
- }
+ frame.RemoveFromParent();
}
}
}
--
Gitblit v1.8.0