From 42368161d6b795058dfc99ee9774aaf3f69e81d4 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 07 七月 2021 15:24:19 +0800
Subject: [PATCH] 2021-07-07 15:11:03
---
HDL_ON/Entity/Function/Scene.cs | 20 ++-
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 6
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs | 1
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 1
HDL_ON/Common/ApiUtlis.cs | 3
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 9
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs | 6
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs | 1
HDL_ON/DAL/Mqtt/MqttClient.cs | 21 +--
HDL-ON_iOS/Info.plist | 4
HDL_ON/Entity/Function/Function.cs | 24 +++
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 121 +++++++++++++++++++
HDL_ON/DAL/Server/HttpServerRequest.cs | 2
.vs/HDL_APP_Project/xs/UserPrefs.xml | 34 ++--
HDL_ON/DAL/DriverLayer/Control.cs | 43 ++++--
HDL_ON/UI/MainPage.cs | 2
HDL_ON/UI/UI1-Login/LoginPage.cs | 3
19 files changed, 230 insertions(+), 75 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index a446f73..303c431 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,15 +1,12 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs">
+ <MonoDevelop.Ide.Workbench>
<Files>
- <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="226" Column="54" />
- <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="276" Column="72" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="26" Column="62" />
- <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="1406" Column="38" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="818" Column="84" />
- <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="197" Column="51" />
- <File FileName="HDL_ON/Entity/Function/Light.cs" Line="51" Column="7" />
- <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs" Line="544" Column="35" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPage.cs" Line="121" Column="39" />
+ <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs" Line="44" Column="17" />
+ <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="22" Column="89" />
+ <File FileName="HDL-ON_iOS/Info.plist" />
+ <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -19,6 +16,7 @@
<Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
<Node name="DriverLayer" expanded="True" />
+ <Node name="Mqtt" expanded="True" />
<Node name="Server" expanded="True" />
</Node>
<Node name="Entity" expanded="True">
@@ -28,17 +26,17 @@
<Node name="UI" expanded="True">
<Node name="UI1-Login" expanded="True" />
<Node name="UI2" expanded="True">
- <Node name="4-PersonalCenter" expanded="True">
- <Node name="AddDevice" expanded="True">
- <Node name="MiniRemoteControl" expanded="True">
- <Node name="AddMiniRemoteControlDirection4Page.cs" selected="True" />
- </Node>
- </Node>
+ <Node name="2-Classification" expanded="True" />
+ <Node name="3-Intelligence" expanded="True">
+ <Node name="Scene" expanded="True" />
</Node>
- <Node name="FuntionControlView" expanded="True" />
+ <Node name="4-PersonalCenter" expanded="True">
+ <Node name="RoomListManage" expanded="True" />
+ </Node>
</Node>
</Node>
</Node>
+ <Node name="HDL-ON_iOS" expanded="True" selected="True" />
</Node>
</State>
</Pad>
@@ -50,10 +48,12 @@
<String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
<String>Shared.IOS/Shared.IOS.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
+ <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs" line="384" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index fc35615..389565c 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:versionCode="202107052" android:versionName="1.2.202107052" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107061" android:versionName="1.2.202107061" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
<!-- 鍙瀵硅鏉冮檺-->
<uses-permission android:name="android.permission.CAMERA" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index d481868..a1cde2e 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.2.202107052</string>
+ <string>1.2.202107071</string>
<key>CFBundleVersion</key>
- <string>1.2.07052</string>
+ <string>1.2.07071</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 31d4229..51ea108 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -187,7 +187,6 @@
//澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
foreach (var newFunction in deviceList.list)
{
- MainPage.Log(newFunction.savePath);
newFunction.SaveFunctionFile();
FunctionList.List.IniFunctionList(newFunction.savePath);
}
@@ -340,6 +339,8 @@
UI.Music.A31MusicModel.ReadMusicStates();
//鎼滅储缃戝叧
DriverLayer.Control.Ins.SearchLoaclGateway();
+ //閲嶆柊杩炴帴mqtt
+ DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt",false);
#endregion
}
}
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 913c52a..0152ec7 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -467,28 +467,41 @@
}
var count = 0;
- var logString = open ? "鎵撳紑\r\n" : "鍏抽棴\r\n";
List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>();
Dictionary<string, string> d = new Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, open ? "on" : "off");
var pm = new DAL.Server.HttpServerRequest();
- foreach (var temp in functions)
+ //涓�绔彛鍏ㄥ紑鍏ㄥ叧闇�瑕佸欢鏃跺彂閫�
+ if (DB_ResidenceData.Instance.GatewayType == 0)
{
- logString += temp.spk + ":" + temp.sid + "\r\n";
- var apiControlData = temp.GetApiControlData(d);
- actionObjs.Add(apiControlData);
- count++;
- if (count > 9)
+ new System.Threading.Thread(() =>
{
- var result = pm.ControlDevice(actionObjs);
- actionObjs = new List<ApiAlinkControlActionObj>();
- count = 0;
- MainPage.Log(logString);
- logString = "";
- }
+ foreach (var temp in functions)
+ {
+ var apiControlData = temp.GetApiControlData(d);
+ var result = pm.ControlDevice(new List<ApiAlinkControlActionObj>() { apiControlData });
+ System.Threading.Thread.Sleep(100);
+ }
+ })
+ { IsBackground = true }.Start();
}
- var pack = pm.ControlDevice(actionObjs);
- MainPage.Log(logString);
+ else
+ {
+ foreach (var temp in functions)
+ {
+ var apiControlData = temp.GetApiControlData(d);
+ actionObjs.Add(apiControlData);
+ count++;
+ if (count > 9)
+ {
+ var result = pm.ControlDevice(actionObjs);
+ actionObjs = new List<ApiAlinkControlActionObj>();
+ count = 0;
+ System.Threading.Thread.Sleep(100);
+ }
+ }
+ var pack = pm.ControlDevice(actionObjs);
+ }
}
public void SendApiReadCommand(List<string> functionIds)
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index d3819d6..b7de875 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -20,7 +20,7 @@
/// <summary>
/// 鍔犲瘑閫氳KEY
/// </summary>
- static string mqttEncryptKey = "";
+ //static string mqttEncryptKey = "";
static string tuyaEncryptKey = "";
//static string checkGatewayTopicBase64 = "";
static bool hadGateway = true;
@@ -301,7 +301,7 @@
try
{
var topic = e.ApplicationMessage.Topic;
- //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
+ MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
//涓�绔彛涓婚澶勭悊
if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
{
@@ -328,7 +328,7 @@
}
//涓�浜涚壒娈婄殑涓婚澶勭悊(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣� true:鎵ц浜嗙壒娈婂鐞� false:娌℃湁鎵ц鐗规畩澶勭悊)
- Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, mqttEncryptKey, tuyaEncryptKey);
+ Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey, tuyaEncryptKey);
if (topic == $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze)
{
@@ -432,10 +432,7 @@
{
var pm = new HttpServerRequest();
pm.GetHomeGatewayList();
- MainPage.Log($"缃戝叧瀵嗛挜鍙樻洿");
- MainPage.Log($"鏃у瘑閽ワ細{mqttEncryptKey}");
- mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
- MainPage.Log($"鏂板瘑閽ワ細{mqttEncryptKey}");
+ MainPage.Log($"缃戝叧瀵嗛挜鍙樻洿.鏂板瘑閽ワ細{DB_ResidenceData.Instance.HomeGateway.aesKey}");
}
#endregion
@@ -454,9 +451,9 @@
//bus鏁版嵁瑙f瀽
var packet = new Packet();
- if (!string.IsNullOrEmpty(mqttEncryptKey))
+ if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
{
- packet.Bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey);
+ packet.Bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey);
}
else
{
@@ -626,7 +623,7 @@
- mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
+ //mqttEncryptKey = MqttInfoConfig.Current.HomeGatewayInfo.aesKey;
//瑙e瘑瀵嗛挜瑙勫垯锛氬凡鐜版湁鐨勪綇瀹匢D涓哄熀鍑�,浠庡彸杈逛竴涓�鑾峰彇鍊�,鏈�鍚庡鏋滀笉澶�16浣�,鍒欏線鍙宠ˉ闆�
string aesKey = string.Empty;
for (int i = DB_ResidenceData.Instance.CurrentRegion.id.Length - 1; i >= 0; i--)
@@ -802,9 +799,9 @@
{
case 0:
topicName = $"/ClientToBusGateWay/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/Common/ON";
- if (!string.IsNullOrEmpty(mqttEncryptKey))
+ if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey))
{
- message = Securitys.EncryptionService.AesEncryptPayload(message, mqttEncryptKey);
+ message = Securitys.EncryptionService.AesEncryptPayload(message, DB_ResidenceData.Instance.HomeGateway.aesKey);
}
await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });
break;
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index ec3e6ad..c32ca0c 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1959,7 +1959,7 @@
d.Add("actions", actionObjs);
var requestJson = HttpUtil.GetSignRequestJson(d);
- MainPage.Log($"{requestJson}");
+ MainPage.Log($"api鍔熻兘鎺у埗锛歿requestJson}");
return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlDevice, requestJson);
}
/// <summary>
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 069dd71..04b4840 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -507,7 +507,25 @@
{
attr.curValue = "off";
}
- else
+ else if (attr.key == FunctionAttributeKey.Mode )
+ {
+ if (DB_ResidenceData.Instance.GatewayType == 0)
+ {
+ attr.curValue = "0";
+ }
+ else
+ {
+ if (SPK.AcSpkList().Contains(spk))
+ {
+ attr.curValue = "cool";
+ }
+ else if (SPK.FhSpkList().Contains(spk))
+ {
+ attr.curValue = "day";
+ }
+ }
+ }
+ else
{
attr.curValue = "0";
}
@@ -516,6 +534,10 @@
{
double vv = 16;
Double.TryParse(attr.curValue.ToString(), out vv);
+ if (vv == 0)
+ {
+ vv = 26;
+ }
sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
}
else
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index e4607ae..b9ecb02 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -564,26 +564,31 @@
/// 鑾峰彇鎸囧畾灞炴�х殑鏄剧ず鏂囨湰
/// 涓嫳鏂囨樉绀�
/// </summary>
- public string GetValueText()
+ public string GetValueText(string temp = "")
{
+ string catchString = value;
+ if(temp!= "")
+ {
+ catchString = temp;
+ }
string text = "";
switch (key)
{
case FunctionAttributeKey.OnOff:
- text = value == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF);
+ text = catchString == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF);
break;
case FunctionAttributeKey.SetTemp:
case FunctionAttributeKey.RoomTemp:
case FunctionAttributeKey.Brightness:
case FunctionAttributeKey.Percent:
- if (value == "")
+ if (catchString == "")
{
- value = "0";
+ catchString = "0";
}
- text = value;
+ text = catchString;
break;
case FunctionAttributeKey.Mode:
- switch (value)
+ switch (catchString)
{
//----绌鸿皟
case "auto":
@@ -602,6 +607,7 @@
text = Language.StringByID(StringId.AirSupply);
break;
//-----鍦扮儹
+ // 1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿
case "day":
text = Language.StringByID(StringId.Day);
break;
@@ -620,7 +626,7 @@
}
break;
case FunctionAttributeKey.FanSpeed:
- switch (value)
+ switch (catchString)
{
case "high":
text = Language.StringByID(StringId.HighWindSpeed);
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 256e79f..639ff0a 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.2.0705";
+ public static string VersionString = "1.2.0707";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 5a5e2fc..56d3f19 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -213,6 +213,7 @@
//etAccount.Text = "18316120654";//tujie
// "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
etAccount.Text = "15626203746";
+ etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
}
else
{
@@ -516,7 +517,7 @@
IsBold = true,
TextColor = CSS_Color.MainColor,
TextAlignment = TextAlignment.Center,
- Text = "Dome妯″紡"
+ Text = "Demo妯″紡"
};
bodyView.AddChidren(btnDomeLogin);
btnDomeLogin.MouseUpEventHandler = (sender, e) => {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
index 111d2f4..bfeb602 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
@@ -326,6 +326,7 @@
functionListView = new VerticalScrolViewLayout()
{
Height = 0,
+ ScrollEnabled = false,
};
contentView.AddChidren(functionListView);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index 2899a09..cfab368 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -332,7 +332,6 @@
functionListView = new VerticalScrolViewLayout() {
Height = 0,
ScrollEnabled = false,
- BackgroundColor = 0xffff0000
};
contentView.AddChidren(functionListView);
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
index 4df4dd8..9401786 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
@@ -170,11 +170,7 @@
}
foreach (var function in functions)
{
- if (function.Spk_Prefix != FunctionCategory.Light &&
- function.Spk_Prefix != FunctionCategory.AC &&
- function.Spk_Prefix != FunctionCategory.FloorHeat &&
- function.Spk_Prefix != FunctionCategory.Curtain
- )
+ if (!MainPage.SceneSupportFunctionList.Contains(function.spk))
{
continue;
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index ff17320..93b3af5 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -49,6 +49,7 @@
LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp));
break;
case FunctionAttributeKey.Mode:
+
LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Mode));
break;
case FunctionAttributeKey.FanSpeed:
@@ -206,15 +207,72 @@
};
row.AddChidren(btnRight);
+
+ var showCode = "";
+
+ if (sceneStatus.key == FunctionAttributeKey.Mode)
+ {
+ if (DB_ResidenceData.Instance.GatewayType == 0)
+ {
+ if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk))
+ {
+ //0 鍒跺喎1鍒剁儹锛�2閫氶锛�3鑷姩锛�4闄ゆ箍
+ switch (sceneStatus.value)
+ {
+ case "0":
+ showCode = "cool";
+ break;
+ case "1":
+ showCode = "heat";
+ break;
+ case "2":
+ showCode = "fan";
+ break;
+ case "3":
+ showCode = "auto";
+ break;
+ case "4":
+ showCode = "dry";
+ break;
+ }
+ }
+ else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk))
+ {
+ //1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿
+ switch (sceneStatus.value)
+ {
+ case "5":
+ showCode = "timer";
+ break;
+ case "1":
+ showCode = "normal";
+ break;
+ case "2":
+ showCode = "day";
+ break;
+ case "3":
+ showCode = "night";
+ break;
+ case "4":
+ showCode = "away";
+ break;
+ }
+ }
+ }
+ }
+
var btnFunctionText = new Button()
{
Width = Application.GetRealWidth(330),
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = sceneStatus.GetValueText() + sceneStatus.GetUintString()
+ Text = sceneStatus.GetValueText(showCode) + sceneStatus.GetUintString()
};
row.AddChidren(btnFunctionText);
+
+
+
if (sceneStatus.key == FunctionAttributeKey.OnOff)
{
btnOnText = btnFunctionText;
@@ -897,6 +955,65 @@
var lastText = "";
Dialog dialog = new Dialog();
+ if(DB_ResidenceData.Instance.GatewayType == 0)
+ {
+ if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk))
+ {
+ //0 鍒跺喎1鍒剁儹锛�2閫氶锛�3鑷姩锛�4闄ゆ箍
+ for (int i = 0; i < statusList.Count; i++)
+ {
+ if (statusList[i] == "0")
+ {
+ statusList[i] = "cool";
+ }
+ else if (statusList[i] == "1")
+ {
+ statusList[i] = "heat";
+ }
+ else if (statusList[i] == "2")
+ {
+ statusList[i] = "fan";
+ }
+ else if (statusList[i] == "3")
+ {
+ statusList[i] = "auto";
+ }
+ else if (statusList[i] == "4")
+ {
+ statusList[i] = "dry";
+ }
+ }
+ }
+ else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk))
+ {
+ //1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿
+ for (int i = 0; i < statusList.Count; i++)
+ {
+ if (statusList[i] == "5")
+ {
+ statusList[i] = "timer";
+ }
+ else if (statusList[i] == "1")
+ {
+ statusList[i] = "normal";
+ }
+ else if (statusList[i] == "2")
+ {
+ statusList[i] = "day";
+ }
+ else if (statusList[i] == "3")
+ {
+ statusList[i] = "night";
+ }
+ else if (statusList[i] == "4")
+ {
+ statusList[i] = "away";
+ }
+ }
+
+ }
+ }
+
var pView = new FrameLayout()
{
BackgroundColor = CSS_Color.DialogTransparentColor1,
@@ -1003,7 +1120,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.TextFontSize,
Tag = m,
- Text = trait.GetValueText()
+ Text = trait.GetValueText(m)
};
row.AddChidren(btnPropertyTitle);
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index 9c98518..a2c9567 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -102,10 +102,6 @@
bool isFrist = true;
foreach (var device in deviceList)
{
- //if (!FunctionList.List.DeviceSpk.Contains(device.spk))
- //{
- // continue;
- //}
FrameLayout row = new FrameLayout()
{
Height = Application.GetRealHeight(50),
@@ -164,7 +160,10 @@
switch (device.spk)
{
case SPK.IrModule:
- new UI2.PersonalCenter.PirDevice.PirMethod().MainView(this, device,()=> {});
+ new UI2.PersonalCenter.PirDevice.PirMethod().MainView(this, device, () =>
+ {
+ contentView.BeginHeaderRefreshing();
+ });
break;
case SPK.SenesorMegahealth:
var smPage = new SenesorMegahealthManagerPage();
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
index fbbb8c7..fea62b3 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControl.cs
@@ -56,7 +56,7 @@
FrameLayout frameLayout = new FrameLayout
{
Y = Application.GetRealHeight(64 + 84),
- Height = Application.GetRealHeight(667 - 64 - 84),
+ Height = Application.GetRealHeight(667 - 64 - 84-104),
Width = Application.GetRealWidth(TextSize.view375),
};
this.AddChidren(frameLayout);
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
index d8193c1..6397cc6 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
@@ -8,7 +8,6 @@
{
public class PirMethod
{
-
/// <summary>
/// 绾㈠瀹濈▼搴忎富鍏ュ彛
/// </summary>
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
index de7355a..93eea05 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/FloorsManagementPageBLL.cs
@@ -40,13 +40,17 @@
{
try
{
+ var oldName = floor.roomName;
+ floor.roomName = newName;
var editResult = SpatialInfo.CurrentSpatial.UpdateFloor(floor);
Application.RunOnMainThread(() =>
{
if (editResult == DAL.Server.StateCode.SUCCESS)
{
- floor.roomName = newName;
btn.Text = newName;
+ }else
+ {
+ floor.roomName = oldName;
}
});
}
--
Gitblit v1.8.0