From 39eb1c016f49275bb8449fba9286619670f39a42 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 19 四月 2021 09:35:59 +0800
Subject: [PATCH] 合并温居城代码
---
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs | 35 ++
HDL-ON_Android/Assets/Language.ini | 10
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 43 ++
HDL_ON/HDL_ON.projitems | 2
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs | 6
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 8
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 2
HDL-ON_iOS/Resources/Language.ini | 9
HDL_ON/Common/OnAppConfig.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs | 132 ++++++++
HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs | 24 -
HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs | 151 +++++++++
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs | 19
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs | 26 +
HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 3
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs | 1
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs | 24 -
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs | 6
HDL_ON/DAL/Server/HttpUtil.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs | 53 +++
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs | 107 +++++-
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 63 +++
HDL_ON/Common/R.cs | 9
HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs | 18 +
HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs | 11
HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs | 144 +++++++++
26 files changed, 803 insertions(+), 107 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index e5c9d89..d42a2bc 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1565,6 +1565,16 @@
7120=闃叉媶鍔熻兘
7121=鍦ㄧ嚎
7122=涓嶅湪绾�
+7123=绌烘皵璐ㄩ噺
+7124=浼�
+7125=鑹�
+7126=宸�
+7127=鍙戦�侀�氱煡
+7128=閫氱煡鍐呭
+7129=(100瀛楀唴)
+7130=璐﹀彿閫夋嫨
+7131=App鎺ㄩ��
+
9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 3923d05..a8ce2a7 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1562,6 +1562,15 @@
7120=闃叉媶鍔熻兘
7121=鍦ㄧ嚎
7122=涓嶅湪绾�
+7123=绌烘皵璐ㄩ噺
+7124=浼�
+7125=鑹�
+7126=宸�
+7127=鍙戦�侀�氱煡
+7128=閫氱煡鍐呭
+7129=(100瀛楀唴)
+7130=璐﹀彿閫夋嫨
+7131=App鎺ㄩ��
9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
9001=璇蜂娇鐢ㄦ柊鐨勯偖绠辫处鍙风櫥褰旳PP
diff --git a/HDL_ON/Common/OnAppConfig.cs b/HDL_ON/Common/OnAppConfig.cs
index 9322dfe..496bf7a 100644
--- a/HDL_ON/Common/OnAppConfig.cs
+++ b/HDL_ON/Common/OnAppConfig.cs
@@ -75,7 +75,7 @@
/// <summary>
/// 璐﹀彿娉ㄥ唽鏈嶅姟鍣ㄤ俊鎭�
/// </summary>
- public string RequestHttpsHost = "https://china.hdlcontrol.com";
+ public string RequestHttpsHost ="https://china.hdlcontrol.com";
/// <summary>
///
/// </summary>
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index a06d9be..cedc592 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -1058,6 +1058,15 @@
public const int fangchaigongneng = 7120;
public const int zaixian = 7121;
public const int buzaixian = 7122;
+ public const int kongqizhiliang = 7123;
+ public const int kongqiyou= 7124;
+ public const int kongqiliang = 7125;
+ public const int kongqicha = 7126;
+ public const int fasongtongzhi = 7127;
+ public const int tongzhineirong = 7128;
+ public const int xianzhichangdu = 7129;
+ public const int zhanghaoxuanze = 7130;
+ public const int apptuisong = 7131;
#region LE鏂板
/// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 7f7b499..e60ff0f 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -153,6 +153,8 @@
{
urlHead = OnAppConfig.Instance.RequestHttpsHost;
}
+ //"https://bahrain-gateway.hdlcontrol.com";
+ urlHead="https://china-gateway.hdlcontrol.com";
string requestFullUrl = urlHead + apiPath;
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 198f53a..a091e72 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -397,6 +397,8 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneCatchFunctionListPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\InputPushText.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AirQuality.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)DAL\" />
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
index b951446..a319a5c 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -46,7 +46,7 @@
shiwaiView.frameLayout.Y = functionView.frameLayout.Bottom;
shiwaiView.btnText.TextID = StringId.shiwaibainhua;
shiwaiView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
- //viewLayout.AddChidren(shiwaiView.FLayoutView());
+ viewLayout.AddChidren(shiwaiView.FLayoutView());
#endregion
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index 3560fd2..757f209 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -111,26 +111,37 @@
#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.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";
- //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(40) });
+ ///鎵ц鎺ㄩ�乮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.pushConfigs.Count > 0)
+ {
+ push.btnNextIcon.IsSelected = true;
+ }
+ else
+ {
+ push.btnNextIcon.IsSelected = false;
+ }
+ ///涓婁笅闂撮殧62鍍忕礌
+ viewLayout.AddChidren(new FrameLayout { Height = Application.GetRealHeight(40) });
#endregion
-
+
#region 淇濆瓨
///淇濆瓨View
LogicView.SaveView saveView = new LogicView.SaveView();
@@ -175,6 +186,63 @@
cyclicTitle.btnClick.MouseUpEventHandler += (sender, e) =>
{
DateMethod(cyclicTitle.btnText);
+ };
+ ///鏄惁瑕佹帹閫佺偣鍑讳簨浠�
+ //鍒濆鍖栧璞�
+ PushConfigs pushConfigs = new PushConfigs();
+ if (Logic.currlogic.pushConfigs.Count > 0)
+ {
+ pushConfigs = Logic.currlogic.pushConfigs[0];
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
+ {
+ //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+ pushConfigs.pushTarget.Add(UserInfo.Current.userMobileInfo);
+ }
+ else
+ {
+ //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+ pushConfigs.pushTarget.Add(UserInfo.Current.userEmailInfo);
+ }
+ }
+ push.btnNextIcon.MouseUpEventHandler += (sender, e) =>
+ {
+ push.btnNextIcon.IsSelected = !push.btnNextIcon.IsSelected;
+ if (push.btnNextIcon.IsSelected)
+ {
+ if (Logic.currlogic.pushConfigs.Count > 0)
+ {
+ //娓呯┖涔嬪墠鏃ч厤缃暟鎹�
+ Logic.currlogic.pushConfigs.Clear();
+ }
+ //澧炲姞閰嶇疆鏁版嵁
+ Logic.currlogic.pushConfigs.Add(pushConfigs);
+ }
+ else
+ {
+ if (Logic.currlogic.pushConfigs.Count > 0)
+ {
+ //榛樿鍙栫涓�涓祴鍊�
+ pushConfigs = Logic.currlogic.pushConfigs[0];
+ //娓呯┖閰嶇疆鏁版嵁
+ Logic.currlogic.pushConfigs.Clear();
+ }
+ }
+ };
+ ///杈撳叆鎺ㄩ�佹枃鏈�
+ notification.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ InputPushText inputPushText = new InputPushText();
+ MainPage.BasePageView.AddChidren(inputPushText);
+ inputPushText.Show(pushConfigs);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ inputPushText.action += (pushConfigsIfon) =>
+ {
+ //璧嬪��
+ pushConfigs = pushConfigsIfon;
+ };
};
///淇濆瓨鐐瑰嚮浜嬩欢
saveView.btnClick.MouseUpEventHandler += (sender, e) =>
@@ -460,7 +528,6 @@
{
//瀹氫箟涓�涓眬閮╳eekList鍒楄〃鐢ㄦ潵璁板綍閫変腑鏁版嵁;
List<string> weekStateList = new List<string>();
-
PublicInterface weekView = new PublicInterface();
if (Logic.currlogic.cycle.type == "week")
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
new file mode 100644
index 0000000..4176826
--- /dev/null
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AirQuality.cs
@@ -0,0 +1,132 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared;
+namespace HDL_ON.UI.UI2.Intelligence.Automation
+{
+ public class AirQuality : FrameLayout
+ {
+ public AirQuality()
+ {
+ Tag = "Logic";
+ }
+ public void Show()
+ {
+ #region 鐣岄潰甯冨眬
+ LogicView.TopView topView = new LogicView.TopView();
+ topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
+ this.AddChidren(topView.FLayoutView());
+ topView.topNameBtn.TextID = StringId.selectionCondition;
+ topView.Location();
+ topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
+ {
+ RemoveFromParent();
+ };
+
+ FrameLayout viewLayout = new FrameLayout
+ {
+ Y = Application.GetRealHeight(64 + 20),
+ Width = Application.GetRealWidth(LogicView.TextSize.view375),
+ Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 20),
+ BackgroundColor = CSS.CSS_Color.viewMiddle,
+ };
+ this.AddChidren(viewLayout);
+ #endregion
+
+ var list = new List<string> {
+ Language.StringByID(StringId.kongqiyou),
+ Language.StringByID(StringId.kongqiliang),
+ Language.StringByID(StringId.kongqicha),
+ };
+ for (int i = 0; i < list.Count; i++)
+ {
+ LogicView.SelectTypeView view = new LogicView.SelectTypeView();
+ view.frameLayout.Y = Application.GetRealHeight(i * 50);
+ view.btnIcon.Visible = false;
+ view.btnNextIcon.Visible = false;
+ view.btnText.X = Application.GetRealWidth(16);
+ view.btnLine.X = Application.GetRealWidth(16);
+ view.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
+ view.btnText.Text = list[i];
+ view.btnClick.Tag = list[i];
+ viewLayout.AddChidren(view.FLayoutView());
+
+ view.btnClick.MouseUpEventHandler += (sen, e) =>
+ {
+ string value = "";
+ string text = view.btnClick.Tag.ToString();
+ if (text == Language.StringByID(StringId.kongqiyou))
+ {
+ //浼�
+ value = "excellent";
+ }
+ else if (text == Language.StringByID(StringId.kongqiliang))
+ {
+ //鑹�
+ value = "good";
+ }
+ else if (text == Language.StringByID(StringId.kongqicha))
+ {
+ //宸�
+ value = "poor";
+ }
+ AddDic(value);
+ };
+ }
+
+ }
+ /// <summary>
+ /// 灏佽鏁版嵁
+ /// </summary>
+ /// <param name="value"></param>
+ private void AddDic(string value)
+ {
+ Input input = new Input();
+ input.sid = LogicMethod.NewSid();
+ input.condition_type = "9";
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ LogicMethod.dictionary(dic, "key", "air_quality");
+ LogicMethod.dictionary(dic, "comparator", "=");
+ LogicMethod.dictionary(dic, "data_type", "string");
+ LogicMethod.dictionary(dic, "value", value);
+ input.condition.Add(dic);
+ AddCondition(input);
+ }
+ /// <summary>
+ /// 娣诲姞鏉′欢
+ /// </summary>
+ /// <param name="input"></param>
+ private void AddCondition(Input input)
+ {
+ ///璁板綍绱㈠紩鍊�
+ int index = -1;
+ for (var i = 0; i < Logic.currlogic.input.Count; i++)
+ {
+ var condition_type = Logic.currlogic.input[i].condition_type;
+ if (condition_type == "9")
+ {
+ ///鎵惧埌鏍囪绱㈠紩锛岄��鍑哄惊鐜綋
+ index = i;
+ break;
+ }
+ }
+ if (index != -1)
+ {
+ //绉婚櫎鏃ф暟鎹�
+ Logic.currlogic.input.RemoveAt(index);
+ //鏂版暟鎹彃鍏ユ棫鏁版嵁鐨勪綅缃�
+ Logic.currlogic.input.Insert(index, input);
+ }
+ else
+ {
+ Logic.currlogic.input.Add(input);
+ }
+
+ LogicMethod.RemoveAllView();
+ AddLogic addLogic = new AddLogic();
+ MainPage.BasePageView.AddChidren(addLogic);
+ addLogic.Show();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+
+ }
+ }
+}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 214e0fc..0dede77 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -391,6 +391,40 @@
}
}
break;
+ case "9":
+ {
+ inputView.btnIcon.UnSelectedImagePath = "LogicIcon/changesinoutdoor.png";
+ foreach (var dic in dicList)
+ {
+ string strtext = "";
+ string value = dic["value"];
+ switch (value)
+ {
+ case "excellent":
+ {
+ strtext = Language.StringByID(StringId.kongqiyou);
+
+ }
+ break;
+ case "good":
+ {
+
+ strtext = Language.StringByID(StringId.kongqiliang);
+
+ }
+ break;
+ case "poor":
+ {
+ strtext = Language.StringByID(StringId.kongqicha);
+ }
+ break;
+
+ }
+ inputView.btnText.TextID = StringId.kongqizhiliang;
+ inputView.btnState.Text = strtext;
+ }
+ }
+ break;
}
//鍐嶆缂栬緫鏉′欢鐘舵�佺偣鍑讳簨浠�
@@ -549,6 +583,15 @@
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
}
break;
+ case "9":
+ {
+
+ AirQuality airQuality = new AirQuality();
+ MainPage.BasePageView.AddChidren(airQuality);
+ airQuality.Show();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ break;
}
};
///鍒犻櫎鎺т欢
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
new file mode 100644
index 0000000..e183494
--- /dev/null
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InputPushText.cs
@@ -0,0 +1,144 @@
+锘縰sing System;
+using Shared;
+using System.Collections.Generic;
+
+
+namespace HDL_ON.UI.UI2.Intelligence.Automation
+{
+ public class InputPushText : FrameLayout
+ {
+ public InputPushText()
+ {
+ Tag = "Logic";
+ }
+ public Action<PushConfigs> action;
+ public void Show(PushConfigs pushConfigs)
+ {
+
+ this.BackgroundColor = CSS.CSS_Color.viewMiddle;
+ LogicView.TopView topView = new LogicView.TopView();
+ topView.topNameBtn.TextID = StringId.fasongtongzhi;
+ this.AddChidren(topView.FLayoutView());
+
+ FrameLayout viewLayout = new FrameLayout
+ {
+ Y = Application.GetRealHeight(64),
+ Width = Application.GetRealWidth(LogicView.TextSize.view375),
+ Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64 - 76),
+ BackgroundColor = CSS.CSS_Color.viewMiddle,
+ };
+ this.AddChidren(viewLayout);
+ #region 閫氱煡鍐呭
+ LogicView.AddOutputInputTextView addInputTextView = new LogicView.AddOutputInputTextView();
+ addInputTextView.btnIf.TextID = StringId.tongzhineirong;
+ viewLayout.AddChidren(addInputTextView.FLayoutView(46, 12));
+ ///杈撳叆鎺ㄩ�佹枃鏈�
+ EditTextView textBox = new EditTextView//EditText
+ {
+ Y = Application.GetRealHeight(42),
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(343),
+ Height = Application.GetRealHeight(152),
+ TextAlignment = TextAlignment.TopLeft,
+ Radius=(uint)Application.GetRealHeight(12),
+ Text= pushConfigs.pushContent,
+ TextSize = LogicView.TextSize.text14,
+ TextColor= CSS.CSS_Color.textColor,
+ PlaceholderText =Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)",
+ PlaceholderTextColor = CSS.CSS_Color.textCancelColor,
+ BackgroundColor = CSS.CSS_Color.textWhiteColor,
+
+ };
+ viewLayout.AddChidren(textBox);
+ textBox.TextChangeEventHandler += (sender, e) =>
+ {
+ var leng = e.Length;
+ if (leng > 100)
+ {
+ textBox.Text = e.Substring(0,100);
+#if __Android__
+ textBox.SetSelectionEnd();
+#endif
+
+ }
+ pushConfigs.pushContent = textBox.Text.Trim();
+
+ };
+ #endregion
+ #region App鎺ㄩ��
+ LogicView.LogicTypeTitleView appPush = new LogicView.LogicTypeTitleView();
+ appPush.frameLayout.Y = Application.GetRealHeight(206);
+ appPush.frameLayout.Radius = (uint)Application.GetRealHeight(12);
+ appPush.btnText.TextID = StringId.apptuisong;
+ appPush.btnText.X = Application.GetRealWidth(12);
+ viewLayout.AddChidren(appPush.FLayoutView());
+ appPush.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ //瀹氫箟涓�涓眬閮ㄨ处鍙峰垪琛ㄧ敤鏉ヨ褰曢�変腑鏁版嵁;
+ List<string> accountList = new List<string>();
+ Loading loading = new Loading();
+ this.AddChidren(loading);
+ loading.Start();
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ var userList = Send.GetResidenceMemberAccount();
+ for (int i = 0; i < userList.Count; i++)
+ {
+ var user = userList[i];
+ accountList.Add(user.Account);
+ }
+ }
+ catch { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ loading.Hide();
+ if (!string.IsNullOrEmpty(UserInfo.Current.userMobileInfo))
+ {
+ //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+ accountList.Insert(0, UserInfo.Current.userMobileInfo);
+ }
+ else
+ {
+ //榛樿鎺ㄩ�佸綋鍓嶈处鍙�
+ accountList.Insert(0, UserInfo.Current.userEmailInfo);
+ }
+ PublicInterface view = new PublicInterface();
+ view.FrameOrVvList(this, accountList, pushConfigs.pushTarget, StringId.zhanghaoxuanze
+ , (list) =>
+ {
+ pushConfigs.pushTarget = list;
+ });
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ };
+
+ #endregion
+ #region 纭
+ LogicView.SaveView saveView = new LogicView.SaveView();
+ saveView.btnSave.TextID = StringId.queren;
+ saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+ this.AddChidren(saveView.FLayoutView());
+
+ topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
+ {
+
+ action(pushConfigs);
+ RemoveFromParent();
+ };
+ saveView.btnClick.MouseUpEventHandler += (e, sen) =>
+ {
+ action(pushConfigs);
+ RemoveFromParent();
+ };
+ #endregion
+
+ }
+
+ }
+}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
index 6d95d0e..d643f14 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -5,6 +5,7 @@
/// <summary>
/// 閫昏緫瀛樺偍鏁版嵁瀵硅薄
/// </summary>
+ [Serializable]
public class Logic
{
@@ -48,12 +49,17 @@
/// 閫昏緫杈撳嚭鐩爣鏁扮粍
/// </summary>
public List<Output> output = new List<Output>();
-
+ /// <summary>
+ /// 鎺ㄩ�侀厤缃�
+ /// </summary>
+ public List<PushConfigs> pushConfigs = new List<PushConfigs>();
+
}
/// <summary>
/// 鎵ц鍛ㄦ湡瀵硅薄
/// </summary>
+ [Serializable]
public class Cycle
{
/// <summary>
@@ -66,6 +72,7 @@
/// <summary>
/// 杈撳叆鏉′欢瀵硅薄
/// </summary>
+ [Serializable]
public class Input
{
/// <summary>
@@ -85,10 +92,15 @@
/// </summary>
public string condition_type = "";
public List<Dictionary<string, string>> condition = new List<Dictionary<string, string>>();
+ /// <summary>
+ /// 鍦扮悊鍥存爮閰嶇疆
+ /// </summary>
+ public Fence geo_fence = new Fence();
}
/// <summary>
/// 杈撳嚭鐩爣瀵硅薄
/// </summary>
+ [Serializable]
public class Output
{
/// <summary>
@@ -104,7 +116,44 @@
public string target_type = "";
public List<Dictionary<string, string>> status = new List<Dictionary<string, string>>();
}
-
+ /// <summary>
+ /// 鍦扮悊鍥存爮閰嶇疆
+ /// </summary>
+ [Serializable]
+ public class Fence
+ {
+ /// <summary>
+ /// 缁忓害
+ /// </summary>
+ public string longitude = string.Empty;
+ /// <summary>
+ /// 绾害
+ /// </summary>
+ public string latitude = string.Empty;
+ /// <summary>
+ /// 鍗曚綅绫�
+ /// </summary>
+ public string radius = string.Empty;
+ }
+ /// <summary>
+ /// 鎺ㄩ�侀厤缃�
+ /// </summary>
+ [Serializable]
+ public class PushConfigs
+ {
+ /// <summary>
+ /// 鎺ㄩ�佹柟寮�(APP/SMS)
+ /// </summary>
+ public string pushMethod = "APP";
+ /// <summary>
+ /// 鎺ㄩ�佸唴瀹�
+ /// </summary>
+ public string pushContent = string.Empty;
+ /// <summary>
+ /// 鎺ㄩ�佺洰鏍�
+ /// </summary>
+ public List<string> pushTarget = new List<string> {};
+ }
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
index 9360e67..90736a0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputTextView.cs
@@ -35,7 +35,6 @@
frameLayout.Height = Application.GetRealHeight(flHeight);
btnIf.Y= Application.GetRealHeight(btnY);
frameLayout.AddChidren(btnIf);
-
return frameLayout;
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
index 00a669b..c7d0a64 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TopView.cs
@@ -9,7 +9,7 @@
/// <summary>
/// 鏈�涓婇潰鍧梀iew
/// </summary>
- public FrameLayout frameLayout = new FrameLayout
+ public FrameLayout frameLayout = new FrameLayout
{
BackgroundColor = CSS.CSS_Color.viewTop,
Height = Application.GetRealHeight(64),
@@ -22,7 +22,7 @@
{
TextSize = TextSize.text18,
TextColor = CSS.CSS_Color.textColor,
- Width = Application.GetRealWidth(TextSize.view375-60-60),
+ Width = Application.GetRealWidth(TextSize.view375 - 60 - 60),
Height = Application.GetRealHeight(25),
Y = Application.GetRealHeight(30),
X = Application.GetRealWidth(60)
@@ -62,7 +62,7 @@
/// <summary>
/// 璁剧疆鍥炬爣澧炲姞鐑敭澶у皬
/// </summary>
- public Button clickSetBtn = new Button
+ public Button clickSetBtn = new Button
{
X = Application.GetRealWidth(337 - 37),
Width = Application.GetRealWidth(28 + 37),
@@ -82,6 +82,35 @@
return frameLayout;
}
#endregion
+
+ /// <summary>
+ /// 鏄剧ず浣嶇疆
+ /// </summary>
+ public void Location()
+ {
+ //鑾峰彇瀹藉害
+ int widthValue = topNameBtn.GetTextWidth();
+ int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
+ Button locationBtn = new Button
+ {
+ Width = Application.GetRealWidth(18),
+ Height = Application.GetRealWidth(18),
+ X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
+ Y = Application.GetRealHeight(34 + 1),
+ UnSelectedImagePath = "LogicIcon/location.png",
+ };
+ frameLayout.AddChidren(locationBtn);
+
+ Button textBtn = new Button
+ {
+ Height = Application.GetRealHeight(14),
+ Y = Application.GetRealHeight(57),
+ TextSize = LogicView.TextSize.text10,
+ TextColor = CSS.CSS_Color.textCancelColor,
+ Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
+ };
+ frameLayout.AddChidren(textBtn);
+ }
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index fbfc392..9a56c61 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -123,7 +123,7 @@
/// <summary>
/// 鎸�+璺宠浆鍒伴�昏緫鐣岄潰鐨勬柟娉�
/// </summary>
- public static void SkipAddLogicPage()
+ public void SkipAddLogicPage()
{
Logic.currlogic = new Logic();
var addLogic = new AddLogic();
@@ -244,7 +244,7 @@
if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "")
{
var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data);
- var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date);
+ var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date);
for (int i = 0; i < dateList.Count; i++)
{
//娣诲姞閫昏緫ID
@@ -478,12 +478,12 @@
}
}
}
- class Date
+ class LogicData
{
/// <summary>
/// 浜戠鍞竴id
/// </summary>
- public string userLogicId = "";
+ public string userLogicId = "";
/// <summary>
/// 缃戝叧id
/// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
index 536cc06..18ec0c8 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/PublicInterface.cs
@@ -388,6 +388,157 @@
}
+ /// <summary>
+ /// 瓒呭嚭5涓厓绱犺鐢ㄦ粦鍔ㄦ帶浠�
+ /// </summary>
+ /// <param name="frame">鏄剧ず鍦ㄥ摢涓晫闈㈢殑鐖舵帶浠�</param>
+ /// <param name="list">鏄剧ず鏁版嵁婧�</param>
+ /// <param name="stateList">涔嬪墠鐘舵�佹暟鎹簮</param>
+ /// <param name="titleText">鏍囬</param>
+ /// <param name="action">杩斿洖鍊肩储寮曞��</param>
+ public void FrameOrVvList(FrameLayout frame, List<string> list,List<string>stateList, int titleText, Action<List<string>> action)
+ {
+
+ int line = 0;
+ if (list.Count == 0 || list.Count > 5)
+ {
+ //瓒呭嚭5涓彧鑳介粯璁�5涓�;
+ line = 5;
+ }
+ else
+ {
+ line = list.Count;
+ }
+
+ FrameLayout frameLayout = new FrameLayout
+ {
+ BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
+ };
+ frame.AddChidren(frameLayout);
+
+ LogicView.DateView view = new LogicView.DateView();
+ view.btnTitle.TextID = titleText;
+ view.FLayoutView(frameLayout, line);
+ view.btnCancel.MouseUpEventHandler += (sender, e) =>
+ {
+ //绉婚櫎fLayout鐣岄潰
+ frameLayout.RemoveFromParent();
+ };
+ //灏忎簬5浣跨敤
+ FrameLayout frameL = new FrameLayout
+ {
+ Y = Application.GetRealHeight(56),
+ Height = Application.GetRealHeight(50 * line),
+ };
+ //澶т簬5浣跨敤
+ VerticalRefreshLayout verticalRefresh = new VerticalRefreshLayout
+ {
+ Y = Application.GetRealHeight(56),
+ Height = Application.GetRealHeight(50 * 5),
+
+ };
+ verticalRefresh.BeginHeaderRefreshingAction += () =>
+ {
+ //鍏抽棴鍒锋柊View锛�
+ verticalRefresh.EndHeaderRefreshing();
+ };
+
+ if (list.Count == 0)
+ {
+ //Button btnTipNot = new Button
+ //{
+ // X = Application.GetRealWidth(93),
+ // Y = Application.GetRealHeight(80),
+ // Width = Application.GetRealWidth(158),
+ // Height = Application.GetRealWidth(158),
+ // UnSelectedImagePath = "TipNot.png",
+
+ //};
+ //view.frameLayout.AddChidren(btnTipNot);
+
+ //Button btnTipNotText = new Button()
+ //{
+ // Y = btnTipNot.Bottom + Application.GetRealHeight(16),
+ // Height = Application.GetRealHeight(20),
+ // TextID = StringId.secnenull,
+ // TextColor = CSS.CSS_Color.textColor,
+ // TextSize = LogicView.TextSize.text14,
+ // TextAlignment = TextAlignment.Center,
+ //};
+ //view.frameLayout.AddChidren(btnTipNotText);
+ }
+ else if (list.Count > 0 && list.Count <= 5)
+ {
+ view.frameLayout.AddChidren(frameL);
+ }
+ else if (list.Count > 5)
+ {
+ view.frameLayout.AddChidren(verticalRefresh);
+
+ }
+ List<string> selecetdList = new List<string>();
+ for (int i = 0; i < list.Count; i++)
+ {
+ string strName = list[i];
+ LogicView.CheckView checkView = new LogicView.CheckView();
+ checkView.btnText.TextSize = LogicView.TextSize.text14;
+ if (list.Count <= 5)
+ {
+ checkView.frameLayout.Y = Application.GetRealWidth(i * 50);
+ frameL.AddChidren(checkView.FLayoutView());
+ if (line - 1 == i)
+ {
+ checkView.btnLine.BackgroundColor = CSS.CSS_Color.view;
+ }
+ }
+ else
+ {
+ verticalRefresh.AddChidren(checkView.FLayoutView());
+ }
+ if (stateList.Contains(strName)) {
+ checkView.btnClick.IsSelected = true;
+ checkView.btnCheckIcon.IsSelected = true;
+ selecetdList.Add(strName);
+ }
+ checkView.btnText.Text = strName;
+ checkView.btnClick.Tag = strName;//鏍囪
+ //鐐瑰嚮浜嬩欢
+ checkView.btnClick.MouseUpEventHandler += (sender1, e1) =>
+ {
+ checkView.btnClick.IsSelected = !checkView.btnClick.IsSelected;
+ checkView.btnCheckIcon.IsSelected = checkView.btnClick.IsSelected;
+ if (checkView.btnClick.IsSelected)
+ {
+ if (!selecetdList.Contains(checkView.btnClick.Tag.ToString()))
+ {
+ selecetdList.Add(checkView.btnClick.Tag.ToString());
+ }
+
+ }
+ else
+ {
+ if (selecetdList.Contains(checkView.btnClick.Tag.ToString()))
+ {
+ selecetdList.Remove(checkView.btnClick.Tag.ToString());
+ }
+ }
+ };
+
+ }
+ view.btnConfirm.MouseUpEventHandler += (sender1, e1) =>
+ {
+ if (selecetdList.Count == 0)
+ {
+ return;
+ }
+ //鍒楄〃绱㈠紩鍊�
+ action(selecetdList);
+ //绉婚櫎fLayout鐣岄潰
+ frameLayout.RemoveFromParent();
+ };
+
+ }
+
/// <summary>
/// 鑾峰彇鐣岄潰鍒楄〃
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index afb33d1..838ba08 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -4,11 +4,33 @@
using HDL_ON.DAL.Server;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
+using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
public class Send
{
+
+ /// <summary>
+ /// 璋冪敤鑾峰彇浣忓畢瀛愯处鍙峰垪琛�
+ /// </summary>
+ public static List<ResidenceMemberInfo> GetResidenceMemberAccount()
+ {
+
+ var responePack = new HttpServerRequest().GetResidenceMemberAccount();
+ if (responePack.Code == StateCode.SUCCESS)
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString());
+ }
+ //澶辫触
+ else
+ {
+ //鎻愮ず
+ IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
+ }
+ return new List<ResidenceMemberInfo>();
+ }
+
/// <summary>
/// 鑾峰彇閫昏緫ID鍒楄〃
/// </summary>
@@ -105,6 +127,25 @@
outputArray.Add(outputTypeJOb);
}
+ var pushConfigsArray = new JArray { };
+ if (logic.pushConfigs.Count > 0)
+ { //聽鎺ㄩ�佹枃鏈�
+ foreach (var pushConfig in logic.pushConfigs)
+ {
+
+ var pushConfigJob = new JObject { };
+ pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
+ pushConfigJob.Add("pushContent", pushConfig.pushContent);
+ var accountArray = new JArray { };
+ foreach (var account in pushConfig.pushTarget)
+ {
+ accountArray.Add(account);
+ }
+ pushConfigJob.Add("pushTarget", accountArray);
+ pushConfigsArray.Add(pushConfigJob);
+ }
+ }
+
var logicjArray = new JArray { };
var logicIfon = new JObject { };
logicIfon.Add("sid", logic.sid);
@@ -115,6 +156,7 @@
logicIfon.Add("cycle", cycleJObject);
logicIfon.Add("input", inputArray);
logicIfon.Add("output", outputArray);
+ logicIfon.Add("pushConfigs", pushConfigsArray);
logicjArray.Add(logicIfon);
var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add);
@@ -192,6 +234,25 @@
outputArray.Add(outputTypeJOb);
}
+ var pushConfigsArray = new JArray { };
+ if (logic.pushConfigs.Count > 0)
+ { //聽鎺ㄩ�佹枃鏈�
+ foreach (var pushConfig in logic.pushConfigs)
+ {
+
+ var pushConfigJob = new JObject { };
+ pushConfigJob.Add("pushMethod", pushConfig.pushMethod);
+ pushConfigJob.Add("pushContent", pushConfig.pushContent);
+ var accountArray = new JArray { };
+ foreach (var account in pushConfig.pushTarget)
+ {
+ accountArray.Add(account);
+ }
+ pushConfigJob.Add("pushTarget", accountArray);
+ pushConfigsArray.Add(pushConfigJob);
+ }
+ }
+
var logicjArray = new JArray { };
var logicIfon = new JObject { };
logicIfon.Add("userLogicId", logic.userLogicId);
@@ -203,6 +264,8 @@
logicIfon.Add("cycle", cycleJObject);
logicIfon.Add("input", inputArray);
logicIfon.Add("output", outputArray);
+ logicIfon.Add("pushConfigs", pushConfigsArray);
+
logicjArray.Add(logicIfon);
var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
index 2d42405..7d58572 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -18,29 +18,7 @@
topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
this.AddChidren(topView.FLayoutView());
topView.topNameBtn.Text = titelText;
- //鑾峰彇瀹藉害
- int widthValue = topView.topNameBtn.GetTextWidth();
- int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
- Button locationBtn = new Button
- {
- Width = Application.GetRealWidth(18),
- Height = Application.GetRealWidth(18),
- X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
- Y = Application.GetRealHeight(34 + 1),
- UnSelectedImagePath = "LogicIcon/location.png",
-
- };
- topView.frameLayout.AddChidren(locationBtn);
-
- Button textBtn = new Button
- {
- Height = Application.GetRealHeight(14),
- Y = Application.GetRealHeight(57),
- TextSize = LogicView.TextSize.text10,
- TextColor = CSS.CSS_Color.textCancelColor,
- Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
- };
- topView.frameLayout.AddChidren(textBtn);
+ topView.Location();
topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
{
RemoveFromParent();
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
index 53bba3f..e11c983 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Weather.cs
@@ -46,6 +46,15 @@
weatherView.btnText.TextID = StringId.tianqibianhua;
viewLayout.AddChidren(weatherView.FLayoutView());
+ //绌烘皵璐ㄩ噺
+ LogicView.SelectTypeView kongqiViewk = new LogicView.SelectTypeView();
+ kongqiViewk.frameLayout.Y = weatherView.frameLayout.Bottom;
+ kongqiViewk.btnIcon.Visible = false;
+ kongqiViewk.btnText.X = Application.GetRealWidth(16);
+ kongqiViewk.btnLine.X = Application.GetRealWidth(16);
+ kongqiViewk.btnLine.Width = Application.GetRealWidth(375 - 16 - 16);
+ kongqiViewk.btnText.TextID = StringId.kongqizhiliang;
+ viewLayout.AddChidren(kongqiViewk.FLayoutView());
#endregion
#region 鎵�鏈夌偣鍑讳簨浠�
@@ -64,7 +73,14 @@
weatherCondition.Show();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
};
-
+ //绌烘皵璐ㄩ噺
+ kongqiViewk.btnClick.MouseUpEventHandler += (sen, e) => {
+ AirQuality airQuality = new AirQuality();
+ MainPage.BasePageView.AddChidren(airQuality);
+ airQuality.Show();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+
#endregion
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
index c8a71b6..fbe50e2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/WeatherCondition.cs
@@ -16,29 +16,7 @@
topView.frameLayout.Height = Application.GetRealHeight(64 + 20);
this.AddChidren(topView.FLayoutView());
topView.topNameBtn.TextID = StringId.selectionCondition;
- //鑾峰彇瀹藉害
- int widthValue = topView.topNameBtn.GetTextWidth();
- int textWidth = (Application.GetRealWidth(255) - widthValue) / 2;
- Button locationBtn = new Button
- {
- Width = Application.GetRealWidth(18),
- Height = Application.GetRealWidth(18),
- X = Application.GetRealWidth(60 + 4) + textWidth + widthValue,
- Y = Application.GetRealHeight(34 + 1),
- UnSelectedImagePath = "LogicIcon/location.png",
-
- };
- topView.frameLayout.AddChidren(locationBtn);
-
- Button textBtn = new Button
- {
- Height = Application.GetRealHeight(14),
- Y = Application.GetRealHeight(57),
- TextSize = LogicView.TextSize.text10,
- TextColor = CSS.CSS_Color.textCancelColor,
- Text = "骞夸笢骞垮窞甯傜暘绂哄尯鐭虫ゼ闀�",
- };
- topView.frameLayout.AddChidren(textBtn);
+ topView.Location();
topView.clickBackBtn.MouseUpEventHandler += (e, sen) =>
{
RemoveFromParent();
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 73b8da7..00152c0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -606,7 +606,8 @@
else
{
//璺宠浆鍒伴�昏緫鐣岄潰
- UI2.Intelligence.Automation.MainView.SkipAddLogicPage();
+ UI2.Intelligence.Automation.MainView logicMainView = new UI2.Intelligence.Automation.MainView();
+ logicMainView.SkipAddLogicPage();
}
};
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
index e70db56..3271e9e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -4,7 +4,6 @@
using Shared;
using HDL_ON.Stan;
using ZXing.QrCode.Internal;
-using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
@@ -348,13 +347,13 @@
TextAlignment = TextAlignment.CenterLeft,
TextID = StringId.baolu30,
};
- bjFl.AddChidren(regionBtn);
+ //bjFl.AddChidren(regionBtn);
var vv = new VerticalRefreshLayout
{
X = Application.GetRealWidth(16),
- Y = Application.GetRealHeight(58 + 17),
- Height = Application.GetRealHeight(458 - 17),
+ Y = Application.GetRealHeight(58),
+ Height = Application.GetRealHeight(458),
Width = Application.GetRealWidth(295),
};
bjFl.AddChidren(vv);
@@ -394,7 +393,6 @@
frameLayout60.btnTime.Text = getTime(call.callTime);
///鍛煎彨鐘舵�侊紙0锛氭湭鎺ワ紱1锛氬凡鎺ワ紱2锛氭嫆鎺ワ級锛涙槸鍚﹀紑閿侊紱
frameLayout60.btnStateText.Text = getStateText(call.callStatus) + "," + getUnlockText(call.isUnlock);
-
}
}
@@ -461,7 +459,10 @@
{
var utcTime = Convert.ToDateTime(str);
var dateTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
- return dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
+ // var monday = dateTime.ToString("MM") + Language.StringByID(StringId.month) + dateTime.ToString("dd") + Language.StringByID(StringId.day);
+ var monday = dateTime.ToString("MM") + "/" + dateTime.ToString("dd");
+ var time = dateTime.ToString("HH") + ":" + dateTime.ToString("mm");
+ return monday + " " + time;
}
/// <summary>
/// 鑾峰彇鍛煎彨鐘舵�佹枃鏈�
@@ -498,16 +499,14 @@
/// <returns></returns>
private string getUnlockText(bool if_bool)
{
- string s = "";
if (if_bool)
{
- s = Language.StringByID(StringId.yikaisuo);
+ return Language.StringByID(StringId.yikaisuo);
}
else
{
- s = Language.StringByID(StringId.weikaisuo);
+ return Language.StringByID(StringId.weikaisuo);
}
- return s;
}
/// <summary>
/// 鑾峰彇uuid
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
index d4ed6a6..5a8a945 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
@@ -90,13 +90,29 @@
var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST");
if (!string.IsNullOrEmpty(str))
{
- var json = JObject.Parse(str);
- if (json != null)
+ if (str.Contains("status"))
{
- var stateCode = json["status"].ToString();
- if (stateCode == "0")
+ //var json = JObject.Parse(str);
+ //if (json != null)
+ //{
+ // var stateCode = json["status"].ToString();
+ // if (stateCode == "0")
+ // {
+ // if_bool = true;
+ // }
+ //}
+ if_bool = true;
+ }
+ else {
+ var json = JObject.Parse(str);
+ if (json != null)
{
- if_bool = true;
+ var stateCode = json["desc"].ToString();
+ Application.RunOnMainThread(() =>
+ {
+ //閿欒鎻愮ず
+ new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode);
+ });
}
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
index fa8d245..53c9190 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout50.cs
@@ -8,10 +8,10 @@
/// <summary>
/// 涓绘帶浠禫iew
/// </summary>
- public FrameLayout frameLayout = new FrameLayout
+ public RowLayout frameLayout = new RowLayout
{
Height = Application.GetRealHeight(50),
- // BackgroundColor = CSS.CSS_Color.view,
+ LineColor = CSS.CSS_Color.view,
};
/// <summary>
/// 鏂囨湰鎻忚堪
@@ -36,7 +36,7 @@
/// View鐨勬柟娉�
/// </summary>
/// <returns></returns>
- public FrameLayout FLayoutView()
+ public RowLayout FLayoutView()
{
frameLayout.AddChidren(btnText);
frameLayout.AddChidren(btnClick);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
index 9eb9fc4..dd1c231 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/FrameLayout60.cs
@@ -8,10 +8,10 @@
/// <summary>
/// 涓绘帶浠禫iew
/// </summary>
- public FrameLayout frameLayout = new FrameLayout
+ public RowLayout frameLayout = new RowLayout
{
Height = Application.GetRealHeight(60),
- //BackgroundColor = CSS.CSS_Color.view,
+ LineColor = CSS.CSS_Color.view,
};
/// <summary>
@@ -37,10 +37,10 @@
Y = Application.GetRealHeight(10),
Width = Application.GetRealWidth(120),
Height = Application.GetRealHeight(20),
- TextColor = CSS.CSS_Color.textColor,
+ TextColor = CSS.CSS_Color.textCancelColor,
TextSize = TextSize.text14,
TextAlignment=TextAlignment.CenterLeft,
- Text = "15:01",
+ //Text = "15:01",
};
/// <summary>
/// 鐘舵�佹枃鏈�
@@ -53,7 +53,6 @@
TextSize = TextSize.text12,
TextColor = CSS.CSS_Color.textCancelColor,
TextAlignment = TextAlignment.CenterLeft,
- Text = "宸叉帴鍚�, 宸插紑閿�",
};
@@ -88,7 +87,7 @@
/// View鐨勬柟娉�
/// </summary>
/// <returns></returns>
- public FrameLayout FLayoutView()
+ public RowLayout FLayoutView()
{
frameLayout.AddChidren(btnText);
frameLayout.AddChidren(btnTime);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
index 42bcf97..814a7ed 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
@@ -125,12 +125,12 @@
//瀵嗙爜
Button btnpaw = new Button()
{
- X=Application.GetRealWidth(100),
+ X=Application.GetRealWidth(95),
Y = Application.GetRealHeight(62),
Height = Application.GetRealHeight(32),
- Width = Application.GetRealWidth(82),
+ Width = Application.GetRealWidth(82+5),
TextColor = MusicColor.SelectedColor,
- TextSize =24,
+ TextSize =20,//24
TextAlignment = TextAlignment.Center,
IsBold = true,
Text = str1,
--
Gitblit v1.8.0