From b4f5f74d74a0a0996358d8348956601b30f17266 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 08 十二月 2021 16:07:51 +0800 Subject: [PATCH] 隐藏安防 --- SiriIntents/SiriIntents.csproj | 1 HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 13 HDL-ON_Android/Assets/Language.ini | 6 HDL-ON_iOS/HDL-ON_iOS.csproj | 2 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs | 3 HDL_ON/Entity/Function/SecurityAlarm.cs | 137 ++++ HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs | 7 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs | 35 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 29 HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 6 .vs/HDL_APP_Project/xs/UserPrefs.xml | 33 HDL_ON/UI/MainPage.cs | 2 SiriIntentsUI/SiriIntentsUI.csproj | 1 SiriIntentsUI/Info.plist | 4 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs | 46 + HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 4 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/PushConfigPage.cs | 7 HDL_ON/Entity/FunctionList.cs | 1 SiriIntents/Info.plist | 4 HDL_ON/DAL/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 156 ++-- HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs | 918 +++++++++++++++++----------------- HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs | 181 ++++++ 25 files changed, 954 insertions(+), 652 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 08a93c6..605482c 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -3,15 +3,23 @@ <MonoDevelop.MacDev.AppleDevelopmentTeam /> </MonoDevelop.Ide.ItemProperties.SiriIntentUI> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/MainPage.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs"> <Files> - <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="65" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" Line="296" Column="63" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" /> + <File FileName="HDL_ON/Entity/Function/Function.cs" /> + <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" /> + <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" /> + <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" /> + <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" /> + <File FileName="HDL_ON/Entity/FunctionList.cs" /> + <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" /> + <File FileName="HDL_ON/Common/FileUtlis.cs" /> + <File FileName="HDL_ON/Common/ApiUtlis.cs" /> + <File FileName="HDL_ON/UI/UI2/UserPage.cs" /> <File FileName="HDL-ON_iOS/Info.plist" /> - <File FileName="SiriIntents/Server/HttpUtil.cs" Line="19" Column="65" /> - <File FileName="SiriKit/Base.lproj/Intents.intentdefinition" Line="162" Column="3" /> - <File FileName="SiriIntentsUI/IntentViewController.cs" Line="47" Column="47" /> - <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="439" Column="17" /> - <File FileName="HDL_ON/UI/MainPage.cs" Line="29" Column="51" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -19,7 +27,11 @@ <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="UI" expanded="True"> - <Node name="MainPage.cs" selected="True" /> + <Node name="UI2" expanded="True"> + <Node name="4-PersonalCenter" expanded="True"> + <Node name="PersonalCenterPage.cs" selected="True" /> + </Node> + </Node> </Node> </Node> <Node name="HDL-ON_iOS" expanded="True" /> @@ -27,9 +39,6 @@ <Node name="Server" expanded="True" /> </Node> <Node name="SiriIntentsUI" expanded="True" /> - <Node name="SiriKit" expanded="True"> - <Node name="Base.lproj" expanded="True" /> - </Node> </Node> </State> </Pad> @@ -56,7 +65,7 @@ <BreakpointStore> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="28" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="14" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs" line="366" column="1" /> + <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs" line="333" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 6b663da..b268c11 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -483,7 +483,7 @@ 495=Face passage settings 496=There is no associated task deployment status 497=Custom -498=Trigger delay +498=Delayed deployment 499=Add defense function 500=Add alarm target 501=Security alarm: {0} is triggered. @@ -871,7 +871,7 @@ 7010=Every week 7011=Every month 7012=Save -7013=proceed recommendation +7013=Message push 7014=Send notification 7015=Select the condition 7016=Moment @@ -1607,7 +1607,7 @@ 495=浜鸿劯閫氳璁剧疆 496=杩樻病鏈夊叧鑱斾换浣曞竷闃茬姸鎬� 497=鑷畾涔� -498=瑙﹀彂寤舵椂 +498=寤舵椂甯冮槻 499=娣诲姞甯冮槻鍔熻兘 500=娣诲姞鍛婅鐩爣 501=瀹夐槻鎶ヨ锛歿0}琚Е鍙戙�� diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 4c2afa8..b26cc36 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="202111301" android:versionName="1.3.202111301" package="com.hdl.onpro"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202112066" android:versionName="1.3.202112066" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" /> <!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 --> <!--<uses-permission android:name="android.permission.INTERNET" />--> diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index b8b1496..47b1d0d 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -56,7 +56,7 @@ <MtouchLink>SdkOnly</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchEnableSGenConc>false</MtouchEnableSGenConc> -<CodesignProvision>OnPro211125-1-Dev</CodesignProvision> +<CodesignProvision>OnPro211201-1-Dev</CodesignProvision> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 09e5f7d..5fd167b 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.3.202112061</string> + <string>1.4.202112066</string> <key>CFBundleVersion</key> - <string>1.3.12061</string> + <string>1.4.12066</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 39ce621..6593cb8 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -483,7 +483,7 @@ 495=Face passage settings 496=There is no associated task deployment status 497=Custom -498=Trigger delay +498=Delayed deployment 499=Add defense function 500=Add alarm target 501=Security alarm: {0} is triggered. @@ -871,7 +871,7 @@ 7010=Every week 7011=Every month 7012=Save -7013=proceed recommendation +7013=Message push 7014=Send notification 7015=Select the condition 7016=Moment @@ -1607,7 +1607,7 @@ 495=浜鸿劯閫氳璁剧疆 496=杩樻病鏈夊叧鑱斾换浣曞竷闃茬姸鎬� 497=鑷畾涔� -498=瑙﹀彂寤舵椂 +498=寤舵椂甯冮槻 499=娣诲姞甯冮槻鍔熻兘 500=娣诲姞鍛婅鐩爣 501=瀹夐槻鎶ヨ锛歿0}琚Е鍙戙�� diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 6c692b6..315e9a2 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/Entity/Function/SecurityAlarm.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs index a460369..ea29373 100644 --- a/HDL_ON/Entity/Function/SecurityAlarm.cs +++ b/HDL_ON/Entity/Function/SecurityAlarm.cs @@ -470,7 +470,7 @@ /// 1:鍦烘櫙 /// 2:鑷姩鍖� /// </summary> - public string target_type ="0"; + public string target_type = "0"; /// <summary> /// 杈撳嚭鐩爣鐨剆id /// </summary> @@ -480,32 +480,108 @@ /// </summary> public List<SecurityOutputStatus> status = new List<SecurityOutputStatus>(); - /// <summary> - /// 鍔犲叆杈撳叆鏉′欢 - /// 鏈湴鍒ゆ柇浣跨敤 + /// 鏈湴涓嶅瓨鍦ㄦ暟鎹紙鏁版嵁鍙兘琚垹浜嗭級 /// </summary> - //[Newtonsoft.Json.JsonIgnore] - //public bool addCondition = false; - - [Newtonsoft.Json.JsonIgnore] - public string name = ""; - [Newtonsoft.Json.JsonIgnore] - public string RoomName = ""; - - [Newtonsoft.Json.JsonIgnore] - Function _function = null; - /// <summary> - /// 瀵瑰簲鐨勫姛鑳藉璞� - /// </summary> - /// <returns></returns> - public Function GetFunction() + public bool NoLocalData () { - if (_function == null) + var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid); + if (function != null) { - _function = FunctionList.List.Functions.Find((obj) => obj.sid == sid); + return true; } - return _function; + else + { + var scene = FunctionList.List.scenes.Find((obj) => obj.sid == sid); + if (scene != null) + { + return true; + } + } + return false; + } + + + string _name; + [Newtonsoft.Json.JsonIgnore] + public string name + { + get + { + if (string.IsNullOrEmpty(_name)) + { + + var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid); + if (function != null) + { + _name = function.name; + } + else + { + var scene = FunctionList.List.scenes.Find((obj) => obj.sid == sid); + if (scene != null) + { + _name = scene.name; + } + } + } + return _name; + } + set + { + _name = value; + } + } + + + + string _roomName; + [Newtonsoft.Json.JsonIgnore] + public string RoomName + { + get + { + if (string.IsNullOrEmpty(_roomName)) + { + + var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid); + if (function != null) + { + _roomName = function.GetRoomListName(); + } + else + { + var scene = FunctionList.List.scenes.Find((obj) => obj.sid == sid); + if (scene != null) + { + _roomName = scene.GetRoomListName(); + } + } + } + return _roomName; + } + set + { + _roomName = value; + } + } + + string _spk; + [Newtonsoft.Json.JsonIgnore] + public string spk + { + get + { + if (string.IsNullOrEmpty(_spk)) + { + var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid); + if (function != null) + { + _spk = function.spk; + } + } + return _spk; + } } @@ -518,7 +594,7 @@ string text = ""; if (target_type == "0") { - switch (GetFunction().spk) + switch (spk) { case SPK.LightDimming: case SPK.LightCCT: @@ -526,7 +602,18 @@ case SPK.LightSwitch: foreach (var state in status) { - if (state.key == FunctionAttributeKey.Brightness) + if(state.key == FunctionAttributeKey.OnOff) + { + if (state.value == "off") + { + text = Language.StringByID(StringId.Close); + } + else + { + text = Language.StringByID(StringId.Open); + } + } + else if (state.key == FunctionAttributeKey.Brightness) { if (state.value == "0") { @@ -583,7 +670,7 @@ /// APP:app push /// SMS:鐭俊 /// </summary> - public string pushMethod; + public string pushMethod = "APP"; /// <summary> /// 鎺ㄩ�佺洰鏍� /// </summary> diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index b76cae2..6dda2d1 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -425,6 +425,7 @@ { foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) { + MainPage.Log($"璇诲彇鍔熻兘鐘舵�侊細{function.name} : {function.sid} "); Control.Ins.SendReadCommand(function); } if(DB_ResidenceData.Instance.GatewayType == 1) diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index b8d5627..f5be56b 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.3.1206"; + public static string VersionString = "1.4.1206"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 1c437a3..4d75015 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -52,6 +52,8 @@ /// 褰撳墠娓╁害淇℃伅-瀹ゅ唴 /// </summary> TextButton btnIndoorTempValues; + Button btnHumidityIcon; + Button btnPm25Icon; /// <summary> /// 褰撳墠婀垮害淇℃伅-瀹ゅ唴 /// </summary> @@ -287,7 +289,7 @@ foreach (var temp in tempSensorList) { double tempValue = 0; - double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); + double.TryParse(temp.GetAttrState("temperature"), out tempValue); if (tempValue > 0) { tempTotalValues += tempValue; @@ -302,7 +304,7 @@ btnIndoorTempValues.Width = btnIndoorTempValues.GetTextWidth(); environmentalView.AddChidren(btnIndoorTempValues); - Button btnHumidityIcon = new Button() + btnHumidityIcon = new Button() { X = btnIndoorTempValues.Right + Application.GetRealWidth(8), Gravity = Gravity.CenterVertical, @@ -341,7 +343,7 @@ foreach (var humi in humiSensorList) { double humiValue = 0; - double.TryParse(humi.GetAttrState(FunctionAttributeKey.Value), out humiValue); + double.TryParse(humi.GetAttrState("humidity"), out humiValue); if (humiValue > 0) { humiTotalValues += humiValue; @@ -356,7 +358,7 @@ btnIndoorHumiValues.Width = btnIndoorHumiValues.GetTextWidth(); environmentalView.AddChidren(btnIndoorHumiValues); - Button btnPm25Icon = new Button() + btnPm25Icon = new Button() { X = btnIndoorHumiValues.Right + Application.GetRealWidth(4), Gravity = Gravity.CenterVertical, @@ -388,8 +390,9 @@ SelectedImagePath = "Collection/DefenseStatusIcon.png", UnSelectedImagePath = "Collection/DisarmStatusIcon.png" }; - if (DB_ResidenceData.Instance.GatewayType == 1) + if (false && DB_ResidenceData.Instance.GatewayType == 1) { + topView.AddChidren(btnSecurityStatus); foreach (var temp in FunctionList.List.securities) { diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index 0c30e50..21ac7a8 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -19,8 +19,17 @@ if (bodyView != null) { bodyView.btnTempValues.Text = MainPage.cityInfo.temperature == null ? "--" : MainPage.cityInfo.temperature + "掳"; + bodyView.btnTempValues.Width = bodyView.btnTempValues.GetTextWidth(); bodyView.btnHumidityValues.Text = MainPage.cityInfo.humidity == null ? "--" : MainPage.cityInfo.humidity + "%"; + bodyView.btnHumidityValues.Width = bodyView.btnHumidityValues.GetTextWidth(); bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25; + bodyView.btnPm25Values.Width = bodyView.btnPm25Values.GetTextWidth(); + bodyView.btnIndoorTempValues.X = bodyView.btnTempValues.Right; + bodyView.btnHumidityIcon.X = bodyView.btnIndoorTempValues.Right + Application.GetRealWidth(8); + bodyView.btnHumidityValues.X = bodyView.btnHumidityIcon.Right + Application.GetRealWidth(4); + bodyView.btnIndoorHumiValues.X = bodyView.btnHumidityValues.Right; + bodyView.btnPm25Icon.X = bodyView.btnIndoorHumiValues.Right + Application.GetRealWidth(4); + bodyView.btnPm25Values.X = bodyView.btnPm25Icon.Right + Application.GetRealWidth(4); } }); } @@ -86,7 +95,7 @@ name = enviTemp.name, sid = enviTemp.sid, deviceId = enviTemp.deviceId, - attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = tempAttr.state, curValue = tempAttr.curValue } }, + attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "humidity", state = tempAttr.state, curValue = tempAttr.curValue } }, }; humiSensorList.Add(newTemp); } @@ -96,7 +105,7 @@ foreach (var temp in humiSensorList) { double humiValue = 0; - double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out humiValue); + double.TryParse(temp.GetAttrState("humidity"), out humiValue); if(humiValue > 0) { humiTotalValues += humiValue; @@ -108,6 +117,12 @@ bodyView.btnIndoorHumiValues.Text = "/" + (humiTotalValues /humiTotalCount).ToString("0")+ "%"; } bodyView.btnIndoorHumiValues.Width = bodyView.btnIndoorHumiValues.GetTextWidth(); + + bodyView.btnHumidityIcon.X = bodyView.btnIndoorTempValues.Right + Application.GetRealWidth(8); + bodyView.btnHumidityValues.X = bodyView.btnHumidityIcon.Right + Application.GetRealWidth(4); + bodyView.btnIndoorHumiValues.X = bodyView.btnHumidityValues.Right; + bodyView.btnPm25Icon.X = bodyView.btnIndoorHumiValues.Right + Application.GetRealWidth(4); + bodyView.btnPm25Values.X = bodyView.btnPm25Icon.Right + Application.GetRealWidth(4); } }); } @@ -133,7 +148,7 @@ name = enviTemp.name, sid = enviTemp.sid, deviceId = enviTemp.deviceId, - attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = tempAttr.state, curValue = tempAttr.curValue } }, + attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "temperature", state = tempAttr.state, curValue = tempAttr.curValue } }, }; tempSensorList.Add(newTemp); } @@ -143,7 +158,7 @@ foreach (var temp in tempSensorList) { double tempValue = 0; - double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); + double.TryParse(temp.GetAttrState("temperature"), out tempValue); if (tempValue > 0) { tempTotalValues += tempValue; @@ -155,6 +170,12 @@ bodyView.btnIndoorTempValues.Text = "/" + (tempTotalValues /tempTotalCount).ToString("0.0")+ "掳"; } bodyView.btnIndoorTempValues.Width = bodyView.btnIndoorTempValues.GetTextWidth(); + + bodyView.btnHumidityIcon.X = bodyView.btnIndoorTempValues.Right + Application.GetRealWidth(8); + bodyView.btnHumidityValues.X = bodyView.btnHumidityIcon.Right + Application.GetRealWidth(4); + bodyView.btnIndoorHumiValues.X = bodyView.btnHumidityValues.Right; + bodyView.btnPm25Icon.X = bodyView.btnIndoorHumiValues.Right + Application.GetRealWidth(4); + bodyView.btnPm25Values.X = bodyView.btnPm25Icon.Right + Application.GetRealWidth(4); } }); } diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs index e0a6bf2..230d2f6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs @@ -86,7 +86,7 @@ //鍒ゆ柇鏄惁闇�瑕侀殣钘忚嚜鍔ㄥ寲 if (HideAutoPage) { - if (DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53 鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈� + if (false && DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53 鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈� { btnSceneTilte = new Button() { @@ -112,7 +112,7 @@ TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.PromptingColor1, SelectedTextColor = CSS_Color.MainColor, - TextID = StringId.SecurityCenter, + TextID = StringId.anfang, }; topView.AddChidren(btnSecurityTitle); btnAutomationTitle = new Button(); @@ -134,15 +134,14 @@ }; topView.AddChidren(btnSceneTilte); btnAutomationTitle = new Button(); - btnAutomationTitle = new Button(); } } else { - if (DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53 鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈� + if (false && DB_ResidenceData.Instance.GatewayType == 1)//缃戝叧闇�瑕佸姞杞藉畨闃�--2021-11-28 19:56:53 鍒樻檽杈夊皢瀹夐槻鏀惧叆鏀圭晫闈� { - btnAutomationTitle = new Button() + btnAutomationTitle = new Button() { Y = Application.GetRealHeight(30), Gravity = Gravity.CenterHorizontal, @@ -186,7 +185,7 @@ TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.PromptingColor1, SelectedTextColor = CSS_Color.MainColor, - TextID = StringId.SecurityCenter, + TextID = StringId.anfang, }; topView.AddChidren(btnSecurityTitle); } @@ -219,7 +218,6 @@ TextID = StringId.Automation, }; topView.AddChidren(btnAutomationTitle); - btnAutomationTitle = new Button(); } } btnAddIconBg = new Button() @@ -616,9 +614,12 @@ else if (contentPageView.PageIndex == 0) { btnAddIconBg.Visible = true; - btnSecurityTitle.IsSelected = false; - btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; - btnSecurityTitle.IsBold = false; + if (btnSecurityTitle != null) + { + btnSecurityTitle.IsSelected = false; + btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + btnSecurityTitle.IsBold = false; + } btnSceneTilte.IsSelected = true; btnSceneTilte.TextSize = CSS_FontSize.HeadlineFontSize; btnSceneTilte.IsBold = true; @@ -629,9 +630,12 @@ else { btnAddIconBg.Visible = true; - btnSecurityTitle.IsSelected = false; - btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; - btnSecurityTitle.IsBold = false; + if (btnSecurityTitle != null) + { + btnSecurityTitle.IsSelected = false; + btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + btnSecurityTitle.IsBold = false; + } btnAutomationTitle.IsSelected = true; btnAutomationTitle.TextSize = CSS_FontSize.HeadlineFontSize; btnAutomationTitle.IsBold = true; @@ -647,8 +651,12 @@ { return; } - btnSecurityTitle.IsSelected = false; - btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + + if (btnSecurityTitle != null) + { + btnSecurityTitle.IsSelected = false; + btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + } btnSceneTilte.IsSelected = true; btnSceneTilte.TextSize = CSS_FontSize.HeadlineFontSize; btnAutomationTitle.IsSelected = false; @@ -661,8 +669,12 @@ { return; } - btnSecurityTitle.IsSelected = false; - btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + + if (btnSecurityTitle != null) + { + btnSecurityTitle.IsSelected = false; + btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; + } btnAutomationTitle.IsSelected = true; btnAutomationTitle.TextSize = CSS_FontSize.HeadlineFontSize; btnSceneTilte.IsSelected = false; diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 95475ac..7f6ccf1 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -85,10 +85,10 @@ /// 鍖哄煙鎴愬憳灏忓尯鍩熸枃鏈� /// </summary> Button btnResidenceMemberText; - /// <summary> - /// 鍖哄煙瀹夋斁灏忓尯鍩� - /// </summary> - FrameLayout residenceArmView; + ///// <summary> + ///// 鍖哄煙瀹夋斁灏忓尯鍩� + ///// </summary> + //FrameLayout residenceArmView; /// <summary> /// 鍖哄煙鎴愬畨鏀惧皬鍖哄煙鍥炬爣 /// </summary> @@ -287,21 +287,21 @@ contentView.RemoveAll(); #region 浣忓畢淇℃伅鍖哄煙 - if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1) - { - residenceInfoView = new FrameLayout() - { - Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(213), - BackgroundColor = CSS_Color.MainBackgroundColor, - Radius = (uint)Application.GetRealHeight(12), - BorderColor = 0x00FFFFFF, - BorderWidth = 0, - }; - contentView.AddChidren(residenceInfoView); - } - else + //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && DB_ResidenceData.Instance.GatewayType == 1) + //{ + // residenceInfoView = new FrameLayout() + // { + // Gravity = Gravity.CenterHorizontal, + // Width = Application.GetRealWidth(343), + // Height = Application.GetRealHeight(213), + // BackgroundColor = CSS_Color.MainBackgroundColor, + // Radius = (uint)Application.GetRealHeight(12), + // BorderColor = 0x00FFFFFF, + // BorderWidth = 0, + // }; + // contentView.AddChidren(residenceInfoView); + //} + //else { residenceInfoView = new FrameLayout() { @@ -449,34 +449,34 @@ if (DB_ResidenceData.Instance.GatewayType == 1) { #region ---瀹夋斁鍖哄煙 - residenceArmView = new FrameLayout() - { - X = residenceMemberView.Right, - Y = Application.GetRealHeight(68), - Width = Application.GetRealWidth(64 + 48), - Height = Application.GetRealHeight(64), - }; - residenceInfoView.AddChidren(residenceArmView); - btnResidenceArmIcon = new Button - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(5), - Width = Application.GetMinRealAverage(30), - Height = Application.GetMinRealAverage(30), - UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png", - SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png", - }; - residenceArmView.AddChidren(btnResidenceArmIcon); - btnResidenceArmText = new Button() - { - Y = btnResidenceManageIcon.Bottom, - Height = Application.GetRealHeight(29), - TextID = StringId.Undefense, - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel - }; - residenceArmView.AddChidren(btnResidenceArmText); + //residenceArmView = new FrameLayout() + //{ + // X = residenceMemberView.Right, + // Y = Application.GetRealHeight(68), + // Width = Application.GetRealWidth(64 + 48), + // Height = Application.GetRealHeight(64), + //}; + //residenceInfoView.AddChidren(residenceArmView); + //btnResidenceArmIcon = new Button + //{ + // Gravity = Gravity.CenterHorizontal, + // Y = Application.GetRealHeight(5), + // Width = Application.GetMinRealAverage(30), + // Height = Application.GetMinRealAverage(30), + // UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png", + // SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png", + //}; + //residenceArmView.AddChidren(btnResidenceArmIcon); + //btnResidenceArmText = new Button() + //{ + // Y = btnResidenceManageIcon.Bottom, + // Height = Application.GetRealHeight(29), + // TextID = StringId.Undefense, + // TextAlignment = TextAlignment.Center, + // TextColor = CSS_Color.FirstLevelTitleColor, + // TextSize = CSS_FontSize.PromptFontSize_FirstLevel + //}; + //residenceArmView.AddChidren(btnResidenceArmText); #endregion } @@ -546,9 +546,9 @@ #region ---娣诲姞鍔熻兘鍖哄煙 residenceAddFunctionView = new FrameLayout() { - //X = residenceMemberView.Right, - X = Application.GetRealWidth(28 - 24), - Y = residenceManageView.Bottom, + X = residenceMemberView.Right, + //X = Application.GetRealWidth(28 - 24), + Y = Application.GetRealHeight(68),//residenceManageView.Bottom, Width = Application.GetRealWidth(64 + 48), Height = Application.GetRealWidth(64), }; @@ -590,34 +590,34 @@ if (DB_ResidenceData.Instance.GatewayType == 1) { #region ---瀹夋斁鍖哄煙 - residenceArmView = new FrameLayout() - { - X = Application.GetRealWidth(28 - 24), - Y = Application.GetRealHeight(68), - Width = Application.GetRealWidth(64 + 48), - Height = Application.GetRealWidth(64), - }; - residenceInfoView.AddChidren(residenceArmView); - btnResidenceArmIcon = new Button - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(5), - Width = Application.GetMinRealAverage(30), - Height = Application.GetMinRealAverage(30), - UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png", - SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png", - }; - residenceArmView.AddChidren(btnResidenceArmIcon); - btnResidenceArmText = new Button() - { - Y = btnResidenceArmIcon.Bottom, - Height = Application.GetRealHeight(29), - TextID = StringId.Undefense, - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel - }; - residenceArmView.AddChidren(btnResidenceArmText); + //residenceArmView = new FrameLayout() + //{ + // X = Application.GetRealWidth(28 - 24), + // Y = Application.GetRealHeight(68), + // Width = Application.GetRealWidth(64 + 48), + // Height = Application.GetRealWidth(64), + //}; + //residenceInfoView.AddChidren(residenceArmView); + //btnResidenceArmIcon = new Button + //{ + // Gravity = Gravity.CenterHorizontal, + // Y = Application.GetRealHeight(5), + // Width = Application.GetMinRealAverage(30), + // Height = Application.GetMinRealAverage(30), + // UnSelectedImagePath = "PersonalCenter/ResidenceArmIcon.png", + // SelectedImagePath = "PersonalCenter/ResidenceDefenseIcon.png", + //}; + //residenceArmView.AddChidren(btnResidenceArmIcon); + //btnResidenceArmText = new Button() + //{ + // Y = btnResidenceArmIcon.Bottom, + // Height = Application.GetRealHeight(29), + // TextID = StringId.Undefense, + // TextAlignment = TextAlignment.Center, + // TextColor = CSS_Color.FirstLevelTitleColor, + // TextSize = CSS_FontSize.PromptFontSize_FirstLevel + //}; + //residenceArmView.AddChidren(btnResidenceArmText); #endregion } #region F3闃舵 diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs index a872383..c3332b1 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs @@ -132,10 +132,11 @@ }; delayedRow.AddChidren(btnDelayedTitle); btnDelayedTitle.Text += ":"; + btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth()+Application.GetRealWidth(10); var btnDelayedText = new Button() { - X = Application.GetRealWidth(88), + X = btnDelayedTitle.Right, Width = Application.GetRealWidth(330), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, @@ -213,6 +214,7 @@ UnSelectedImagePath = "LogicIcon/off.png", SelectedImagePath = "LogicIcon/on.png", Gravity = Gravity.CenterVertical, + IsSelected = securityAlarm.noticeConfig.enable }; pushView.AddChidren(btnSwitchPush); @@ -471,15 +473,17 @@ inputTargetView.RemoveAll(); if (securityAlarm.input.Count > 0) { + int count = 0; foreach (var target in securityAlarm.input) { if (target.GetFunction() != null) { inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText())); - } inputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); + } + count++; } - inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count); + inputTargetView.Height = Application.GetRealHeight(65 * count); } else { @@ -578,9 +582,19 @@ { foreach (var outTarget in securityAlarm.output) { - if (outTarget.GetFunction() != null) + if (outTarget.NoLocalData()) { - outputTargetView.AddChidren(new OutputRow(outTarget.GetFunction().name, outTarget.GetFunction().GetRoomListName(), outTarget.StateText())); + var outputRow = new OutputRow(outTarget.name, outTarget.RoomName, outTarget); + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { + var delTemp = securityAlarm.output.Find((obj) => obj.sid == outTarget.sid); + if(delTemp!=null) + { + securityAlarm.output.Remove(delTemp); + } + outputRow.RemoveFromParent(); + outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count); + }; + outputTargetView.AddChidren(outputRow); } outputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); } @@ -710,8 +724,14 @@ Button btnRightIcon; - public OutputRow(string title, string subtitle, string state) + Button btnDel; + + SecurityOutput output; + + public OutputRow(string title, string subtitle, SecurityOutput inOutput) { + output = inOutput; + this.LineColor = 0x00000000; this.Height = Application.GetRealHeight(65); this.BackgroundColor = CSS_Color.MainBackgroundColor; @@ -747,7 +767,7 @@ TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.PromptingColor1, - Text = state + Text = output.StateText() }; this.AddChidren(btnState); @@ -759,7 +779,43 @@ Height = Application.GetRealWidth(16), UnSelectedImagePath = "FunctionIcon/ArmCenter/RightIcon.png", }; - this.AddChidren(btnRightIcon); + if (!string.IsNullOrEmpty(output.spk)) + { + this.AddChidren(btnRightIcon); + } + + btnState.MouseUpEventHandler = (sender, e) => + { + if (!string.IsNullOrEmpty(output.spk)) + { + ShowStateDialog(); + } + }; + btnRightIcon.MouseUpEventHandler = (sender, e) => + { + if (!string.IsNullOrEmpty(output.spk)) + { + ShowStateDialog(); + } + }; + //btnSubTitle.MouseUpEventHandler = (sender, e) => + //{ + // ShowStateDialog(); + //}; + + btnDel = new Button() + { + BackgroundColor = CSS_Color.WarningColor, + TextColor = CSS_Color.MainBackgroundColor, + TextID = StringId.Del, + }; + this.AddRightView(btnDel); + + } + + public void SetDelClick(EventHandler<MouseEventArgs> eventHandler) + { + btnDel.MouseUpEventHandler = eventHandler; } public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler) @@ -768,5 +824,114 @@ btnTitle.MouseUpEventHandler = eventHandler; btnSubTitle.MouseUpEventHandler = eventHandler; } + + + + + private void ShowStateDialog() + { + Dialog dialog = new Dialog(); + + FrameLayout contentView = new FrameLayout(); + dialog.AddChidren(contentView); + contentView.MouseUpEventHandler = (sender, e) => + { + dialog.Close(); + }; + + VerticalScrolViewLayout optinView = new VerticalScrolViewLayout() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(515), + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(88), + Radius = (uint)Application.GetRealHeight(13), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + contentView.AddChidren(optinView); + + Button btnOpen = new Button() + { + Height = Application.GetRealHeight(44), + TextAlignment = TextAlignment.Center, + SelectedTextColor = CSS_Color.MainColor, + TextColor = CSS_Color.PromptingColor1, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.On, + }; + optinView.AddChidren(btnOpen); + optinView.AddChidren(new Button() + { + Height = 1, + BackgroundColor = CSS_Color.DividingLineColor + }); + + Button btnClose = new Button() + { + Height = Application.GetRealHeight(44), + TextAlignment = TextAlignment.Center, + SelectedTextColor = CSS_Color.MainColor, + TextColor = CSS_Color.PromptingColor1, + TextID = StringId.OFF, + TextSize = CSS_FontSize.SubheadingFontSize, + }; + optinView.AddChidren(btnClose); + if (output.status.Count > 0) + { + btnOpen.IsSelected = output.status[0].value.ToLower() == "on"; + btnClose.IsSelected = !btnOpen.IsSelected; + } + + + Button btnCancel = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = optinView.Bottom + Application.GetRealHeight(8), + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(44), + Radius = (uint)Application.GetRealHeight(13), + BackgroundColor = CSS_Color.MainBackgroundColor, + TextID = StringId.Cancel, + TextColor = CSS_Color.WarningColor, + IsBold = true, + }; + contentView.AddChidren(btnCancel); + + dialog.Show(); + + btnOpen.MouseUpEventHandler = (sender, e) => { + btnState.Text = btnOpen.Text; + output.status = new List<SecurityOutputStatus>() + { + new SecurityOutputStatus() + { + key = FunctionAttributeKey.OnOff, + value = "on", + } + }; + dialog.Close(); + }; + + btnClose.MouseUpEventHandler = (sender, e) => + { + btnState.Text = btnClose.Text; + output.status = new List<SecurityOutputStatus>() + { + new SecurityOutputStatus() + { + key = FunctionAttributeKey.OnOff, + value = "off", + } + }; + dialog.Close(); + }; + + btnCancel.MouseUpEventHandler = (sender, e) => + { + dialog.Close(); + }; + + } + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs index 4ff5844..4f7abb9 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddOutputPage.cs @@ -207,20 +207,17 @@ var output = alarm.output.Find((obj) => obj.sid == function.sid); if (output == null) { - output = new SecurityOutput() - { - status = new List<SecurityOutputStatus> { new SecurityOutputStatus { - key = FunctionAttributeKey.OnOff, - value = "on" - } } - }; + output = new SecurityOutput(); + //{ + // status = new List<SecurityOutputStatus> { new SecurityOutputStatus { + // key = FunctionAttributeKey.OnOff, + // value = "on" + // } + // } + //}; output.sid = function.sid; } - //else - //{ - // output.addCondition = true; - //} FrameLayout functionRow = new FrameLayout() { @@ -260,9 +257,9 @@ TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.PromptingColor1, + Text = output.StateText() }; functionRow.AddChidren(btnState); - Button btnChooseIcon = new Button() { @@ -277,18 +274,20 @@ btnChooseIcon.MouseUpEventHandler = (sender, e) => { btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected; - var tempLocal = alarm.input.Find((obj) => + var tempLocal = alarm.output.Find((obj) => obj.sid == output.sid ); + if (tempLocal == null && !string.IsNullOrEmpty(output.spk)) + { + ShowStateDialog(output, btnState, btnChooseIcon); + } if (btnChooseIcon.IsSelected) { - //input.addCondition = true; if (tempLocal == null) alarm.output.Add(output); } else { - //input.addCondition = false; if (tempLocal != null) { alarm.output.Remove(output); @@ -358,7 +357,7 @@ SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.On, + TextID = StringId.Open, }; optinView.AddChidren(btnOpen); optinView.AddChidren(new Button() @@ -373,7 +372,7 @@ TextAlignment = TextAlignment.Center, SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.PromptingColor1, - TextID = StringId.OFF, + TextID = StringId.Close, TextSize = CSS_FontSize.SubheadingFontSize, }; optinView.AddChidren(btnClose); @@ -455,8 +454,6 @@ }; } - - /// <summary> diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs index 6f549d2..4fb69dd 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs @@ -457,6 +457,13 @@ Action refreshAction = () => { iniCustomDeploymentView(); + if (InDefenseMode != null) + { + if (InDefenseMode.sid == alarm.sid) + { + Control.Ins.ControlSecurity(InDefenseMode, "disable"); + } + } }; alarm = alarm.RefeshData(); diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs index df3ec88..9b1da4a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs @@ -1,516 +1,516 @@ -锘縰sing System; -using System.Collections.Generic; -using HDL_ON.DAL.Server; -using HDL_ON.Entity; -using HDL_ON.UI.CSS; -using Shared; -namespace HDL_ON.UI -{ - public class ArmDeploymentSettingPage : FrameLayout - { - FrameLayout bodyView; - /// <summary> - /// 涓婚鐣岄潰 - /// </summary> - VerticalScrolViewLayout contentView; - /// <summary> - /// 杈撳叆鏉′欢鍒楄〃鍖哄煙鐣岄潰 - /// </summary> - VerticalScrolViewLayout inputTargetView; - /// <summary> - /// 鍛婅鐩爣鍒楄〃鍖哄煙鐣岄潰 - /// </summary> - VerticalScrolViewLayout outputTargetView; +锘�//using System; +//using System.Collections.Generic; +//using HDL_ON.DAL.Server; +//using HDL_ON.Entity; +//using HDL_ON.UI.CSS; +//using Shared; +//namespace HDL_ON.UI +//{ +// public class ArmDeploymentSettingPage : FrameLayout +// { +// FrameLayout bodyView; +// /// <summary> +// /// 涓婚鐣岄潰 +// /// </summary> +// VerticalScrolViewLayout contentView; +// /// <summary> +// /// 杈撳叆鏉′欢鍒楄〃鍖哄煙鐣岄潰 +// /// </summary> +// VerticalScrolViewLayout inputTargetView; +// /// <summary> +// /// 鍛婅鐩爣鍒楄〃鍖哄煙鐣岄潰 +// /// </summary> +// VerticalScrolViewLayout outputTargetView; - SecurityAlarm securityAlarm; - Action refreshAction; +// SecurityAlarm securityAlarm; +// Action refreshAction; - public ArmDeploymentSettingPage(SecurityAlarm alarm, Action action) - { - bodyView = this; - securityAlarm = alarm; - refreshAction = action; - } +// public ArmDeploymentSettingPage(SecurityAlarm alarm, Action action) +// { +// bodyView = this; +// securityAlarm = alarm; +// refreshAction = action; +// } - public void LoadPage() - { - new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(); +// public void LoadPage() +// { +// new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(); - bodyView.BackgroundColor = CSS_Color.BackgroundColor; +// bodyView.BackgroundColor = CSS_Color.BackgroundColor; - contentView = new VerticalScrolViewLayout() - { - Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(527), - }; - bodyView.AddChidren(contentView); +// contentView = new VerticalScrolViewLayout() +// { +// Y = Application.GetRealHeight(64), +// Height = Application.GetRealHeight(527), +// }; +// bodyView.AddChidren(contentView); - #region 甯冮槻淇℃伅 - var deploymentTitleRow = new FrameLayout() - { - Height = Application.GetRealHeight(44), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - contentView.AddChidren(deploymentTitleRow); +// #region 甯冮槻淇℃伅 +// var deploymentTitleRow = new FrameLayout() +// { +// Height = Application.GetRealHeight(44), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// contentView.AddChidren(deploymentTitleRow); - var btnDeploymentTitle = new Button() - { - X = Application.GetRealWidth(16), - TextColor = CSS_Color.MainColor, - TextAlignment = TextAlignment.CenterLeft, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.DeploymentInformation, - IsBold = true, - }; - deploymentTitleRow.AddChidren(btnDeploymentTitle); +// var btnDeploymentTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// TextColor = CSS_Color.MainColor, +// TextAlignment = TextAlignment.CenterLeft, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = StringId.DeploymentInformation, +// IsBold = true, +// }; +// deploymentTitleRow.AddChidren(btnDeploymentTitle); - deploymentTitleRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); +// deploymentTitleRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); - #region 甯冮槻鍚嶇О - var deploymentNameRow = new FrameLayout() - { - Height = Application.GetRealHeight(50), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - contentView.AddChidren(deploymentNameRow); +// #region 甯冮槻鍚嶇О +// var deploymentNameRow = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// contentView.AddChidren(deploymentNameRow); - var btnDeploymentNameTitle = new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(72), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.Name, - }; - deploymentNameRow.AddChidren(btnDeploymentNameTitle); - btnDeploymentNameTitle.Text += ":"; +// var btnDeploymentNameTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(72), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.Name, +// }; +// deploymentNameRow.AddChidren(btnDeploymentNameTitle); +// btnDeploymentNameTitle.Text += ":"; - var btnDeploymentName = new Button() - { - X = Application.GetRealWidth(88), - Width = Application.GetRealWidth(230), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.TextFontSize, - Text = securityAlarm.name - }; - deploymentNameRow.AddChidren(btnDeploymentName); - deploymentNameRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); +// var btnDeploymentName = new Button() +// { +// X = Application.GetRealWidth(88), +// Width = Application.GetRealWidth(230), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.TextualColor, +// TextSize = CSS_FontSize.TextFontSize, +// Text = securityAlarm.name +// }; +// deploymentNameRow.AddChidren(btnDeploymentName); +// deploymentNameRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); - LoadEvent_EditSecurityAlarmName(btnDeploymentName); - #endregion +// LoadEvent_EditSecurityAlarmName(btnDeploymentName); +// #endregion - /* - #region 瑙﹀彂寤舵椂 - var delayedRow = new FrameLayout() - { - Height = Application.GetRealHeight(50), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - contentView.AddChidren(delayedRow); +// /* +// #region 瑙﹀彂寤舵椂 +// var delayedRow = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// contentView.AddChidren(delayedRow); - var btnDelayedTitle = new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(72), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.TriggerDelay, - }; - delayedRow.AddChidren(btnDelayedTitle); - btnDelayedTitle.Text += ":"; +// var btnDelayedTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(72), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.TriggerDelay, +// }; +// delayedRow.AddChidren(btnDelayedTitle); +// btnDelayedTitle.Text += ":"; - var btnDelayedText = new Button() - { - X = Application.GetRealWidth(88), - Width = Application.GetRealWidth(230), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.TextFontSize, - Text = securityAlarm.name - }; - delayedRow.AddChidren(btnDelayedText); +// var btnDelayedText = new Button() +// { +// X = Application.GetRealWidth(88), +// Width = Application.GetRealWidth(230), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.TextualColor, +// TextSize = CSS_FontSize.TextFontSize, +// Text = securityAlarm.name +// }; +// delayedRow.AddChidren(btnDelayedText); - var btnDelayedRight = new Button() - { - X = Application.GetRealWidth(343), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(16), - Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/RightIcon.png", - }; - delayedRow.AddChidren(btnDelayedRight); +// var btnDelayedRight = new Button() +// { +// X = Application.GetRealWidth(343), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(16), +// Height = Application.GetMinRealAverage(16), +// UnSelectedImagePath = "Public/RightIcon.png", +// }; +// delayedRow.AddChidren(btnDelayedRight); - //delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); - #endregion - */ +// //delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); +// #endregion +// */ - #endregion - contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); +// #endregion +// contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); - //甯冮槻鍔熻兘 - iniDefenseView(); - //鍛婅鐩爣 - iniAlarmView(); +// //甯冮槻鍔熻兘 +// iniDefenseView(); +// //鍛婅鐩爣 +// iniAlarmView(); - #region 搴曢儴鍖哄煙 - var bottomView = new FrameLayout() - { - Y = Application.GetRealHeight(591), - Height = Application.GetRealHeight(100), - BackgroundColor = CSS_Color.MainBackgroundColor, - Radius = (uint)Application.GetRealWidth(22), - }; - this.AddChidren(bottomView); +// #region 搴曢儴鍖哄煙 +// var bottomView = new FrameLayout() +// { +// Y = Application.GetRealHeight(591), +// Height = Application.GetRealHeight(100), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// Radius = (uint)Application.GetRealWidth(22), +// }; +// this.AddChidren(bottomView); - var btnConfrim = new Button() - { - X = Application.GetRealWidth(78), - Y = Application.GetRealHeight(12), - Width = Application.GetRealWidth(220), - Height = Application.GetRealWidth(44), - Radius = (uint)Application.GetRealWidth(22), - BackgroundColor = CSS_Color.MainColor, - TextID = StringId.Confirm, - TextSize = CSS_FontSize.SubheadingFontSize, - TextColor = CSS_Color.MainBackgroundColor, - TextAlignment = TextAlignment.Center, - }; - bottomView.AddChidren(btnConfrim); +// var btnConfrim = new Button() +// { +// X = Application.GetRealWidth(78), +// Y = Application.GetRealHeight(12), +// Width = Application.GetRealWidth(220), +// Height = Application.GetRealWidth(44), +// Radius = (uint)Application.GetRealWidth(22), +// BackgroundColor = CSS_Color.MainColor, +// TextID = StringId.Confirm, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextColor = CSS_Color.MainBackgroundColor, +// TextAlignment = TextAlignment.Center, +// }; +// bottomView.AddChidren(btnConfrim); - btnConfrim.MouseUpEventHandler = (sender, e) => - { - if (securityAlarm.input.Count == 0) - { - var tip = new Tip() - { - Text = "璇烽�夋嫨甯冮槻鐩爣", - CloseTime = 3, - Direction = AMPopTipDirection.None - }; - tip.Show(MainPage.BaseView); - return; - } - if (securityAlarm.output.Count == 0) - { - var tip = new Tip() - { - Text = "璇烽�夋嫨鍛婅鐩爣", - CloseTime = 3, - Direction = AMPopTipDirection.None - }; - tip.Show(MainPage.BaseView); +// btnConfrim.MouseUpEventHandler = (sender, e) => +// { +// if (securityAlarm.input.Count == 0) +// { +// var tip = new Tip() +// { +// Text = "璇烽�夋嫨甯冮槻鐩爣", +// CloseTime = 3, +// Direction = AMPopTipDirection.None +// }; +// tip.Show(MainPage.BaseView); +// return; +// } +// if (securityAlarm.output.Count == 0) +// { +// var tip = new Tip() +// { +// Text = "璇烽�夋嫨鍛婅鐩爣", +// CloseTime = 3, +// Direction = AMPopTipDirection.None +// }; +// tip.Show(MainPage.BaseView); - return; - } +// return; +// } - var waitPage = new Loading(); - waitPage.Start(); - new System.Threading.Thread(() => - { - try - { - var code = securityAlarm.SaveInfo(); - if (code == StateCode.SUCCESS) - { - Common.ApiUtlis.Ins.GetSecurityList(); - Application.RunOnMainThread(() => - { - this.RemoveFromParent(); - refreshAction?.Invoke(); - }); - } - else - { - Application.RunOnMainThread(() => - { - IMessageCommon.Current.ShowErrorInfoAlter(code); - }); - } - } - catch { } - finally - { - Application.RunOnMainThread(() => { - if (waitPage != null) - { - waitPage.RemoveFromParent(); - waitPage = null; - } - }); - } - }) - { IsBackground = true }.Start(); - }; - #endregion +// var waitPage = new Loading(); +// waitPage.Start(); +// new System.Threading.Thread(() => +// { +// try +// { +// var code = securityAlarm.SaveInfo(); +// if (code == StateCode.SUCCESS) +// { +// Common.ApiUtlis.Ins.GetSecurityList(); +// Application.RunOnMainThread(() => +// { +// this.RemoveFromParent(); +// refreshAction?.Invoke(); +// }); +// } +// else +// { +// Application.RunOnMainThread(() => +// { +// IMessageCommon.Current.ShowErrorInfoAlter(code); +// }); +// } +// } +// catch { } +// finally +// { +// Application.RunOnMainThread(() => { +// if (waitPage != null) +// { +// waitPage.RemoveFromParent(); +// waitPage = null; +// } +// }); +// } +// }) +// { IsBackground = true }.Start(); +// }; +// #endregion - } +// } - /// <summary> - /// 鍒濆鍖栭儴鍒嗗姛鑳藉尯鍩� - /// </summary> - private void iniDefenseView() - { +// /// <summary> +// /// 鍒濆鍖栭儴鍒嗗姛鑳藉尯鍩� +// /// </summary> +// private void iniDefenseView() +// { - #region 甯冮槻鍔熻兘 - var deploymentFunctionRow = new FrameLayout() - { - Height = Application.GetRealHeight(44), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - contentView.AddChidren(deploymentFunctionRow); +// #region 甯冮槻鍔熻兘 +// var deploymentFunctionRow = new FrameLayout() +// { +// Height = Application.GetRealHeight(44), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// contentView.AddChidren(deploymentFunctionRow); - var btnFunctionTitle = new Button() - { - X = Application.GetRealWidth(16), - TextColor = CSS_Color.MainColor, - TextAlignment = TextAlignment.CenterLeft, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.DefenseFunctionArmState, - IsBold = true, - }; - deploymentFunctionRow.AddChidren(btnFunctionTitle); +// var btnFunctionTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// TextColor = CSS_Color.MainColor, +// TextAlignment = TextAlignment.CenterLeft, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = StringId.DefenseFunctionArmState, +// IsBold = true, +// }; +// deploymentFunctionRow.AddChidren(btnFunctionTitle); - var btnAddTarget = new Button() - { - X = Application.GetRealWidth(337), - Y = Application.GetRealHeight(6), - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png", - }; - deploymentFunctionRow.AddChidren(btnAddTarget); - ///娣诲姞杈撳叆鐩爣 - btnAddTarget.MouseUpEventHandler = (sender, e) => { - Action<SecurityAlarm> action = (outTemp) => { - securityAlarm = outTemp; - iniInputTargetView(); - }; - var page = new AddInputPage(securityAlarm, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// var btnAddTarget = new Button() +// { +// X = Application.GetRealWidth(337), +// Y = Application.GetRealHeight(6), +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png", +// }; +// deploymentFunctionRow.AddChidren(btnAddTarget); +// ///娣诲姞杈撳叆鐩爣 +// btnAddTarget.MouseUpEventHandler = (sender, e) => { +// Action<SecurityAlarm> action = (outTemp) => { +// securityAlarm = outTemp; +// iniInputTargetView(); +// }; +// var page = new AddInputPage(securityAlarm, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - deploymentFunctionRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); +// deploymentFunctionRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); - inputTargetView = new VerticalScrolViewLayout() - { - ScrollEnabled = false, - }; - contentView.AddChidren(inputTargetView); +// inputTargetView = new VerticalScrolViewLayout() +// { +// ScrollEnabled = false, +// }; +// contentView.AddChidren(inputTargetView); - iniInputTargetView(); +// iniInputTargetView(); - #endregion - contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); +// #endregion +// contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); - } +// } - /// <summary> - /// 鍒濆鍖栬緭鍏ユ潯浠跺尯鍩熺晫闈� - /// </summary> - /// <param name=""></param> - private void iniInputTargetView() - { - inputTargetView.RemoveAll(); - if (securityAlarm.input.Count > 0) - { - foreach (var target in securityAlarm.input) - { - inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText())); - } - inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count); - //if (outputTargetView != null) - //{ - // contentView.AddChidren(outputTargetView); - //} - } - else - { - inputTargetView.AddChidren(new Button() - { - Height = Application.GetRealHeight(65), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.PromptingColor1, - TextID = StringId.ThereIsNoAssociatedTaskDeploymentStatus, - IsMoreLines = true, - BackgroundColor = CSS_Color.MainBackgroundColor, - }); +// /// <summary> +// /// 鍒濆鍖栬緭鍏ユ潯浠跺尯鍩熺晫闈� +// /// </summary> +// /// <param name=""></param> +// private void iniInputTargetView() +// { +// inputTargetView.RemoveAll(); +// if (securityAlarm.input.Count > 0) +// { +// foreach (var target in securityAlarm.input) +// { +// inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText())); +// } +// inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count); +// //if (outputTargetView != null) +// //{ +// // contentView.AddChidren(outputTargetView); +// //} +// } +// else +// { +// inputTargetView.AddChidren(new Button() +// { +// Height = Application.GetRealHeight(65), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.PromptingColor1, +// TextID = StringId.ThereIsNoAssociatedTaskDeploymentStatus, +// IsMoreLines = true, +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }); - inputTargetView.Height = Application.GetRealHeight(68); - //if(outputTargetView!= null) - //{ - // contentView.AddChidren(outputTargetView); - //} - } +// inputTargetView.Height = Application.GetRealHeight(68); +// //if(outputTargetView!= null) +// //{ +// // contentView.AddChidren(outputTargetView); +// //} +// } - } +// } - /// <summary> - /// 鍒濆鍖栧憡璀︾洰鏍囧尯鍩� - /// </summary> - private void iniAlarmView() - { - #region 鍛婅鐩爣 - var outputRow = new FrameLayout() - { - Height = Application.GetRealHeight(44), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - contentView.AddChidren(outputRow); +// /// <summary> +// /// 鍒濆鍖栧憡璀︾洰鏍囧尯鍩� +// /// </summary> +// private void iniAlarmView() +// { +// #region 鍛婅鐩爣 +// var outputRow = new FrameLayout() +// { +// Height = Application.GetRealHeight(44), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// contentView.AddChidren(outputRow); - var btnOutputRowTitle = new Button() - { - X = Application.GetRealWidth(16), - TextColor = CSS_Color.MainColor, - TextAlignment = TextAlignment.CenterLeft, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.AlarmTargetAfterTriggering, - IsBold = true, - }; - outputRow.AddChidren(btnOutputRowTitle); +// var btnOutputRowTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// TextColor = CSS_Color.MainColor, +// TextAlignment = TextAlignment.CenterLeft, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = StringId.AlarmTargetAfterTriggering, +// IsBold = true, +// }; +// outputRow.AddChidren(btnOutputRowTitle); - var btnAddOutTarget = new Button() - { - X = Application.GetRealWidth(337), - Y = Application.GetRealHeight(6), - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png", - }; - outputRow.AddChidren(btnAddOutTarget); +// var btnAddOutTarget = new Button() +// { +// X = Application.GetRealWidth(337), +// Y = Application.GetRealHeight(6), +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "FunctionIcon/ArmCenter/AddTargetIcon.png", +// }; +// outputRow.AddChidren(btnAddOutTarget); - btnAddOutTarget.MouseUpEventHandler = (sender, e) => { - Action<SecurityAlarm> action = (outTemp) => { - securityAlarm = outTemp; - iniAlarmListView(); - }; - var page = new AddOutputPage(securityAlarm, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// btnAddOutTarget.MouseUpEventHandler = (sender, e) => { +// Action<SecurityAlarm> action = (outTemp) => { +// securityAlarm = outTemp; +// iniAlarmListView(); +// }; +// var page = new AddOutputPage(securityAlarm, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - outputRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); +// outputRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS_Color.DividingLineColor }); - outputTargetView = new VerticalScrolViewLayout() - { - ScrollEnabled = false, - }; - contentView.AddChidren(outputTargetView); +// outputTargetView = new VerticalScrolViewLayout() +// { +// ScrollEnabled = false, +// }; +// contentView.AddChidren(outputTargetView); - iniAlarmListView(); +// iniAlarmListView(); - #endregion - contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); +// #endregion +// contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); - } +// } - /// <summary> - /// 鍒濆鍖栧憡璀﹀垪琛ㄥ尯鍩� - /// </summary> - private void iniAlarmListView() - { - outputTargetView.RemoveAll(); - if (securityAlarm.output.Count > 0) - { - foreach (var outTarget in securityAlarm.output) - { - outputTargetView.AddChidren(new OutputRow(outTarget.GetFunction().name, outTarget.GetFunction().GetRoomListName(), "鎵撳紑")); - } - outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count); - } - else - { - outputTargetView.AddChidren(new Button() - { - Height = Application.GetRealHeight(65), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.PromptingColor1, - TextID = StringId.ThereIsNoAssociatedTaskDeploymentStatus, - IsMoreLines = true, - BackgroundColor = CSS_Color.MainBackgroundColor, - }); - } - } +// /// <summary> +// /// 鍒濆鍖栧憡璀﹀垪琛ㄥ尯鍩� +// /// </summary> +// private void iniAlarmListView() +// { +// outputTargetView.RemoveAll(); +// if (securityAlarm.output.Count > 0) +// { +// foreach (var outTarget in securityAlarm.output) +// { +// outputTargetView.AddChidren(new OutputRow(outTarget.GetFunction().name, outTarget.GetFunction().GetRoomListName(), "鎵撳紑")); +// } +// outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count); +// } +// else +// { +// outputTargetView.AddChidren(new Button() +// { +// Height = Application.GetRealHeight(65), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.PromptingColor1, +// TextID = StringId.ThereIsNoAssociatedTaskDeploymentStatus, +// IsMoreLines = true, +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }); +// } +// } - /// <summary> - /// 淇敼瀹夐槻鍚嶇О - /// </summary> - void LoadEvent_EditSecurityAlarmName(Button btnDeploymentName) - { - EventHandler<MouseEventArgs> eventHandler = (sender, e) => - { - Action<string> callBack = (str) => - { - //鍚嶇О涓嶈兘涓虹┖ - if (string.IsNullOrEmpty(str)) - { - new Tip() - { - CloseTime = 1, - Text = Language.StringByID(StringId.NameCannotBeEmpty), - Direction = AMPopTipDirection.None, - }.Show(bodyView); - return; - } +// /// <summary> +// /// 淇敼瀹夐槻鍚嶇О +// /// </summary> +// void LoadEvent_EditSecurityAlarmName(Button btnDeploymentName) +// { +// EventHandler<MouseEventArgs> eventHandler = (sender, e) => +// { +// Action<string> callBack = (str) => +// { +// //鍚嶇О涓嶈兘涓虹┖ +// if (string.IsNullOrEmpty(str)) +// { +// new Tip() +// { +// CloseTime = 1, +// Text = Language.StringByID(StringId.NameCannotBeEmpty), +// Direction = AMPopTipDirection.None, +// }.Show(bodyView); +// return; +// } - btnDeploymentName.Text = securityAlarm.name = str; +// btnDeploymentName.Text = securityAlarm.name = str; - //var waitPage = new Loading(); - //bodyView.AddChidren(waitPage); - //waitPage.Start(Language.StringByID(StringId.PleaseWait)); - //new System.Threading.Thread(() => - //{ - // try - // { - // securityAlarm.name = str; - // var responsePack = new HttpServerRequest().EditSecurity(new List<SecurityAlarm>() { securityAlarm}); - // if (responsePack.Code == StateCode.SUCCESS) - // { - // Application.RunOnMainThread(() => - // { - // btnDeploymentName.Text = str; - // }); - // } - // else - // { - // IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); - // } - // } - // catch (Exception ex) - // { - // MainPage.Log($"update user name error : {ex.Message}"); - // } - // finally - // { - // Application.RunOnMainThread(() => - // { - // if (waitPage != null) - // { - // waitPage.RemoveFromParent(); - // waitPage = null; - // } - // }); - // } - //}) - //{ IsBackground = true }.Start(); - }; - new PublicAssmebly().LoadDialog_EditParater(StringId.Name, securityAlarm.name, callBack, StringId.NameCannotBeEmpty, 0, new List<string>()); - }; - btnDeploymentName.MouseUpEventHandler = eventHandler; - } +// //var waitPage = new Loading(); +// //bodyView.AddChidren(waitPage); +// //waitPage.Start(Language.StringByID(StringId.PleaseWait)); +// //new System.Threading.Thread(() => +// //{ +// // try +// // { +// // securityAlarm.name = str; +// // var responsePack = new HttpServerRequest().EditSecurity(new List<SecurityAlarm>() { securityAlarm}); +// // if (responsePack.Code == StateCode.SUCCESS) +// // { +// // Application.RunOnMainThread(() => +// // { +// // btnDeploymentName.Text = str; +// // }); +// // } +// // else +// // { +// // IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); +// // } +// // } +// // catch (Exception ex) +// // { +// // MainPage.Log($"update user name error : {ex.Message}"); +// // } +// // finally +// // { +// // Application.RunOnMainThread(() => +// // { +// // if (waitPage != null) +// // { +// // waitPage.RemoveFromParent(); +// // waitPage = null; +// // } +// // }); +// // } +// //}) +// //{ IsBackground = true }.Start(); +// }; +// new PublicAssmebly().LoadDialog_EditParater(StringId.Name, securityAlarm.name, callBack, StringId.NameCannotBeEmpty, 0, new List<string>()); +// }; +// btnDeploymentName.MouseUpEventHandler = eventHandler; +// } - } +// } -} +//} diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/PushConfigPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/PushConfigPage.cs index cbcb003..6576dcb 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/PushConfigPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/PushConfigPage.cs @@ -43,8 +43,8 @@ Text = alarm.noticeConfig.noticeContent, TextSize = UI2.Intelligence.Automation.LogicView.TextSize.text14, TextColor = CSS.CSS_Color.textColor, - PlaceholderText = Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)", - PlaceholderTextColor = CSS.CSS_Color.textCancelColor, + //PlaceholderText = Language.StringByID(StringId.xianzhichangdu),//"(100瀛椾互鍐�)", + //PlaceholderTextColor = CSS.CSS_Color.textCancelColor, BackgroundColor = CSS.CSS_Color.textWhiteColor, }; @@ -155,13 +155,14 @@ if (selectedAccountList.Count > 0) { alarm.pushConfigs.Clear();//娓呯┖鏃ф暟鎹垪琛� - alarm.pushConfigs.Add(new Entity.SecurityPushConfig { pushTarget = selectedAccountList }); + alarm.pushConfigs.Add(new Entity.SecurityPushConfig { pushMethod = "APP", pushTarget = selectedAccountList }); } //璐﹀彿鍒楄〃涓虹┖榛樿鎺ㄩ�佸綋鍓嶈处鍙� if (alarm.pushConfigs.Count == 0) { //鍒濆鍖栧璞� Entity.SecurityPushConfig pushConfigs = new Entity.SecurityPushConfig(); + pushConfigs.pushMethod = "APP"; //榛樿娣诲姞鎺ㄩ�佸綋鍓嶈处鍙� pushConfigs.pushTarget.Add(UserInfo.Current.ID); alarm.pushConfigs.Add(pushConfigs); diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs index 9a624ea..aeb5a12 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs @@ -313,7 +313,6 @@ break; default: continue; - break; } if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) @@ -327,6 +326,8 @@ { if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { + var spkValue = sensor.attributes.Find((obj) => obj.key == "value") == null ? sensor.spk.Replace("sensor.", "").Replace(".", ""):"value"; + sensor.attributes.Add(new FunctionAttributes { key = "spk", state = spkValue, curValue = spkValue }); LoadSensorDiv(sensor, index); index++; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs index de2bdaa..5ef800e 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs @@ -656,7 +656,7 @@ bool initTitleButton = true; - + int index = 1; foreach (var tempSensor in sensorList) { if (tempSensor.sid == function.sid) @@ -704,7 +704,7 @@ Y = Application.GetRealWidth(16), Width = Application.GetRealWidth(12), Height = Application.GetRealWidth(12), - BackgroundColor = tipColorList[0], + BackgroundColor = tipColorList[index++], Radius = (uint)Application.GetRealWidth(2), BorderWidth = 0, BorderColor = 0x00000000, diff --git a/SiriIntents/Info.plist b/SiriIntents/Info.plist index 4e0984e..43d7878 100644 --- a/SiriIntents/Info.plist +++ b/SiriIntents/Info.plist @@ -11,9 +11,9 @@ <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> - <string>1.3.202111171</string> + <string>1.3.202112062</string> <key>CFBundleVersion</key> - <string>1.3.11171</string> + <string>1.3.12062</string> <key>MinimumOSVersion</key> <string>12.0</string> <key>NSExtension</key> diff --git a/SiriIntents/SiriIntents.csproj b/SiriIntents/SiriIntents.csproj index 8a350a3..97110fe 100644 --- a/SiriIntents/SiriIntents.csproj +++ b/SiriIntents/SiriIntents.csproj @@ -79,7 +79,6 @@ <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> - <CodesignProvision>OnProSiri211125-1-Dev</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" /> diff --git a/SiriIntentsUI/Info.plist b/SiriIntentsUI/Info.plist index c85f32c..1c27acc 100644 --- a/SiriIntentsUI/Info.plist +++ b/SiriIntentsUI/Info.plist @@ -15,9 +15,9 @@ <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> - <string>1.3.202111171</string> + <string>1.3.202112062</string> <key>CFBundleVersion</key> - <string>1.3.11171</string> + <string>1.3.12062</string> <key>MinimumOSVersion</key> <string>12.0</string> <key>NSExtension</key> diff --git a/SiriIntentsUI/SiriIntentsUI.csproj b/SiriIntentsUI/SiriIntentsUI.csproj index cbbf67a..111501c 100644 --- a/SiriIntentsUI/SiriIntentsUI.csproj +++ b/SiriIntentsUI/SiriIntentsUI.csproj @@ -82,7 +82,6 @@ <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> - <CodesignProvision>OnProSiriUI211125-1-Dev</CodesignProvision> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <ItemGroup> -- Gitblit v1.8.0