.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,65 +1,52 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.26569F89-0BA9-4C06-81F2-764A3AF2E1B7" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/LoginPage.cs"> <Files> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="249" Column="85" /> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="19" Column="23" /> <File FileName="HDL_ON/Common/R.cs" Line="13" Column="43" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="204" Column="18" /> <File FileName="HDL-ON_iOS/Info.plist" /> <File FileName="HDL_ON/Entity/FunctionList.cs" Line="82" Column="10" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="402" Column="25" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="64" Column="1" /> <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="338" Column="1" /> <File FileName="../../Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688852687634638/Cache/File/2021-03/DeviceTemperatureHistoryForm(1).cs" Line="401" Column="18" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="55" Column="1" /> <File FileName="HDL_ON/Common/R.cs" Line="1310" Column="45" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="386" Column="60" /> <File FileName="HDL_ON/Entity/FunctionList.cs" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" /> <File FileName="../../Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688852687634638/Cache/File/2021-03/DeviceTemperatureHistoryForm(1).cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" Line="488" Column="50" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="20" Column="16" /> <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="498" Column="45" /> <File FileName="HDL_ON/DAL/Server/IMessageCommon.cs" Line="213" Column="43" /> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="89" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" Line="44" Column="1" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1824" Column="90" /> </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 name="HttpServerRequest.cs" selected="True" /> </Node> </Node> <Node name="Entity" expanded="True"> <Node name="Function" expanded="True" /> <Node name="Server" expanded="True" /> </Node> <Node name="UI" expanded="True"> <Node name="CSS" expanded="True" /> <Node name="UI1-Login" expanded="True" /> <Node name="UI0-Stan" expanded="True"> <Node name="Form" expanded="True"> <Node name="Base" expanded="True" /> </Node> </Node> <Node name="UI1-Login" expanded="True"> <Node name="LoginPage.cs" selected="True" /> </Node> <Node name="UI2" expanded="True"> <Node name="2-Classification" expanded="True" /> <Node name="4-PersonalCenter" expanded="True"> <Node name="PirDevice" expanded="True" /> <Node name="AddFunction" expanded="True" /> </Node> <Node name="FuntionControlView" expanded="True"> <Node name="1ContorlPage" expanded="True" /> <Node name="Energy" expanded="True" /> <Node name="EnvironmentalScience" 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="Energy" 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> </Node> <Node name="Resources" expanded="True" /> </Node> </Node> </State> @@ -72,7 +59,7 @@ <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="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> 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="202103262" android:versionName="1.1.202103262" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103302" android:versionName="1.1.202103302" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <!-- 定位权限--> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.1.202103262</string> <string>1.1.202103301</string> <key>CFBundleVersion</key> <string>202103262</string> <string>202103301</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> 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"; public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; /// <summary> /// RegionMark /// </summary> HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.1.0326"; public static string VersionString = "1.2.0330"; ///// <summary> ///// 客户端类型 ///// </summary> HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
@@ -293,8 +293,10 @@ } catch (Exception ex) { #if DEBUG //出现未知错误,数据丢失 HdlMessageLogic.Current.ShowAppProgramIsError(ex); #endif return null; } } HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -204,6 +204,7 @@ } else { //etAccount.Text = "13168123446"; //etAccount.Text = "13602944661";//kx etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -495,7 +495,7 @@ case ShowFunction.Panel: break; case ShowFunction.SecurityMonitoring: functionCount = 1; //functionCount = 1; break; case ShowFunction.Sensor: functionCount = FunctionList.List.GetArmSensorList().Count; HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -485,8 +485,8 @@ var bodyView = new FrameLayout() { Y = Application.GetRealHeight(423), Height = Application.GetRealHeight(296), Y = Application.GetRealHeight(427),//667 Height = Application.GetRealHeight(240), BackgroundColor = CSS_Color.MainBackgroundColor, }; div.AddChidren(bodyView); @@ -496,7 +496,6 @@ Y = Application.GetRealHeight(16), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(296+200), }; bodyView.AddChidren(contentView); HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -405,7 +405,7 @@ { lightingView.SetViewStatus(lightTemp.state == "on"); } Console.WriteLine($"时间戳:{device.time_stamp} 时间:{device.GeteTime()} 烘干:{hotDryTemp.state} 风干:{windDryTemp.state} 消毒:{disinfectTemp.state} 灯光状态:{lightTemp.state}"); MainPage.Log($"时间戳:{device.time_stamp} 时间:{device.GeteTime()} 烘干:{hotDryTemp.state} 风干:{windDryTemp.state} 消毒:{disinfectTemp.state} 灯光状态:{lightTemp.state}"); #endregion #region 修改时间 HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
@@ -1,7 +1,7 @@ using System; using System.Collections.Generic; namespace HDL_ON.UI.EchartsOption_Energy namespace HDL_ON.UI.UI2.EchartsOption_Energy { public class EchartsOption_Energy { HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -3,6 +3,7 @@ using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI.CSS; using HDL_ON.UI.UI2.EchartsOption_Energy; using Shared; namespace HDL_ON.UI { @@ -100,7 +101,8 @@ //Y = Application.GetRealWidth(16), }; generalTableView.AddChidren(echartsView); MyEchartsViewOn myEchartsView = new MyEchartsViewOn() { MyEchartsViewOn myEchartsView = new MyEchartsViewOn() { Width = Application.GetRealWidth(118), Height = Application.GetRealWidth(118), }; @@ -144,11 +146,13 @@ index++; } } FrameLayout diagramView; List<Function> queryList = new List<Function>(); string curQueryType = "hour"; public void ddd(FrameLayout contentView) void d1(FrameLayout contentView) { FrameLayout diagramView = new FrameLayout() diagramView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), @@ -206,6 +210,37 @@ Text = DateTime.Now.Month.ToString() + Language.StringByID(StringId.month), }; showDataTypeView.AddChidren(btnShowHistroyData_Month); btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png"; btnShowHistroyData_Day.IsSelected = true; btnShowHistroyData_Month.IsSelected = false; btnShowHistroyData_Week.IsSelected = false; curQueryType = "hour"; d2(); }; btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png"; btnShowHistroyData_Day.IsSelected = false; btnShowHistroyData_Month.IsSelected = true; btnShowHistroyData_Week.IsSelected = false; curQueryType = "week"; d2(); }; btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png"; btnShowHistroyData_Day.IsSelected = false; btnShowHistroyData_Month.IsSelected = false; btnShowHistroyData_Week.IsSelected = true; curQueryType = "month"; d2(); }; #endregion var historyDataView = new FrameLayout() @@ -222,29 +257,40 @@ historyDataView.AddChidren(myEchartsView); } void d2() { int index = 0; var echartRootJson = new EchartsOption_Energy(); var seriesList = new List<EchartSeriesItem>(); foreach (var function in queryList) { var seriesItem = d3(function, index, echartRootJson.xAxis.data); seriesList.Add(seriesItem); } } /// <summary> /// 查询列表 /// </summary> /// <summary> /// 读取传感器历史数据 /// </summary> void ddd2(string curQueryType,Function function,int index) EchartSeriesItem d3(Function function, int index, List<string> xAxisData) { var seriesList = new List<EchartSeriesItem>(); EchartSeriesItem sItem = null; List<string> data = new List<string>(); var loadPage = new Loading() { LodingBackgroundColor = 0x88888888, }; historyDataView.AddChidren(loadPage); diagramView.AddChidren(loadPage); new System.Threading.Thread(() => { try { Application.RunOnMainThread(() => { loadPage.Start(Language.StringByID(StringId.PleaseWait)); }); int i = 0; { var sensorType = function.spk.Split(".")[0]; var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, sensorType); @@ -254,12 +300,12 @@ { var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString()); var sItem = new EchartSeriesItem sItem = new EchartSeriesItem { data = new List<int>(), lineStyle = new EchartLineStyle() { color = colorList2[i], color = colorList2[index], #if __IOS__ width = 5, #elif __ANDROID__ @@ -268,12 +314,22 @@ }, }; try { foreach (var d in revertData) { echartRootJson.xAxis.data.Add(d.fieldName); echartRootJson.yAxis.data.Add(d.fieldValue); if (xAxisData.Count == 0) { data.Add(d.fieldName); } seriesList.Add(sItem); sItem.data.Add(Convert.ToInt32(d.fieldValue)); } xAxisData.AddRange(data); } catch (Exception ex) { MainPage.Log($"revertData:{ex.Message}"); } } else { @@ -283,9 +339,6 @@ }); } } i++; } } catch (Exception ex) { @@ -298,57 +351,10 @@ loadPage.Hide(); }); } }) { IsBackground = true }.Start(); EchartsOption echartRootJson = new EchartsOption(); echartRootJson.series = seriesList; return sItem; #if __IOS__ echartRootJson.xAxis.axisLabel.fontSize = 22; echartRootJson.yAxis.axisLabel.fontSize = 22; #else echartRootJson.xAxis.axisLabel.fontSize = 8; echartRootJson.yAxis.axisLabel.fontSize = 8; #endif var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson); myEchartsView.ShowWithOptionJsonString(echartRootJsonString); } var curQueryType = ""; void LoadEvent_ChangeSensorHistoryShowType() { btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png"; btnShowHistroyData_Day.IsSelected = true; btnShowHistroyData_Month.IsSelected = false; btnShowHistroyData_Week.IsSelected = false; curQueryType = "hour"; LoadMothed_GetSensorHistoryData(); }; btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png"; btnShowHistroyData_Day.IsSelected = false; btnShowHistroyData_Month.IsSelected = true; btnShowHistroyData_Week.IsSelected = false; curQueryType = "week"; LoadMothed_GetSensorHistoryData(); }; btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) => { showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png"; btnShowHistroyData_Day.IsSelected = false; btnShowHistroyData_Month.IsSelected = false; btnShowHistroyData_Week.IsSelected = true; curQueryType = "month"; LoadMothed_GetSensorHistoryData(); }; //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson); //myEchartsView.ShowWithOptionJsonString(echartRootJsonString); } HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -1,7 +1,7 @@ using System; using System.Collections.Generic; namespace HDL_ON.Entity namespace HDL_ON.UI.UI2.EnvironmentalScience { #region 折线图 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -4,6 +4,7 @@ using HDL_ON.UI.CSS; using System.Collections.Generic; using HDL_ON.DAL.Server; using HDL_ON.UI.UI2.EnvironmentalScience; namespace HDL_ON.UI {