From 992cc7d4433f8f9e9b0a930ec095973e056abe1c Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 05 七月 2021 09:42:12 +0800
Subject: [PATCH] 20210705-1 代码备份
---
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs | 96 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 69 insertions(+), 27 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 3572fd7..2bc0a26 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -52,6 +52,9 @@
viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
///婊¤冻浠ヤ笅鏉′欢鐨刅iew
LogicView.LogicTypeTitleView titleCondition = new LogicView.LogicTypeTitleView();
+ titleCondition.btnText.Width = Application.GetRealWidth(300);
+ titleCondition.btnText.Height = Application.GetRealHeight(28);
+ titleCondition.btnText.IsMoreLines = true;
titleCondition.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
titleCondition.btnText.TextID = StringId.andCondition;
viewLayout.AddChidren(titleCondition.FLayoutView());
@@ -111,24 +114,35 @@
#region 鎵ц鎺ㄩ�� 鍙戦�侀�氱煡
///涓婁笅闂撮殧12鍍忕礌
viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
- /////鎵ц鎺ㄩ�乮ew
- //LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
- //push.frameLayout.Height = Application.GetRealHeight(50);
- //push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
- //push.btnText.TextID = StringId.push;
- //push.btnNextIcon.Width = Application.GetMinRealAverage(36);
- //push.btnNextIcon.Height = Application.GetMinRealAverage(36);
- //push.btnNextIcon.X = Application.GetRealWidth(305);
- //push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
- //push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
- //viewLayout.AddChidren(push.FLayoutView());
- /////鍙戦�侀�氱煡View
- //LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
- //notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
- //notification.btnText.TextID = StringId.notification;
- //viewLayout.AddChidren(notification.FLayoutView());
- /////涓婁笅闂撮殧62鍍忕礌
- //viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(62) });
+ ///鎵ц鎺ㄩ�乮ew
+ LogicView.LogicTypeTitleView push = new LogicView.LogicTypeTitleView();
+ push.frameLayout.Height = Application.GetRealHeight(50);
+ push.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+ push.btnText.TextID = StringId.push;
+ push.btnNextIcon.Width = Application.GetRealWidth(36);
+ push.btnNextIcon.Height = Application.GetRealWidth(36);
+ push.btnNextIcon.X = Application.GetRealWidth(305);
+ push.btnNextIcon.UnSelectedImagePath = "LogicIcon/off.png";
+ push.btnNextIcon.SelectedImagePath = "LogicIcon/on.png";
+ push.btnClick.Width = Application.GetRealWidth(305);
+ viewLayout.AddChidren(push.FLayoutView());
+ ///鍙戦�侀�氱煡View
+ LogicView.LogicTypeTitleView notification = new LogicView.LogicTypeTitleView();
+ notification.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(12), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+ notification.btnText.TextID = StringId.notification;
+ notification.btnLine.BackgroundColor = CSS.CSS_Color.textWhiteColor;
+ viewLayout.AddChidren(notification.FLayoutView());
+ //鏄剧ず涔嬪墠鎺ㄩ�佸紑鍏崇姸鎬�
+ if (Logic.currlogic.noticeConfig.enable)
+ {
+ push.btnNextIcon.IsSelected = true;
+ }
+ else
+ {
+ push.btnNextIcon.IsSelected = false;
+ }
+ ///涓婁笅闂撮殧62鍍忕礌
+ viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
#endregion
#region 淇濆瓨
@@ -176,10 +190,40 @@
{
DateMethod(cyclicTitle.btnText);
};
+ ///鏄惁瑕佹帹閫佺偣鍑讳簨浠�
+ push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
+ {
+ //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+ if (Logic.currlogic.pushConfigs.Count == 0)
+ {
+ //鍒濆鍖栧璞�
+ PushConfigs pushConfigs = new PushConfigs();
+ //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙�
+ pushConfigs.pushTarget.Add(UserInfo.Current.ID);
+ Logic.currlogic.pushConfigs.Add(pushConfigs);
+ }
+ push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
+ if (push.btnNextIcon.IsSelected)
+ {
+ Logic.currlogic.noticeConfig.enable = true;
+ }
+ else
+ {
+ Logic.currlogic.noticeConfig.enable = false;
+ }
+ };
+ ///杈撳叆鎺ㄩ�佹枃鏈�
+ notification.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ InputPushText inputPushText = new InputPushText();
+ MainPage.BasePageView.AddChidren(inputPushText);
+ inputPushText.Show();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
///淇濆瓨鐐瑰嚮浜嬩欢
saveView.btnClick.MouseUpEventHandler += (sender, e) =>
{
- if (Logic.currlogic.input.Count == 0&& Logic.currlogic.output.Count == 0)
+ if (Logic.currlogic.input.Count == 0 && Logic.currlogic.output.Count == 0)
{
new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNullOrtargetNull);
return;
@@ -204,7 +248,7 @@
{
list.Add(logic.name);
}
- new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName,view
+ new LogicView.TipPopView().InputBox(StringId.editName, InpOrOutLogicMethod.GetLogicName(Logic.currlogic), StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view
) =>
{
Logic.currlogic.name = logicName;
@@ -268,7 +312,7 @@
})
{ IsBackground = true }.Start();
- },()=> { });
+ }, () => { });
}
else
@@ -298,7 +342,7 @@
{
new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
}
- else
+ else
{
new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
}
@@ -460,7 +504,6 @@
{
//瀹氫箟涓�涓眬閮╳eekList鍒楄〃鐢ㄦ潵璁板綍閫変腑鏁版嵁;
List<string> weekStateList = new List<string>();
-
PublicInterface weekView = new PublicInterface();
if (Logic.currlogic.cycle.type == "week")
{
@@ -469,7 +512,7 @@
//鍔犺浇涔嬪墠淇濆瓨鐨勬暟鎹�
weekStateList.AddRange(list);
}
- var weekListStr= weekView.GetViewList("week");
+ var weekListStr = weekView.GetViewList("week");
weekView.MultiSelectShow(fLayout, weekListStr, Language.StringByID(StringId.cyclic), weekStateList
, (list) =>
{
@@ -497,7 +540,7 @@
weekView.MonSelectShow(fLayout, Logic.currlogic, (monList) =>
{
//閫変腑鏁版嵁澶勭悊
- string textStr= MainView.GetMonString(monList);
+ string textStr = MainView.GetMonString(monList);
//鏄剧ず閫変腑鏁版嵁
button.Text = textStr;
//灏佽鏁版嵁
@@ -536,8 +579,7 @@
}
-
-
+
}
}
--
Gitblit v1.8.0