.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,81 +1,23 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs"> <Files> <File FileName="HDL_ON/DAL/Mqtt/MqttInfoConfig.cs" /> <File FileName="HDL_ON/Common/FileUtlis.cs" /> <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="630" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="851" Column="74" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="694" Column="59" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/StbPage.cs" Line="529" Column="20" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/PjtPage.cs" Line="13" Column="25" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPage.cs" Line="348" Column="10" /> <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="1054" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TVPageBLL.cs" Line="11" Column="9" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrLearnPage.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs" Line="256" Column="64" /> <File FileName="HDL_ON/UI/MainPage.cs" Line="16" Column="17" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="108" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> <Node name="DriverLayer" expanded="True" /> <Node name="Mqtt" expanded="True" /> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True"> <Node name="Device" expanded="True" /> <Node name="Enumerative" expanded="True" /> <Node name="Function" expanded="True" /> </Node> <Node name="UI" expanded="True"> <Node name="UI0-Public" expanded="True" /> <Node name="UI0-Stan" expanded="True"> <Node name="Form" expanded="True"> <Node name="Base" expanded="True" /> <Node name="DriverLayer" expanded="True"> <Node name="Control.cs" selected="True" /> </Node> </Node> <Node name="UI2" expanded="True"> <Node name="1-HomePage" expanded="True" /> <Node name="2-Classification" expanded="True" /> <Node name="FuntionControlView" expanded="True"> <Node name="1ContorlPage" expanded="True" /> <Node name="Electrical" expanded="True" /> <Node name="Energy" expanded="True" /> <Node name="EnvironmentalScience" expanded="True" /> <Node name="Light" expanded="True" /> <Node name="Music" expanded="True" /> <Node name="Video" expanded="True" /> <Node name="FunctionBaseInfoSetPage.cs" selected="True" /> <Node name="Entity" expanded="True" /> </Node> </Node> </Node> </Node> <Node name="HDL-ON_Android" expanded="True"> <Node name="Assets" expanded="True"> <Node name="Phone" expanded="True"> <Node name="FunctionIcon" expanded="True"> <Node name="Electrical" expanded="True" /> </Node> </Node> </Node> </Node> <Node name="HDL-ON_iOS" expanded="True"> <Node name="Resources" expanded="True"> <Node name="Phone" expanded="True"> <Node name="FunctionIcon" expanded="True"> <Node name="Electrical" expanded="True" /> <Node name="Icon" expanded="True"> <Node name="HomeIcon" expanded="True" /> </Node> </Node> </Node> </Node> </Node> <Node name="HDL-ON_iOS" expanded="True" /> </Node> </State> </Pad> @@ -87,14 +29,12 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" line="313" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" line="392" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs" line="327" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> HDL-ON_Android/Assets/Language.ini
@@ -445,6 +445,7 @@ 458=Date 459=Real time energy consumption 460=Energy consumption of this month 461=Indoor/Outdoor 1000=Room Humidity 1001=V-chip @@ -1246,6 +1247,7 @@ 458=日期 459=实时能耗 460=本月能耗 461=室内/室外 1000=室内湿度 1001=童锁 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="202104282" android:versionName="1.2.202104282" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202105251" android:versionName="1.2.202105251" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!-- 可视对讲权限--> <uses-permission android:name="android.permission.CAMERA" /> HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.2.202104282</string> <string>1.2.202105251</string> <key>CFBundleVersion</key> <string>202104282</string> <string>1.2.05251</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> HDL-ON_iOS/Resources/Language.ini
@@ -445,6 +445,7 @@ 458=Date 459=Real time energy consumption 460=Energy consumption of this month 461=Indoor/Outdoor 1000=Room Humidity 1001=V-chip @@ -1246,6 +1247,7 @@ 458=日期 459=实时能耗 460=本月能耗 461=室内/室外 1000=室内湿度 1001=童锁 HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 室内室外 /// </summary> public const int InOutdoor = 461; /// <summary> /// 本月能耗 /// </summary> public const int EnergyConsumptionOfThisMonth = 460; HDL_ON/DAL/DriverLayer/Control.cs
@@ -812,6 +812,14 @@ case SPK.SensorTVOC: case SPK.SensorTemperature: case SPK.SensorHumidity: if(localFunction.spk == SPK.SensorTemperature) { HomePage.LoadEvent_RefreshEnvirIndoorTemp(); } else if (localFunction.spk == SPK.SensorHumidity) { HomePage.LoadEvent_RefreshEnvirIndoorHumi(); } EnvironmentalPage.LoadEvent_UpdataStatus(localFunction); break; case SPK.ElectricSocket: HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -821,7 +821,7 @@ /// <returns></returns> static async Task GetMqttInfoAndMQTTConnectAsync() { var mqttInfoRequestResult_Obj = new Server.HttpServerRequest().GetMqttRemoteInfo(GetRandomKey()); var mqttInfoRequestResult_Obj = new HttpServerRequest().GetMqttRemoteInfo(GetRandomKey()); if (mqttInfoRequestResult_Obj != null) { MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj; HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -86,7 +86,7 @@ d.Add("key", key); var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_ArmSensorHistoricalData, requestJson); return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_SensorLastMonthHistoricalData, requestJson); } HDL_ON/Entity/Function/Function.cs
@@ -1234,30 +1234,6 @@ /// </summary> public const string TvIr = "ir.tv"; /// <summary> /// 红外投影仪 /// </summary> public const string PjtIr = "ir.pjt"; /// <summary> /// 红外机顶盒 /// </summary> public const string StbIr = "ir.stb"; /// <summary> /// 红外影碟机 /// </summary> public const string DvDIr = "ir.dvd"; /// <summary> /// 红外空气净化器 /// </summary> public const string PurifierIr = "ir.air_purifier"; /// <summary> /// 红外热水器 /// </summary> public const string HeaterIr = " ir.water_heater"; /// <summary> /// 红外风扇 /// </summary> public const string FanIr = "ir.fan"; /// <summary> /// 家电、风扇 /// </summary> public const string ElectricFan = "electrical.fan"; HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.2.0428"; public static string VersionString = "1.2.0525"; ///// <summary> ///// 客户端类型 ///// </summary> HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -199,7 +199,8 @@ //return; if (b) { etAccount.Text = "13375012446";//测试服务器 etAccount.Text = "15626203746";//测试服务器 //etAccount.Text = "13375012446";//测试服务器 //etAccount.Text = "1033326940@qq.com"; //etAccount.Text = "18022428438";//wjc //etAccount.Text = "13602944661";//kx HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -35,13 +35,21 @@ /// </summary> FrameLayout environmentalView; /// <summary> /// 当前温度信息 /// 当前温度信息-室外 /// </summary> TextButton btnTempValues; /// <summary> /// 当前湿度信息 /// 当前湿度信息-室外 /// </summary> TextButton btnHumidityValues; /// <summary> /// 当前温度信息-室内 /// </summary> TextButton btnIndoorTempValues; /// <summary> /// 当前湿度信息-室内 /// </summary> TextButton btnIndoorHumiValues; /// <summary> /// 当前pm2.5状态 /// </summary> @@ -184,9 +192,27 @@ }; topView.AddChidren(environmentalView); #region 环境数据 var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature); var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity); var btnEnvirValuesTitle = new Button() { X = Application.GetRealWidth(12), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextID = StringId.InOutdoor, TextAlignment = TextAlignment.CenterLeft, }; if (tempSensorList.Count > 0 || humiSensorList.Count > 0) { btnEnvirValuesTitle.Width = Application.GetRealWidth(8)+ btnEnvirValuesTitle.GetTextWidth(); } environmentalView.AddChidren(btnEnvirValuesTitle); Button btnTempIcon = new Button() { X = Application.GetRealWidth(12), X = btnEnvirValuesTitle.Right,//+ Application.GetRealWidth(4), //X = Application.GetRealWidth(12), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), @@ -197,18 +223,44 @@ btnTempValues = new TextButton() { X = btnTempIcon.Right + Application.GetRealWidth(4), Width = Application.GetRealWidth(30), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = MainPage.cityInfo.temperature + "°", TextAlignment = TextAlignment.CenterLeft, }; btnTempValues.Width = btnTempValues.GetTextWidth(); environmentalView.AddChidren(btnTempValues); btnIndoorTempValues = new TextButton() { X = btnTempValues.Right, Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, Text = "/--°", }; if (tempSensorList.Count > 0) { double tempTotalValues = 0; foreach (var temp in tempSensorList) { double tempValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); tempTotalValues += tempValue; } if (tempTotalValues > 0) { btnIndoorTempValues.Text = "/" + tempTotalValues + "°"; } btnIndoorTempValues.Width = btnIndoorTempValues.GetTextWidth(); } environmentalView.AddChidren(btnIndoorTempValues); Button btnHumidityIcon = new Button() { X = btnTempValues.Right + Application.GetRealWidth(2), X = btnIndoorTempValues.Right + Application.GetRealWidth(8), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), @@ -219,18 +271,44 @@ btnHumidityValues = new TextButton() { X = btnHumidityIcon.Right + Application.GetRealWidth(4), Width = Application.GetRealWidth(30), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = MainPage.cityInfo.humidity + "%", TextAlignment = TextAlignment.CenterLeft, }; btnHumidityValues.Width = btnHumidityValues.GetTextWidth(); environmentalView.AddChidren(btnHumidityValues); btnIndoorHumiValues = new TextButton() { X = btnHumidityValues.Right, Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextAlignment = TextAlignment.CenterLeft, Text = "/--%", }; if (tempSensorList.Count > 0) { double humiTotalValues = 0; foreach (var humi in humiSensorList) { double humiValue = 0; double.TryParse(humi.GetAttrState(FunctionAttributeKey.Value), out humiValue); humiTotalValues += humiValue; } if (humiTotalValues > 0) { btnIndoorHumiValues.Text = "/" + humiTotalValues + "%"; } btnIndoorHumiValues.Width = btnIndoorHumiValues.GetTextWidth(); } environmentalView.AddChidren(btnIndoorHumiValues); Button btnPm25Icon = new Button() { X = btnHumidityValues.Right + Application.GetRealWidth(2), X = btnIndoorHumiValues.Right + Application.GetRealWidth(4), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), @@ -241,13 +319,13 @@ btnPm25Values = new TextButton() { X = btnPm25Icon.Right + Application.GetRealWidth(4), Width = Application.GetRealWidth(130), Gravity = Gravity.CenterVertical, TextColor = CSS_Color.MainBackgroundColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = MainPage.cityInfo.pm25, TextAlignment = TextAlignment.CenterLeft, }; btnPm25Values.Width = btnPm25Values.GetTextWidth(); environmentalView.AddChidren(btnPm25Values); #endregion HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -21,6 +21,53 @@ bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25; } } /// <summary> /// 更新室内传感器数据-湿度 /// </summary> public static void LoadEvent_RefreshEnvirIndoorHumi() { if (bodyView != null) { var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity); double humiTotalValues = 0; foreach (var temp in humiSensorList) { double humiValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out humiValue); humiTotalValues += humiValue; } if (humiTotalValues > 0) { bodyView.btnIndoorHumiValues.Text = "/" + humiTotalValues + "%"; } bodyView.btnIndoorHumiValues.Width = bodyView.btnIndoorHumiValues.GetTextWidth(); } } /// <summary> /// 更新室内传感器数据-晚点 /// </summary> public static void LoadEvent_RefreshEnvirIndoorTemp() { if (bodyView != null) { var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature); double tempTotalValues = 0; foreach (var temp in tempSensorList) { double tempValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); tempTotalValues += tempValue; } if (tempTotalValues > 0) { bodyView.btnIndoorTempValues.Text = "/" + tempTotalValues + "°"; } bodyView.btnIndoorTempValues.Width = bodyView.btnIndoorTempValues.GetTextWidth(); } } /// <summary> /// 更新功能列表主页 /// </summary> HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -706,6 +706,8 @@ { Application.RunOnMainThread(() => { try { if (bodyView != null) { for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) @@ -747,6 +749,10 @@ } } } }catch(Exception ex ) { MainPage.Log($"更新环境传感器界面异常:{ex.Message}"); } }); } HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -257,13 +257,18 @@ }; energyView1.AddChidren(btnEnergyText1); double realTimePower = 0; double.TryParse(function.GetAttrState(FunctionAttributeKey.Power), out realTimePower); realTimePower /= 1000; var energyValue1 = new Button() { Width = Application.GetRealWidth(355), TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.PromptingColor1, Text = function.GetAttrState(FunctionAttributeKey.Power) + "kW", Text = realTimePower + "kW", }; energyView1.AddChidren(energyValue1); @@ -296,7 +301,7 @@ }; energyView2.AddChidren(btnEnergyText2); var energyValue2 = new Button() var btnEnergyValue2 = new Button() { Width = Application.GetRealWidth(355), TextAlignment = TextAlignment.CenterRight, @@ -304,7 +309,7 @@ TextColor = CSS_Color.PromptingColor1, Text = "--kW", }; energyView2.AddChidren(energyValue2); energyView2.AddChidren(btnEnergyValue2); energyView2.AddChidren( new Button() @@ -316,8 +321,9 @@ Height = Application.GetRealHeight(1) }); new System.Threading.Thread(() => { var pm = new DAL.Server.HttpServerRequest(); new System.Threading.Thread(() => { var pm = new HttpServerRequest(); var data = pm.GetLastMonthHistory(function.deviceId,FunctionAttributeKey.TotalElectricity); if(data!= null) { @@ -326,16 +332,27 @@ var dataPack = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(data.Data.ToString()); if(dataPack!=null) { var dataValue = dataPack.GetValue("property").ToString(); try { var dataValue = dataPack.GetValue("monthDiff").ToString(); if(!string.IsNullOrEmpty(dataValue)) { btnEnergyText2.Text = dataValue + "kW"; Application.RunOnMainThread(() => { btnEnergyValue2.Text = dataValue + "kW‧h"; }); } } catch { } } } } }) { IsBackground = true }.Start(); }) { IsBackground = true }.Start(); #endregion }