From f9ed76e5022a2850eb2533d969b052ef170bf487 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 31 十月 2023 14:14:48 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into wjc
---
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL-ON_Android/Assets/Language.ini | 41 +++++-
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 6
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 15 ++
HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs | 9 +
HDL-ON_iOS/AppDelegate.cs | 7
HDL-ON_Android/SplashActivity.cs | 24 ++--
HDL-ON_iOS/Resources/Language.ini | 41 +++++-
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 2
HDL_ON/DAL/Server/HttpUtil.cs | 15 +
HDL-ON_Android/Resources/Resource.designer.cs | 2
HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 6
HDL_ON/Common/OnAppConfig.cs | 16 ++
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs | 6
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 93 ++++----------
HDL_ON/DAL/Server/HttpServerRequest.cs | 14 ++
SiriIntents/Server/HttpUtil.cs | 23 +++
SiriKit/Data/SceneDateManager.cs | 38 ++---
18 files changed, 219 insertions(+), 141 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index e4f7f4b..94d0558 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1153,7 +1153,7 @@
7098=Sunny day
7099=Cloudy
7100=Tain
-7101=*Please set the value in this range (1 ~ 100).
+7101=*Please set the value in this range ({0} ~ {1}).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 36 ~ 75ug/m3
@@ -2553,7 +2553,7 @@
7098=鏅村ぉ
7099=澶氫簯
7100=涓嬮洦
-7101=*璇峰湪杩欎釜鑼冨洿(1~100)璁剧疆鍊笺��
+7101=*璇峰湪杩欎釜鑼冨洿({0}~{1})璁剧疆鍊笺��
7102=杩樻病鏈夎缃�笺��
7103=浼�:0~35ug/m鲁
7104=鑹�:36~75ug/m鲁
@@ -3941,7 +3941,7 @@
7098=小芯谢薪械褔薪褘泄 写械薪褜
7099=袨斜谢邪褔薪芯
7100=袧械锌芯谐芯写邪
-7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 (1 ~ 100).
+7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 ({0} ~ {1}).
7102=袟邪写邪薪薪芯械 蟹薪邪褔械薪懈械 芯褌褋褍褌褋褌胁褍械褌.
7103=袨褌谢懈褔薪芯: 0 ~ 35 屑泻谐/屑3
7104=啸芯褉芯褕芯: 36 ~ 75 屑泻谐/屑3
@@ -5322,7 +5322,7 @@
7098=D铆a soleado
7099=Nublado
7100=
-7101=*Establezca el valor en este rango (1 ~ 100).
+7101=*Establezca el valor en este rango ({0} ~ {1}).
7102=Sin valor establecido
7103=Excelente: 0 ~ 35ug/m3
7104=Bueno: 36 ~ 75ug/m3
@@ -6709,7 +6709,7 @@
7098=小谢褗薪褔械胁 写械薪
7099=袨斜谢邪褔薪芯
7100=袛褗卸写芯胁薪芯
-7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 (1 ~ 100).
+7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 ({0} ~ {1}).
7102=袧褟屑邪 蟹邪写邪写械薪邪 褋褌芯泄薪芯褋褌.
7103=袨褌谢懈褔薪芯: 0 ~ 35ug/m3
7104=袛芯斜褗褉: 36 ~ 75ug/m3
@@ -7070,7 +7070,7 @@
123=袩褉懈锌谢懈胁 锌芯胁褨褌褉褟
124=袙懈褋芯泻邪
125=小械褉械写薪褟
-126 =袧懈蟹褜泻邪
+126=袧懈蟹褜泻邪
127=袪械卸懈屑懈
128=楔胁懈写泻褨褋褌褜 胁械薪褌懈谢褟褌芯褉邪
129=袙懈 胁锌械胁薪械薪褨, 褖芯 胁懈屑泻薪褍谢懈 胁褋褨 褎褍薪泻褑褨褩 胁 锌褉懈屑褨褖械薪薪褨?
@@ -8034,7 +8034,7 @@
7098=小芯薪褟褔薪懈泄 写械薪褜
7099=啸屑邪褉薪芯
7100=袛芯褖
-7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 (1 ~ 100).
+7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 ({0} ~ {1}).
7102=袧械 蟹邪写邪薪芯 蟹薪邪褔械薪薪褟.
7103=袙褨写屑褨薪薪芯: 0 ~ 35 屑泻谐/屑3
7104=袛芯斜褉械: 36 ~ 75 屑泻谐/屑3
@@ -8105,6 +8105,11 @@
7169=效邪褋 褌褉懈胁邪谢芯褋褌褨
7170=胁懈褟胁谢械薪薪褟 锌褉懈褋褍褌薪芯褋褌褨 谢褞写懈薪懈
7171=锌褉芯写芯胁卸懈褌懈
+7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
+7176=HV
8501=袙褨写械芯蟹邪屑芯泻 写胁械褉械泄
8502=袣褨谢褜泻褨褋褌褜 械谢械泻褌褉芯械薪械褉谐褨褩
@@ -8123,6 +8128,28 @@
+8701=Home theatre
+8702=Player
+8703=Amplifier
+8704=Virtual remote control
+8705=Allmov
+8706=TIMING
+8707=Open
+8708=Off
+8709=Vocal tract
+8710=All around
+8711=Storehouse
+8712=Subtitle
+8713=Have already collected
+8714=A Collection for the Future
+8715=Synthesize
+8716=Video Introduction
+8717=Score
+8718=Play now
+8719=Conform action
+8720=Channel
+8721=Control
+
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index a4d7874..f522fe1 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310201">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310301">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<!--鍙嬬洘-->
diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs
index 485dc4b..af7c4b4 100644
--- a/HDL-ON_Android/Resources/Resource.designer.cs
+++ b/HDL-ON_Android/Resources/Resource.designer.cs
@@ -15,7 +15,7 @@
{
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")]
public partial class Resource
{
diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs
index 096e3b3..39e931d 100644
--- a/HDL-ON_Android/SplashActivity.cs
+++ b/HDL-ON_Android/SplashActivity.cs
@@ -85,10 +85,10 @@
{
Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈";
}
- else if (localeList.Language == "uk")
- {
- Language.CurrentLanguage = "Ukraine";
- }
+ //else if (localeList.Language == "uk")
+ //{
+ // Language.CurrentLanguage = "Ukraine";
+ //}
else
{
Language.CurrentLanguage = "English";
@@ -222,10 +222,10 @@
{
Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈";
}
- else if (localeList.Language == "uk")
- {
- Language.CurrentLanguage = "Ukraine";
- }
+ //else if (localeList.Language == "uk")
+ //{
+ // Language.CurrentLanguage = "Ukraine";
+ //}
else
{
Language.CurrentLanguage = "English";
@@ -274,10 +274,10 @@
{
Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈";
}
- else if (localeList.Language == "uk")
- {
- Language.CurrentLanguage = "Ukraine";
- }
+ //else if (localeList.Language == "uk")
+ //{
+ // Language.CurrentLanguage = "Ukraine";
+ //}
else
{
Language.CurrentLanguage = "English";
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index f70d5d8..9e1a694 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -248,6 +248,7 @@
// Shared.IOS.HDLFVSDK.Video.FVapplicationDidBecomeActive(application);
//}
Console.WriteLine("OnActivated");
+
base.OnActivated(application);
//HDL_ON.DriverLayer.Control.Ins.SearchLoaclGateway();
@@ -289,9 +290,9 @@
{
Language.CurrentLanguage = "Spanish";
}
- else if(NSLocale.PreferredLanguages[0].Contains("uk-")){
- Language.CurrentLanguage = "Ukraine";
- }
+ //else if(NSLocale.PreferredLanguages[0].Contains("uk-")){
+ // Language.CurrentLanguage = "Ukraine";
+ //}
else
{
Language.CurrentLanguage = "English";
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index e4f7f4b..94d0558 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1153,7 +1153,7 @@
7098=Sunny day
7099=Cloudy
7100=Tain
-7101=*Please set the value in this range (1 ~ 100).
+7101=*Please set the value in this range ({0} ~ {1}).
7102=No set value.
7103=Excellent: 0 ~ 35ug/m3
7104=Good: 36 ~ 75ug/m3
@@ -2553,7 +2553,7 @@
7098=鏅村ぉ
7099=澶氫簯
7100=涓嬮洦
-7101=*璇峰湪杩欎釜鑼冨洿(1~100)璁剧疆鍊笺��
+7101=*璇峰湪杩欎釜鑼冨洿({0}~{1})璁剧疆鍊笺��
7102=杩樻病鏈夎缃�笺��
7103=浼�:0~35ug/m鲁
7104=鑹�:36~75ug/m鲁
@@ -3941,7 +3941,7 @@
7098=小芯谢薪械褔薪褘泄 写械薪褜
7099=袨斜谢邪褔薪芯
7100=袧械锌芯谐芯写邪
-7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 (1 ~ 100).
+7101=*袩芯卸邪谢褍泄褋褌邪, 褍褋褌邪薪芯胁懈褌械 蟹薪邪褔械薪懈械 胁 褝褌芯屑 写懈邪锌邪蟹芯薪械 ({0} ~ {1}).
7102=袟邪写邪薪薪芯械 蟹薪邪褔械薪懈械 芯褌褋褍褌褋褌胁褍械褌.
7103=袨褌谢懈褔薪芯: 0 ~ 35 屑泻谐/屑3
7104=啸芯褉芯褕芯: 36 ~ 75 屑泻谐/屑3
@@ -5322,7 +5322,7 @@
7098=D铆a soleado
7099=Nublado
7100=
-7101=*Establezca el valor en este rango (1 ~ 100).
+7101=*Establezca el valor en este rango ({0} ~ {1}).
7102=Sin valor establecido
7103=Excelente: 0 ~ 35ug/m3
7104=Bueno: 36 ~ 75ug/m3
@@ -6709,7 +6709,7 @@
7098=小谢褗薪褔械胁 写械薪
7099=袨斜谢邪褔薪芯
7100=袛褗卸写芯胁薪芯
-7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 (1 ~ 100).
+7101=*袦芯谢褟, 蟹邪写邪泄褌械 褋褌芯泄薪芯褋褌褌邪 胁 褌芯蟹懈 写懈邪锌邪蟹芯薪 ({0} ~ {1}).
7102=袧褟屑邪 蟹邪写邪写械薪邪 褋褌芯泄薪芯褋褌.
7103=袨褌谢懈褔薪芯: 0 ~ 35ug/m3
7104=袛芯斜褗褉: 36 ~ 75ug/m3
@@ -7070,7 +7070,7 @@
123=袩褉懈锌谢懈胁 锌芯胁褨褌褉褟
124=袙懈褋芯泻邪
125=小械褉械写薪褟
-126 =袧懈蟹褜泻邪
+126=袧懈蟹褜泻邪
127=袪械卸懈屑懈
128=楔胁懈写泻褨褋褌褜 胁械薪褌懈谢褟褌芯褉邪
129=袙懈 胁锌械胁薪械薪褨, 褖芯 胁懈屑泻薪褍谢懈 胁褋褨 褎褍薪泻褑褨褩 胁 锌褉懈屑褨褖械薪薪褨?
@@ -8034,7 +8034,7 @@
7098=小芯薪褟褔薪懈泄 写械薪褜
7099=啸屑邪褉薪芯
7100=袛芯褖
-7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 (1 ~ 100).
+7101=*袟邪写邪泄褌械 蟹薪邪褔械薪薪褟 胁 褑褜芯屑褍 写褨邪锌邪蟹芯薪褨 ({0} ~ {1}).
7102=袧械 蟹邪写邪薪芯 蟹薪邪褔械薪薪褟.
7103=袙褨写屑褨薪薪芯: 0 ~ 35 屑泻谐/屑3
7104=袛芯斜褉械: 36 ~ 75 屑泻谐/屑3
@@ -8105,6 +8105,11 @@
7169=效邪褋 褌褉懈胁邪谢芯褋褌褨
7170=胁懈褟胁谢械薪薪褟 锌褉懈褋褍褌薪芯褋褌褨 谢褞写懈薪懈
7171=锌褉芯写芯胁卸懈褌懈
+7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
+7176=HV
8501=袙褨写械芯蟹邪屑芯泻 写胁械褉械泄
8502=袣褨谢褜泻褨褋褌褜 械谢械泻褌褉芯械薪械褉谐褨褩
@@ -8123,6 +8128,28 @@
+8701=Home theatre
+8702=Player
+8703=Amplifier
+8704=Virtual remote control
+8705=Allmov
+8706=TIMING
+8707=Open
+8708=Off
+8709=Vocal tract
+8710=All around
+8711=Storehouse
+8712=Subtitle
+8713=Have already collected
+8714=A Collection for the Future
+8715=Synthesize
+8716=Video Introduction
+8717=Score
+8718=Play now
+8719=Conform action
+8720=Channel
+8721=Control
+
diff --git a/HDL_ON/Common/OnAppConfig.cs b/HDL_ON/Common/OnAppConfig.cs
index 884c037..8c86dc0 100644
--- a/HDL_ON/Common/OnAppConfig.cs
+++ b/HDL_ON/Common/OnAppConfig.cs
@@ -77,10 +77,24 @@
public List<UserAccount> UserList = new List<UserAccount>();
#region 鏈嶅姟鍣ㄦ暟鎹�
+ public string _RequestHttpsHost = "https://china.hdlcontrol.com";
/// <summary>
/// 璐﹀彿娉ㄥ唽鏈嶅姟鍣ㄤ俊鎭�
/// </summary>
- public string RequestHttpsHost = "https://china.hdlcontrol.com";
+ public string RequestHttpsHost {
+ get
+ {
+ return _RequestHttpsHost;
+ }
+ set
+ {
+#if __IOS__
+ var sdm = new SiriKit.SceneDateManager();
+ sdm.GlobalRequestHttpsHost = value;
+#endif
+ _RequestHttpsHost = value;
+ }
+ }
/// <summary>
///
/// </summary>
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index fca8e58..f6d8677 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -161,7 +161,7 @@
/// 鍒锋柊Token
/// </summary>
/// <returns></returns>
- public string RefreshToken()
+ public string RefreshToken(bool canRefresh = true)
{
var requestJson = HttpUtil.GetSignRequestJson(new RefreshTokenObj()
{
@@ -187,6 +187,18 @@
{
UserInfo.Current.LastTime = DateTime.MinValue;
}
+#if __IOS__
+ else if (revertObj.Code == "10001")
+ {
+ if (canRefresh)
+ {
+ MainPage.Log($"UserInfo.Current.RefreshToken 1 : " + UserInfo.Current.RefreshToken);
+ UserInfo.Current.RefreshToken = SiriKit.NSUserDefaultsHelper.DataSuite.StringForKey(SiriKit.NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken);
+ MainPage.Log($"UserInfo.Current.RefreshToken 2 : " + UserInfo.Current.RefreshToken);
+ RefreshToken(false);
+ }
+ }
+#endif
return revertObj.Code;
}
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index b659327..0c95e74 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </summary>
- //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
- public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+ public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+ //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
const string APP_KEY = "HDL-HOME-APP-TEST";
const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
@@ -210,6 +210,11 @@
}
IRestResponse response = client.Execute(request);
HDL_ON.Utlis.WriteLine("鍙戦��", requestFullUrl, response.Request.Body?.Value.ToString());
+ if(apiPath == NewAPI.API_POST_Login)
+ {
+ var ddd = Newtonsoft.Json.JsonConvert.SerializeObject(response);
+ Console.WriteLine(ddd);
+ }
if (response.StatusCode == HttpStatusCode.OK)
{
try
@@ -302,7 +307,7 @@
/// 鍒锋柊 Token
/// </summary>
/// <returns></returns>
- static bool RefreshToken()
+ static bool RefreshToken(bool canRefresh = true)
{
try
{
@@ -319,12 +324,12 @@
UserInfo.Current.RefreshToken = revertData.refreshToken;
UserInfo.Current.LastTime = DateTime.Now;
UserInfo.Current.SaveUserInfo();
- return true;
#if __IOS__
var sdm = new SiriKit.SceneDateManager();
sdm.AccessToken = UserInfo.Current.LoginTokenString;
sdm.RefreshToken = UserInfo.Current.RefreshToken;
#endif
+ return true;
}
else if (revertObj.Code == StateCode.PasswrodError)
{
@@ -538,7 +543,7 @@
}
- #endregion
+#endregion
#region **********绛惧悕鏍¢獙**********
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 512a64e..151ee2f 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -777,9 +777,13 @@
sRange.Add(i);
}
sRange.Add(60);
+
+ int curValus = 0;
+ int.TryParse(curItemKey, out curValus);
+
BottomTimeSelectControl timeControl = new BottomTimeSelectControl(mRange, sRange, 5, Language.StringByID(StringId.SceneDelay));
timeControl.RowHeight = Application.GetRealHeight(50);
- timeControl.InitControl(0, 0, 262, false);
+ timeControl.InitControl(curValus / 60, curValus % 60, 262, false);
//timeControl.ChangePickerEvent2();
timeControl.FinishEvent = (type, hours, min) =>
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 87f5585..f99b97c 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -1121,9 +1121,11 @@
}
}
int max = 100;
+ int min = 1;
if (device.spk == SPK.SensorLight)
{
//鐓ф槑浼犳劅鍣�
+ min = 0;
max =1200;
}
@@ -1171,12 +1173,12 @@
key = "illuminance";
comparator = "<";
}
- break;
+ break ;
}
selectedState = device.spk + "_" + value;
AddDictionary(key, value, data_type, comparator);
SaveInput(device,index, edit);
- },1,max);
+ },min,max);
}
/// PM2.5,Co2,Tvoc璁剧疆鍊�
/// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
index 7943ef1..f26af22 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
@@ -550,7 +550,7 @@
}
if (intValue < minValue || intValue > maxValue)
{
- errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("1", minValue.ToString()).Replace("100", maxValue.ToString());
+ errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("{0}", minValue.ToString()).Replace("{1}", maxValue.ToString());
}
}
if (errorId_IsNullOrEmpty!="")
@@ -564,8 +564,8 @@
btnTip.X = Application.GetRealWidth(53);
btnTip.Y = editBjView.Bottom + Application.GetRealHeight(12);
- btnTip.Width = Application.GetRealWidth(157);//200
- btnTip.Height = Application.GetRealHeight(17);//17
+ btnTip.Width = Application.GetRealWidth(180);//200
+ btnTip.Height = Application.GetRealHeight(20);//17
btnTip.Text = errorId_IsNullOrEmpty;
btnTip.TextColor = CSS_Color.textRedColor;
btnTip.TextSize = TextSize.text12;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
index bffd42c..f9b6c67 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -91,7 +91,7 @@
{
TextSize = LogicView.TextSize.text16,
Width = Application.GetRealWidth(50),
- Height = Application.GetRealHeight(22),
+ Height = Application.GetRealHeight(100),
TextColor = CSS.CSS_Color.textRedColor,
Gravity = Gravity.Center,
TextID = StringId.Del,
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
index 19a4a02..a3a29a2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Time3.cs
@@ -123,7 +123,14 @@
}
else
{
- s = value + " min";
+ if (Language.CurrentLanguage == "Ukraine")
+ {
+ s = value + " 褏胁";
+ }
+ else
+ {
+ s = value + " min";
+ }
}
}
//鏇存柊鍊約tateValue
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 440e8f2..4713ac2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -32,7 +32,7 @@
bodyView = this;
scene = s;
- sceneFunction = fc.localFunction.ConvertSceneFunction();
+ sceneFunction = fc;//.localFunction.ConvertSceneFunction();
foreach (var ll in sceneFunction.status)
{
try
@@ -229,6 +229,7 @@
{
sceneFunction.status.Clear();
sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.OnOff, value = "off" });
+ sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.Delay, value = sceneFunction.delay });
}
}
}
@@ -238,16 +239,6 @@
{
if (temp != null)
{
- //temp.delay = sceneFunction.delay;
- //foreach (var attr in sceneFunction.status)
- //{
- // var keva = temp.status.Find((obj) => obj.key == attr.key);
- // if (keva != null)
- // {
- // keva.value = attr.value;
- // }
- //}
- //temp = sceneFunction;
scene.functions.Remove(temp);
}
//else
@@ -292,7 +283,14 @@
void UpdataFunctionRow()
{
- contentView.RemoveAll();
+ try
+ {
+ contentView.RemoveAll();
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log(ex.Message);
+ }
for (var i = 0; i < functionRowList.Count; i++)
{
try
@@ -304,37 +302,39 @@
{
if (view.Tag != null)
{
- if (view.Tag.ToString() == FunctionAttributeKey.OnOff)
+ if (view.Tag.ToString() == FunctionAttributeKey.OnOff || view.Tag.ToString() == "delay")
{
contentView.AddChidren(view);
-
}
- if (isOnStatus)
+ else
{
- if (view.Tag.ToString() != FunctionAttributeKey.OnOff)
+ if (isOnStatus)
{
- if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB)
+ if (view.Tag.ToString() != FunctionAttributeKey.OnOff)
{
- if (view.Tag.ToString() != FunctionAttributeKey.Colorful)
+ if (isColorful && sceneFunction.localFunction.spk == SPK.LightRGB)
{
- view.RemoveFromParent();
+ if (view.Tag.ToString() != FunctionAttributeKey.Colorful)
+ {
+ view.RemoveFromParent();
+ }
+ else
+ {
+ contentView.AddChidren(view);
+ }
}
else
{
contentView.AddChidren(view);
}
}
- else
- {
- contentView.AddChidren(view);
- }
}
- }
- else
- {
- if (view.Tag.ToString() != FunctionAttributeKey.OnOff)
+ else
{
- view.RemoveFromParent();
+ if (view.Tag.ToString() != FunctionAttributeKey.OnOff && view.Tag.ToString() != "delay")
+ {
+ view.RemoveFromParent();
+ }
}
}
}
@@ -674,43 +674,6 @@
btnFunctionName.MouseUpEventHandler = (sender, e) =>
{
LoadEditDialog_OnOff(sceneStatus, btnFunctionText);
- //var colorfulModePage = new SetSceneRgbColorfulModePage();
- //colorfulModePage.backAction = (selectedSerise,status) => {
- // if (selectedSerise == null)
- // {
- // if (status == "on")
- // {
- // isColorful = true;
- // }
- // else
- // {
- // isColorful = false;
- // }
- // }
- // else
- // {
- // isColorful = true;
- // rgbColorful = selectedSerise.ConvertSceneFunction();
- // }
- // if (isColorful)
- // {
- // btnFunctionText.TextID = StringId.On;
- // if (selectedSerise != null)
- // {
- // btnFunctionText.Text = selectedSerise.name;
- // }
- // }
- // else
- // {
- // btnFunctionText.TextID = StringId.OFF;
- // }
- // UpdataFunctionRow();
- //};
- //MainPage.BasePageView.AddChidren(colorfulModePage);
- //colorfulModePage.LoadPage(sceneFunction.localFunction.sid.Substring(0,16));
- //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
-
};
#endregion
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index a10b239..7661e18 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -661,12 +661,14 @@
{
new System.Threading.Thread(() =>
{
+
foreach (var tempSensor in sensorList)
{
if (index >= 6)
{
break;
}
+
if (tempSensor.sid == function.sid)
{
continue;
@@ -729,7 +731,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.TextFontSize,
- Text = function.name,
+ Text = tempSensor.name,
IsBold = true,
};
otherInfoView.AddChidren(btnSensorName);
@@ -824,6 +826,12 @@
});
System.Threading.Thread.Sleep(50);
}
+ Application.RunOnMainThread(() => {
+ if (index > 1)
+ {
+ contentView.ScrollEnabled = true;
+ }
+ });
}).Start();
}
catch(Exception ex)
@@ -836,6 +844,7 @@
LoadMothed_GetSensorHistoryData();
LoadEvent_ChangeSensorHistoryShowType();
}
+
}
@@ -900,7 +909,7 @@
}
ebl.InitXdataText(vs);
}
- yDataString += ebl.InitYdataText(sr.name, revertData, tipColorStringList[i]);
+ yDataString += ebl.InitYdataText("", revertData, tipColorStringList[i]);
}
}
i++;
@@ -909,6 +918,8 @@
Application.RunOnMainThread(() =>
{
+ ebl.xTitle = "";
+ ebl.yTitle = "";
myEchartsView.ShowWithOption(ebl.InitOption());
});
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 8d4483c..24eaa6c 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -23,6 +23,7 @@
//public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
//const string APP_KEY = "CPEVRLRT";
//const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";
+
/// <summary>
/// RegionMark
/// </summary>
@@ -35,9 +36,9 @@
/// 鐗规畩鎺ュ彛璇锋眰瓒呮椂鏃堕棿
/// </summary>
public const int TIME_OUT_LONG = 20;
- /////// <summary>
- /////// Bearer 鏆傛椂璁句负绌猴紝浠庣櫥闄嗘垚鍔熺殑杩斿洖鐨刪eaderPrefix鍙傛暟鍔ㄦ�佽幏鍙�
- /////// </summary>
+ /// <summary>
+ /// Bearer 鏆傛椂璁句负绌猴紝浠庣櫥闄嗘垚鍔熺殑杩斿洖鐨刪eaderPrefix鍙傛暟鍔ㄦ�佽幏鍙�
+ /// </summary>
//public const string TOKEN_BEARER = "Bearer ";
#endregion
@@ -114,6 +115,15 @@
try
{
+
+ if (string.IsNullOrEmpty(urlHead))
+ {
+ urlHead = HttpServerRequest.Ins.DataManager.GlobalRequestHttpsHost;
+ if (string.IsNullOrEmpty(urlHead))
+ {
+ urlHead = "https://nearest.hdlcontrol.com";
+ }
+ }
string requestFullUrl = urlHead + apiPath;
@@ -122,9 +132,10 @@
RestRequest request = new RestRequest(method);
request.Timeout = mTimeout * 1000;
request.AddHeader("content-type", "application/json");
+ request.AddHeader("language", "cn");
request.AddHeader("Authorization", HttpServerRequest.Ins.DataManager.AccessToken);
-
+
if (bodyParameterJson != null)
{
request.AddParameter("application/json", bodyParameterJson, ParameterType.RequestBody);
@@ -174,6 +185,8 @@
}
else
{
+ var ddd =Newtonsoft.Json.JsonConvert.SerializeObject(response);
+
return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR };
}
@@ -204,7 +217,7 @@
{
var responsePackNew = RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
//*****************Token杩囨湡澶勭悊*****************
- if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
+ if (responsePackNew.Code == StateCode.TOKEN_EXPIRED )
{
//鍒锋柊Token
if (RefreshToken()) {
diff --git a/SiriKit/Data/SceneDateManager.cs b/SiriKit/Data/SceneDateManager.cs
index 9ff58b3..01f1d1c 100644
--- a/SiriKit/Data/SceneDateManager.cs
+++ b/SiriKit/Data/SceneDateManager.cs
@@ -10,29 +10,6 @@
public SceneDateManager() { }//: base(new UserDefaultsStorageDescriptor(NSUserDefaultsHelper.StorageKeys.OrderHistory), new NSMutableArray<HDLSceneSiri.HDLSiriSceneModel>()) { }
protected NSUserDefaults UserDefaults = NSUserDefaultsHelper.DataSuite;
-
- //#region Public API for clients of `SoupOrderDataManager`
- //// Convenience method to access the data with a property name that makes
- //// sense in the caller's context.
- //public NSMutableArray<HDLSceneSiri.HDLSiriSceneModel> OrderHistory
- //{
- // get
- // {
- // return ManagedData as NSMutableArray<HDLSceneSiri.HDLSiriSceneModel>;
- // }
- //}
-
- //#endregion
-
- //#region Support methods for unarchiving saved data
- //override protected void FinishUnarchiving(NSObject unarchivedData)
- //{
- // var array = (NSArray)unarchivedData;
- // HDLSceneSiri.HDLSiriSceneModel[] orders = NSArray.FromArray<HDLSceneSiri.HDLSiriSceneModel>(array);
- // ManagedDataBackingInstance = new NSMutableArray<HDLSceneSiri.HDLSiriSceneModel>(orders);
- //}
- //#endregion
-
public bool IsLgoin
{
get
@@ -100,5 +77,20 @@
UserDefaults.SetString(value, NSUserDefaultsHelper.StorageKeys.GLOBAL_GHomeId);
}
}
+
+ public string GlobalRequestHttpsHost
+ {
+ get
+ {
+ var d = UserDefaults.StringForKey("GlobalRequestHttpsHost");
+ return d;
+ }
+ set
+ {
+ UserDefaults.SetString(value, "GlobalRequestHttpsHost");
+ }
+ }
+
+
}
}
--
Gitblit v1.8.0