From bff8993501334c4f3c5f902216fe03253be747f8 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 15 四月 2020 16:59:01 +0800
Subject: [PATCH] 合并新代码
---
ZigbeeApp20200414/Shared/Phone/Device/Logic/OneLogic.cs | 45 ++++++++++++++++++++++++++++-----------------
1 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/ZigbeeApp20200414/Shared/Phone/Device/Logic/OneLogic.cs b/ZigbeeApp20200414/Shared/Phone/Device/Logic/OneLogic.cs
index 8ef4c90..7627338 100755
--- a/ZigbeeApp20200414/Shared/Phone/Device/Logic/OneLogic.cs
+++ b/ZigbeeApp20200414/Shared/Phone/Device/Logic/OneLogic.cs
@@ -130,20 +130,25 @@
var conditions = Common.Logic.CurrentLogic.Conditions[i];
switch (Type)
{
- case 5:
+ case 0:
{
-
- selecteddevice.ordinaryBtn.Visible = true;
- selecteddevice.iconBtn.UnSelectedImagePath = "ZigeeLogic/timeparagraph.png";
- string s1 = "", s2 = "";
- s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
- s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
- ///鏄剧ず鏃堕棿
- selecteddevice.ordinaryBtn.Text = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2;
- selecteddevice.selecetddevicestateBtn.Text = Language.StringByID(MyInternationalizationString.timeframe);
+
+ //"0姝e父鏃堕棿鐐�","1鏃ュ嚭鏃堕棿","2鏃ヨ惤鏃堕棿","3姝e崍鏃堕棿"
+ switch (int.Parse(conditions["DateType"]))
+ {
+ case 0:
+ {
+ selecteddevice.ordinaryBtn.Text = Language.StringByID(MyInternationalizationString.immediateexecution);
+ selecteddevice.iconBtn.UnSelectedImagePath = "ZigeeLogic/timepoint.png";
+ string s = "";
+ s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
+ selecteddevice.selecetddevicestateBtn.Text= conditions["StartHour"] + ":" + s;
+ }
+ break;
+ }
+
}
break;
-
}
if (Yes)
{
@@ -154,13 +159,19 @@
///缂栬緫
selecteddevice.edit.MouseUpEventHandler += (sender, e) =>
{
- if (Type==5) {
- var timePage = new TimePage();
- UserView.HomePage.Instance.AddChidren(timePage);
+ if (Type == 0)
+ {
+ var oneTimePoint = new OneTimePoint();
+ UserView.HomePage.Instance.AddChidren(oneTimePoint);
UserView.HomePage.Instance.PageIndex += 1;
- timePage.str1 = conditions["StartHour"] + ":" + conditions["StartMin"] + "-" + conditions["StopHour"] + ":" + conditions["StopMin"];
- timePage.IsEditor = true;
- timePage.Show(true);
+ oneTimePoint.Show((timeString) =>
+ {
+ if (!string.IsNullOrEmpty(timeString))
+ {
+ //缂栬緫瀹屽洖鏉ュ厛鏇存柊鏃堕棿
+ selecteddevice.selecetddevicestateBtn.Text = timeString;
+ }
+ });
}
};
--
Gitblit v1.8.0