From 64dbbfe1d6488635e160189a704afccffc7d34d0 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 07 十二月 2020 11:33:06 +0800
Subject: [PATCH] Merge branch 'WJC'
---
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/CheckView.cs | 73 ++++++++++++
HDL-ON_Android/Assets/Language.ini | 7 +
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm | 0
HDL_ON/HDL_ON.projitems | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 91 +++++++++++++++
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 2
/dev/null | 130 ---------------------
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs | 8 -
HDL_ON/Entity/Enumerative/MyEnum.cs | 9 +
HDL-ON_Android/Resources/Resource.designer.cs | 3
.vs/HDL_APP_Project/xs/.DS_Store | 0
HDL_ON/Common/R.cs | 7 +
.vs/HDL_APP_Project/xs/sqlite3/storage.ide | 0
.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 0
14 files changed, 189 insertions(+), 143 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/.DS_Store b/.vs/HDL_APP_Project/xs/.DS_Store
new file mode 100644
index 0000000..89d1edb
--- /dev/null
+++ b/.vs/HDL_APP_Project/xs/.DS_Store
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
index 52efe68..a4d5952 100644
--- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
new file mode 100644
index 0000000..2f2c603
--- /dev/null
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-shm
Binary files differ
diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
new file mode 100644
index 0000000..9d4ce8e
--- /dev/null
+++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal
Binary files differ
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index e79a894..cbda4ec 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -491,6 +491,13 @@
7054=鏆傚仠
7055=浜害
7056=鐧惧垎姣�
+7057=妯″紡
+7058=鍒跺喎
+7059=鍒剁儹
+7060=鑷姩
+7061=闄ゆ箍
+
+
diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs
index 9acaeea..7562ddb 100644
--- a/HDL-ON_Android/Resources/Resource.designer.cs
+++ b/HDL-ON_Android/Resources/Resource.designer.cs
@@ -2,6 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -14,7 +15,7 @@
{
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index d7c9a07..3a80665 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -484,8 +484,13 @@
public const int stop= 7054;
public const int brightnesLogic= 7055;
public const int percentum = 7056;
+ public const int modeLogic = 7057;
+ public const int coolLogic= 7058;
+ public const int heatingLogic = 7059;
+ public const int autoLogic = 7060;
+ public const int dehumidifyLogic = 7061;
-
+
#region LE鏂板
/// <summary>
diff --git a/HDL_ON/Entity/Enumerative/MyEnum.cs b/HDL_ON/Entity/Enumerative/MyEnum.cs
index a4db6f7..7ca71d6 100644
--- a/HDL_ON/Entity/Enumerative/MyEnum.cs
+++ b/HDL_ON/Entity/Enumerative/MyEnum.cs
@@ -63,11 +63,18 @@
Dimmer = 0x0202,
/// <summary>
/// 鑹叉俯
+ /// cct
/// </summary>
ColorTemperature = 0x0203,
RGB = 0x0204,
Curtain = 0x0301,
+ /// <summary>
+ /// 寮�鍚堝笜
+ /// </summary>
MotorCurtain = 0x0303,
+ /// <summary>
+ /// 鍗峰笜
+ /// </summary>
RollingShutter = 0x0304,
AC = 0x0401,
FloorHeating = 0x0402,
@@ -96,7 +103,7 @@
/// <summary>
/// 寮�鍚堝笜
/// </summary>
- TrietexCurtain = 0x0104,
+ TrietexCurtain = 0x0104,
/// <summary>
/// 鍗峰笜
/// </summary>
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 8054b2e..147ab30 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -251,7 +251,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\ModeView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)UI\" />
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/CheckView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/CheckView.cs
new file mode 100644
index 0000000..91144ac
--- /dev/null
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/CheckView.cs
@@ -0,0 +1,73 @@
+锘縰sing System;
+using Shared;
+namespace HDL_ON.UI.UI2.Intelligence.Automation.LogicView
+{
+ public class CheckView
+ {
+ /// <summary>
+ /// 涓绘帶浠禫iew
+ /// </summary>
+ public FrameLayout frameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(50),
+ };
+
+ /// <summary>
+ /// 鏂囨湰鎻忚堪
+ /// </summary>
+ public Button btnText = new Button
+ {
+ TextSize = TextSize.text16,
+ Width = Application.GetRealWidth(130),
+ Height = Application.GetRealHeight(20),
+ TextColor = CSS.CSS_Color.textColor,
+ X = Application.GetRealWidth(20),
+ Gravity = Gravity.CenterVertical,
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+
+
+ /// <summary>
+ /// 鍥炬爣
+ /// </summary>
+ public Button btnCheckIcon = new Button
+ {
+ Width = Application.GetMinRealAverage(28),
+ Height = Application.GetMinRealAverage(28),
+ UnSelectedImagePath = "LogicIcon/weekoff.png",
+ SelectedImagePath = "LogicIcon/weekon.png",
+ X = Application.GetRealWidth(303),
+ Gravity=Gravity.CenterVertical,
+ };
+
+ /// <summary>
+ /// 绾�
+ /// </summary>
+ public Button btnLine = new Button
+ {
+ Width = Application.GetRealWidth(303),
+ X = Application.GetRealWidth(20),
+ Height = 1,
+ BackgroundColor = CSS.CSS_Color.viewLine,
+
+ };
+
+ public Button btnClick = new Button
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ /// <summary>
+ /// View鐨勬柟娉�
+ /// </summary>
+ /// <returns></returns>
+ public FrameLayout FLayoutView()
+ {
+ frameLayout.AddChidren(btnText);
+ frameLayout.AddChidren(btnCheckIcon);
+ btnLine.Y = frameLayout.Height - 1;
+ frameLayout.AddChidren(btnLine);
+ frameLayout.AddChidren(btnClick);
+ return frameLayout;
+ }
+ }
+}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs
index 69dbc71..047aae1 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/DateView.cs
@@ -69,14 +69,6 @@
frameLayout.AddChidren(btnCancel);
frameLayout.AddChidren(btnConfirm);
fLayout.AddChidren(frameLayout);
- ////鐣岄潰鐐瑰嚮浜嬩欢
- //fLayout.MouseUpEventHandler += (sender, e1) =>
- //{
- // //绉婚櫎fLayout鐣岄潰
- // fLayout.RemoveFromParent();
- //};
- //鍙栨秷鐐瑰嚮浜嬩欢
-
}
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/ModeView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/ModeView.cs
deleted file mode 100644
index 0a33145..0000000
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/ModeView.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-锘縰sing System;
-using Shared;
-using System.Collections.Generic;
-namespace HDL_ON.UI.UI2.Intelligence.Automation.LogicView
-{
- public class ModeView
- {
- /// <summary>
- /// 涓绘帶浠禫iew
- /// </summary>
- public FrameLayout frameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(50),
- BackgroundColor = CSS.CSS_Color.view,
- };
-
- /// <summary>
- /// 鏂囨湰鎻忚堪
- /// </summary>
- public Button btnText = new Button
- {
- TextSize = TextSize.text14,
- Width = Application.GetRealWidth(130),
- Height = Application.GetRealHeight(20),
- TextColor = CSS.CSS_Color.textColor,
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- TextAlignment = TextAlignment.CenterLeft,
- };
-
- /// <summary>
- /// 鍥炬爣
- /// </summary>
- public Button btnClickIcon = new Button
- {
- X = Application.GetRealWidth(303),
- Width = Application.GetMinRealAverage(28),
- Height = Application.GetMinRealAverage(28),
- UnSelectedImagePath = "LogicIcon/weekoff.png",
- SelectedImagePath = "LogicIcon/weekon.png",
- Gravity = Gravity.CenterVertical,
- };
-
- /// <summary>
- /// 绾�
- /// </summary>
- public Button btnLine = new Button
- {
- Width = Application.GetRealWidth(343),
- X = Application.GetRealWidth(16),
- Height = 1,
- BackgroundColor = CSS.CSS_Color.viewLine,
-
- };
-
- public Button btnClick = new Button
- {
- Height = Application.GetRealHeight(50),
- };
- /// <summary>
- /// View鐨勬柟娉�
- /// </summary>
- /// <param name="fLayout"></param>
- /// <param name="list"></param>
- public void FLayoutView(FrameLayout fLayout, List<string> list)
- {
- /// 涓绘帶浠�
- FrameLayout frameLayout1 = new FrameLayout
- {
- Y = Application.GetRealHeight(460),
- Height = Application.GetRealHeight(56 + 150),
- Width = Application.GetRealWidth(343),
- X = Application.GetRealWidth(16),
- BackgroundColor = CSS.CSS_Color.view,
- Radius = (uint)Application.GetRealHeight(12),
- };
- /// 鏍囬Btn
- Button btnTitle = new Button
- {
- TextID = StringId.timeHorizon,
- TextSize = TextSize.text16,
- TextColor = CSS.CSS_Color.textColor,
- IsBold = true,
- Width = Application.GetRealWidth(343 - (52 + 4 + 10) * 2),
- Height = Application.GetRealHeight(22),
- Y = Application.GetRealHeight(17),
- X = Application.GetRealWidth(52 + 4 + 10)
- };
- /// 鍙栨秷Btn
- Button btnCancel = new Button
- {
- TextID = StringId.cancelSelected,
- TextSize = TextSize.text14,
- TextColor = CSS.CSS_Color.textCancelColor,
- Width = Application.GetRealWidth(52),
- Height = Application.GetRealHeight(32),
- Y = Application.GetRealHeight(10),
- X = Application.GetRealWidth(4)
- };
- /// 纭畾Btn
- Button btnConfirm = new Button
- {
- TextID = StringId.confirmSelected,
- TextSize = TextSize.text14,
- TextColor = CSS.CSS_Color.textConfirmColor,
- Width = Application.GetRealWidth(52),
- Height = Application.GetRealHeight(32),
- X = Application.GetRealWidth(343 - 4 - 52),
- Y = Application.GetRealHeight(10),
- };
- fLayout.AddChidren(frameLayout);
- frameLayout1.Y = Application.GetRealHeight(667 - 20 - 56 - 50 * list.Count);
- frameLayout1.Height = Application.GetRealHeight(56 + 50 * list.Count);
- frameLayout1.AddChidren(btnTitle);
- frameLayout1.AddChidren(btnCancel);
- frameLayout1.AddChidren(btnConfirm);
- for (int j = 0; j < list.Count; j++)
- {
- frameLayout.Y = Application.GetRealHeight(56 + 50 * j);
- frameLayout1.AddChidren(frameLayout);
- frameLayout.AddChidren(btnText);
- frameLayout.AddChidren(btnClickIcon);
- btnLine.Y = frameLayout.Height - 1;
- frameLayout.AddChidren(btnLine);
- frameLayout.AddChidren(btnClick);
- btnClick.Tag = list[j];
- }
- }
- }
-}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 93c60b5..ea91731 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -231,7 +231,7 @@
List<string> logicIdList = new List<string>();
//鑾峰彇閫昏緫ID鍒楄〃
var idStr = Send.getLogicIdList();
- if (idStr.Code == "0" && idStr.Data != null)
+ 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);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index c706c8c..fe144d9 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -81,12 +81,84 @@
LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView();
curtainSwitchView.btnText.TextID = StringId.switchLogic;
fLayout.AddChidren(curtainSwitchView.FLayoutView());
+
+ ///妯″紡
+ LogicView.FunTypeView acModehView = new LogicView.FunTypeView();
+ acModehView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom;
+ acModehView.btnText.TextID = StringId.modeLogic;
+ fLayout.AddChidren(acModehView.FLayoutView());
#endregion
#region 鐐瑰嚮浜嬩欢
///寮�鍏崇偣鍑讳簨浠�
curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
{
SwitchViewMethod(device, curtainSwitchView.btnState, 2);
+ };
+ acModehView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+
+ List<string> modeStr = new List<string> {
+ Language.StringByID(StringId.coolLogic),
+ Language.StringByID(StringId.heatingLogic),
+ Language.StringByID(StringId.autoLogic),
+ Language.StringByID(StringId.dehumidifyLogic),
+ };
+ FrameLayout frame = new FrameLayout
+ {
+ BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
+ };
+ this.AddChidren(frame);
+ LogicView.DateView modeView = new LogicView.DateView();
+ modeView.btnTitle.TextID = StringId.modeLogic;
+ modeView.FLayoutView(frame, modeStr.Count);
+ modeView.btnCancel.MouseUpEventHandler += (sender2, e2) =>
+ {
+ frame.RemoveFromParent();
+ };
+ ///瀹氫箟涓�涓狟tn璁板綍閫変腑鐘舵��
+ Button checkBtn = new Button{
+ Tag = "unknown",
+ };
+ for (int i = 0; i < modeStr.Count; i++)
+ {
+ LogicView.CheckView modeTypeView = new LogicView.CheckView();
+ modeTypeView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i);
+ modeView.frameLayout.AddChidren(modeTypeView.FLayoutView());
+ modeTypeView.btnText.Text = modeStr[i];
+ modeTypeView.btnClick.Tag = modeStr[i];//鏍囪
+
+ if (acModehView.btnState.Text == modeStr[i])
+ {
+ //鏄剧ず涔嬪墠鐨勯�変腑鐘舵��
+ checkBtn.IsSelected = false;
+ modeTypeView.btnCheckIcon.IsSelected = true;
+ checkBtn = modeTypeView.btnCheckIcon;
+ checkBtn.Tag = modeTypeView.btnClick.Tag.ToString();
+ }
+ //鏄熸湡鐨勭偣鍑讳簨浠�
+ modeTypeView.btnClick.MouseUpEventHandler += (sender1, e1) =>
+ {
+ checkBtn.IsSelected = false;
+ modeTypeView.btnCheckIcon.IsSelected = true;
+ checkBtn = modeTypeView.btnCheckIcon;
+ checkBtn.Tag = modeTypeView.btnClick.Tag.ToString();
+ };
+
+ }
+ modeView.btnConfirm.MouseUpEventHandler += (sender1,e1) => {
+ if (checkBtn.Tag.ToString()== "unknown") {
+ return;
+ }
+
+ Dictionary<string, string> dic = new Dictionary<string, string>();
+ LogicMethod.dictionary(dic, "key", "mode");
+ string keyVlaue = "mode";
+ LogicMethod.dictionary(dic, "value", GetModeValueString(checkBtn.Tag.ToString()));
+ acModehView.btnState.Text = checkBtn.Tag.ToString();
+ selectedState = device.functionType + "_mode";
+ AddDictionaryData(dicSateteList, keyVlaue, dic);
+ RemView(frame);
+ };
};
if (edit)
{
@@ -140,6 +212,24 @@
};
#endregion
+ }
+ private string GetModeValueString(string text)
+ {
+ string modeStr = "";
+ if (text == Language.StringByID(StringId.coolLogic))
+ {
+ modeStr = "cool";
+ }
+ else if (text == Language.StringByID(StringId.heatingLogic)) {
+ modeStr = "heat";
+ }
+ else if (text == Language.StringByID(StringId.autoLogic)) {
+ modeStr = "auto";
+ }
+ else if (text == Language.StringByID(StringId.dehumidifyLogic)) {
+ modeStr = "dry";
+ }
+ return modeStr;
}
/// <summary>
///寮�鍏�=鐣岄潰
@@ -575,5 +665,6 @@
}
+
}
}
--
Gitblit v1.8.0