From 38ee59a8404c1fa9385649f9690c8d671a5d95de Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 31 八月 2023 19:00:22 +0800
Subject: [PATCH] 2023年08月31日19:00:14
---
HDL-ON_iOS/Resources/Language.ini | 15 +++++
HDL_ON/Entity/Function/Function.cs | 3 +
HDL-ON_Android/Assets/Language.ini | 18 ++++++
HDL_ON/DAL/Server/HttpUtil.cs | 4
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 11 +++
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 35 +++++++++++
HDL-ON_iOS/HDL-ON_iOS.csproj | 7 +-
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 60 +++++++++++++++++--
HDL_ON/Common/R.cs | 13 ++++
9 files changed, 150 insertions(+), 16 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index f2624e1..b8cc67c 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1225,6 +1225,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -2620,6 +2623,12 @@
7170=浜轰綋瀛樺湪妫�娴�
7171=鎸佺画
7172=RGB鑹茬洏
+7173=鐓ф槑搴�
+7174=鐓ф槑搴﹂珮浜�
+7175=鐓ф槑搴︿綆浜�
+
+
+
@@ -4003,6 +4012,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -5379,6 +5391,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -6761,6 +6776,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 6b572eb..e87b2d8 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -25,10 +25,11 @@
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>Full</MtouchLink>
<MtouchDebug>true</MtouchDebug>
- <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
+ <CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<CodesignProvision>OnPro2307291-Dev</CodesignProvision>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <MtouchI18n>cjk</MtouchI18n>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@@ -51,7 +52,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
- <CodesignKey>iPhone Developer</CodesignKey>
+ <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<MtouchI18n>cjk</MtouchI18n>
<MtouchLink>SdkOnly</MtouchLink>
@@ -59,7 +60,7 @@
<MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-<CodesignProvision>鑷姩</CodesignProvision>
+<CodesignProvision>OnPro2307291-Dev</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index f2624e1..8d3200e 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1225,6 +1225,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -2620,6 +2623,9 @@
7170=浜轰綋瀛樺湪妫�娴�
7171=鎸佺画
7172=RGB鑹茬洏
+7173=鐓ф槑搴�
+7174=鐓ф槑搴﹂珮浜�
+7175=鐓ф槑搴︿綆浜�
@@ -4003,6 +4009,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -5379,6 +5388,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
@@ -6761,6 +6773,9 @@
7170=Human presence detection
7171=continue
7172=Rgb color plate
+7173=Illuminance
+7174=Exceed
+7175=Under
8501=Video door lock
8502=Electric quantity
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index cbda2d5..90f7c7d 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3527,7 +3527,18 @@
/// RGB鑹茬洏
/// </summary>
public const int rgbsepan = 7172;
-
+ /// <summary>
+ /// 鐓ф槑搴�
+ /// </summary>
+ public const int zhaomingdu = 7173;
+ /// <summary>
+ /// 鐓ф槑搴﹂珮浜�
+ /// </summary>
+ public const int zhaomingdugaoyu = 7174;
+ /// <summary>
+ /// 鐓ф槑搴︿綆浜�
+ /// </summary>
+ public const int zhaomingdudiyu = 7175;
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index b659327..5235064 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";
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 7c2aee2..afb0f09 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -2194,6 +2194,7 @@
spkList.Add(SensorEnvironment2);
spkList.Add(SensorEnvironment3);
spkList.Add(SensorHcho);
+ spkList.Add(SensorLight);
return spkList;
}
/// <summary>
@@ -2210,6 +2211,7 @@
spkList.Add(SensorTVOC);
spkList.Add(SensorHumidity);
spkList.Add(SensorHcho);
+ spkList.Add(SensorLight);
return spkList;
}
@@ -2223,6 +2225,7 @@
spkList.Add(SensorEnvironment); spkList.Add(SensorEnvironmentHailin);
spkList.Add(SensorEnvironment2);
spkList.Add(SensorEnvironment3);
+
return spkList;
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 1c1e568..78ef5ab 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -573,6 +573,26 @@
};
}
break;
+ //鐓у害浼犳劅鍣�
+ case SPK.SensorLight:
+ {
+
+ ///鐓у害浼犳劅鍣�
+ LogicView.FunTypeView illuminanceView = new LogicView.FunTypeView();
+ illuminanceView.btnText.TextID = StringId.zhaomingdu;
+ fLayout.AddChidren(illuminanceView.FLayoutView());
+
+ ///鐐瑰嚮浜嬩欢
+ illuminanceView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ new PublicInterface { }.ViewZuHe(this, StringId.zhaomingdugaoyu, StringId.zhaomingdudiyu, (intText, view) =>
+ {
+ InputBoxAction(device, intText, index, edit);
+ });
+
+ };
+ }
+ break;
//鐢查啗
case SPK.SensorHcho:
{
@@ -1060,6 +1080,7 @@
{
if (edit)
{
+ this.function = device;
Input inputs = Logic.currlogic.input[index];
//娓呴櫎涔嬪墠鏃ф暟鎹�
dicSateteList.Clear();
@@ -1069,44 +1090,63 @@
dicSateteList.AddRange(inputs.condition);
}
}
+ int max = 100;
+ if (device.spk == SPK.SensorLight)
+ {
+ //鐓ф槑浼犳劅鍣�
+ max =int.MaxValue;
+ }
+
new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) =>
{
- string keyValue = "20";
+ string key = "20";
string data_type = "integer";
string comparator = "=";
switch (textInt)
{
case StringId.wendugaoyu:
{
- keyValue = "temperature";
+ key = "temperature";
comparator = ">";
data_type = "float";
}
break;
case StringId.wendudiyu:
{
- keyValue = "temperature";
+ key = "temperature";
comparator = "<";
data_type = "float";
}
break;
case StringId.shidugaoyu:
{
- keyValue = "humidity";
+ key = "humidity";
comparator = ">";
}
break;
case StringId.shidudiyu:
{
- keyValue = "humidity";
+ key = "humidity";
+ comparator = "<";
+ }
+ break;
+ case StringId.zhaomingdugaoyu:
+ {
+ key = "illuminance";
+ comparator = ">";
+ }
+ break;
+ case StringId.zhaomingdudiyu:
+ {
+ key = "illuminance";
comparator = "<";
}
break;
}
selectedState = device.spk + "_" + value;
- AddDictionary(keyValue, value, data_type, comparator);
+ AddDictionary(key, value, data_type, comparator);
SaveInput(device,index, edit);
- });
+ },1,max);
}
/// PM2.5,Co2,Tvoc璁剧疆鍊�
/// </summary>
@@ -1503,6 +1543,10 @@
/// <returns></returns>
private bool CheckSpk()
{
+ if (this.function == null)
+ {
+ return false;
+ }
if (this.function.spk == SPK.VideoDoorLock ||
this.function.spk == SPK.doorgate
)
@@ -1511,7 +1555,7 @@
}
return false;
- }
+ }
/// <summary>
/// 鍒ゆ柇dictionaryB鏄惁瀹屾暣鍖呭惈鍙︿竴涓猟ictionaryA
/// </summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 7442f62..31916af 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -400,6 +400,13 @@
inputView.btnState.Text = str;
}
break;
+ case SPK.SensorLight:
+ {
+ string str = this.GetText(dicList, "illuminance");
+ inputView.btnState.Text = str;
+
+ }
+ break;
case SPK.DoorLock:
{
string value = this.GetValue(dicList);
@@ -750,6 +757,7 @@
if (device.spk == SPK.SensorEnvironment || device.spk == SPK.SensorEnvironmentHailin
|| device.spk == SPK.SensorEnvironment2
|| device.spk == SPK.SensorEnvironment3
+ || device.spk == SPK.SensorLight
)
{
///褰撳墠鐨勭储寮曞�兼暟鎹璞�
@@ -764,6 +772,20 @@
switch (key)
{
+ case "illuminance":
+ {
+ int titleInt = 0;
+ if (comparator == ">")
+ {
+ titleInt = StringId.zhaomingdugaoyu;
+ }
+ else if (comparator == "<")
+ {
+ titleInt = StringId.zhaomingdudiyu;
+ }
+ ConditionDeviceFunList.Current.InputBoxAction(device, titleInt, indexVulae, true, stateValue);
+ }
+ break;
case "temperature":
{
int titleInt = 0;
@@ -2907,6 +2929,19 @@
switch (key)
{
+ case "illuminance":
+ {
+ if (comparator == ">")
+ {
+ strtext = ">" + value;
+ }
+ else if (comparator == "<")
+ {
+ strtext = "<" + value;
+ }
+
+ }
+ break;
case "temperature":
{
if (comparator == ">")
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index dafeb0b..8d03e9a 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -359,7 +359,9 @@
{
return "MusicIcon/localMusic.png";
}
- else if (SPK.SensorPm10 == device.spk || SPK.SensorPirHold == device.spk)
+ else if (SPK.SensorPm10 == device.spk
+ || SPK.SensorPirHold == device.spk
+ || SPK.SensorLight == device.spk)
{
return "LogicIcon/sensor.png";
}
@@ -368,6 +370,7 @@
{
return "FunctionIcon/DoorLock/DoorLock.png";
}
+
//LogicIcon/heatlogic.png"
return $"FunctionIcon/Icon/{device.IconName}.png";
@@ -576,6 +579,7 @@
|| device.spk == SPK.SensorHelp
|| device.spk == SPK.SensorPm10
|| device.spk == SPK.SensorPirHold
+ || device.spk == SPK.SensorLight
);
if (sensor != null)
{
@@ -707,6 +711,7 @@
functionTypeList.Add(SPK.SensorHelp);
functionTypeList.Add(SPK.SensorPm10);
functionTypeList.Add(SPK.SensorPirHold);
+ functionTypeList.Add(SPK.SensorLight);
}
@@ -810,6 +815,7 @@
functionTypeList.Add(SPK.AcIr);
functionTypeList.Add(SPK.SensorPirHold);
functionTypeList.Add(SPK.ElectricalTvHisense);
+ functionTypeList.Add(SPK.SensorLight);
}
@@ -874,6 +880,7 @@
deviceTypeList.Add(SPK.VideoDoorLock);
deviceTypeList.Add(SPK.AcIr);
deviceTypeList.Add(SPK.SensorPirHold);
+ deviceTypeList.Add(SPK.SensorLight);
}
break;
@@ -1215,7 +1222,7 @@
{
//妯℃嫙璁惧
var functions = new List<Function> {
- //new Entity.Function { sid = "1234567890", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic },
+ new Entity.Function { sid = "1234567890", name = "鐓ф槑浼犳劅鍣�", spk = Entity.SPK.SensorLight },
// new Entity.Function { sid = "1234567891", name = "娓╁害浼犳劅鍣�", spk = Entity.SPK.SensorTemperature },
// new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity },
//new Entity.Function { sid = "12345678933456", name = "闂ㄩ攣", spk = Entity.SPK.DoorLock },
--
Gitblit v1.8.0