.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 /> 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}被触发。 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" />--> 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> 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> 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}被触发。 HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </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> HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -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> 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) 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> 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) { 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); } }); } 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,13 +134,12 @@ }; 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() { @@ -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; 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; 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; } 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; } if (btnSecurityTitle != null) { btnSecurityTitle.IsSelected = false; btnSecurityTitle.TextSize = CSS_FontSize.TextFontSize; } btnAutomationTitle.IsSelected = true; btnAutomationTitle.TextSize = CSS_FontSize.HeadlineFontSize; btnSceneTilte.IsSelected = false; 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阶段 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 }); } inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count); 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", }; 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(); }; } } } 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> 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(); HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmDeploymentSettingPage.cs
@@ -1,501 +1,240 @@ 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; public ArmDeploymentSettingPage(SecurityAlarm alarm, Action action) { bodyView = this; securityAlarm = alarm; refreshAction = action; } public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(); bodyView.BackgroundColor = CSS_Color.BackgroundColor; 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); 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 }); #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 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 /* #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 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); //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 }); //布防功能 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); 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); 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 } /// <summary> /// 初始化部分功能区域 /// </summary> private void iniDefenseView() { #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 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 }); inputTargetView = new VerticalScrolViewLayout() { ScrollEnabled = false, }; contentView.AddChidren(inputTargetView); iniInputTargetView(); #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) //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 //{ // 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) // public class ArmDeploymentSettingPage : FrameLayout //{ // contentView.AddChidren(outputTargetView); // FrameLayout bodyView; // /// <summary> // /// 主题界面 // /// </summary> // VerticalScrolViewLayout contentView; // /// <summary> // /// 输入条件列表区域界面 // /// </summary> // VerticalScrolViewLayout inputTargetView; // /// <summary> // /// 告警目标列表区域界面 // /// </summary> // VerticalScrolViewLayout outputTargetView; // SecurityAlarm securityAlarm; // Action refreshAction; // public ArmDeploymentSettingPage(SecurityAlarm alarm, Action action) // { // bodyView = this; // securityAlarm = alarm; // refreshAction = action; //} } // public void LoadPage() // { // new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(); } // bodyView.BackgroundColor = CSS_Color.BackgroundColor; /// <summary> /// 初始化告警目标区域 /// </summary> private void iniAlarmView() { #region 告警目标 var outputRow = new FrameLayout() { Height = Application.GetRealHeight(44), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(outputRow); // contentView = new VerticalScrolViewLayout() // { // Y = Application.GetRealHeight(64), // Height = Application.GetRealHeight(527), // }; // bodyView.AddChidren(contentView); 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); // #region 布防信息 // var deploymentTitleRow = new FrameLayout() // { // Height = Application.GetRealHeight(44), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // contentView.AddChidren(deploymentTitleRow); 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 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); 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; }; // deploymentTitleRow.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 }); // #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 += ":"; outputTargetView = new VerticalScrolViewLayout() { ScrollEnabled = false, }; contentView.AddChidren(outputTargetView); // 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 }); iniAlarmListView(); // LoadEvent_EditSecurityAlarmName(btnDeploymentName); // #endregion #endregion contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor }); // /* // #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 += ":"; /// <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, }); } } // 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); /// <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; } // //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 }); btnDeploymentName.Text = securityAlarm.name = str; // //布防功能 // 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); // 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); // return; // } //var waitPage = new Loading(); //bodyView.AddChidren(waitPage); //waitPage.Start(Language.StringByID(StringId.PleaseWait)); // waitPage.Start(); //new System.Threading.Thread(() => //{ // try // { // securityAlarm.name = str; // var responsePack = new HttpServerRequest().EditSecurity(new List<SecurityAlarm>() { securityAlarm}); // if (responsePack.Code == StateCode.SUCCESS) // var code = securityAlarm.SaveInfo(); // if (code == StateCode.SUCCESS) // { // Common.ApiUtlis.Ins.GetSecurityList(); // Application.RunOnMainThread(() => // { // btnDeploymentName.Text = str; // this.RemoveFromParent(); // refreshAction?.Invoke(); // }); // } // else // { // IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); // } // } // catch (Exception ex) // { // MainPage.Log($"update user name error : {ex.Message}"); // } // finally // { // Application.RunOnMainThread(() => // { // IMessageCommon.Current.ShowErrorInfoAlter(code); // }); // } // } // catch { } // finally // { // Application.RunOnMainThread(() => { // if (waitPage != null) // { // waitPage.RemoveFromParent(); @@ -505,12 +244,273 @@ // } //}) //{ IsBackground = true }.Start(); }; new PublicAssmebly().LoadDialog_EditParater(StringId.Name, securityAlarm.name, callBack, StringId.NameCannotBeEmpty, 0, new List<string>()); }; btnDeploymentName.MouseUpEventHandler = eventHandler; } // }; // #endregion } // } } // /// <summary> // /// 初始化部分功能区域 // /// </summary> // private void iniDefenseView() // { // #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 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 }); // inputTargetView = new VerticalScrolViewLayout() // { // ScrollEnabled = false, // }; // contentView.AddChidren(inputTargetView); // iniInputTargetView(); // #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, // }); // 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); // 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); // 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 }); // outputTargetView = new VerticalScrolViewLayout() // { // ScrollEnabled = false, // }; // contentView.AddChidren(outputTargetView); // iniAlarmListView(); // #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> // 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; // //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; // } // } //} 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); 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++; } 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, 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> 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" /> 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> 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>