.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,19 +1,18 @@ <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs"> <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"> <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/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" /> <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="404" Column="11" /> <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" /> <File FileName="HDL_ON/Entity/FunctionList.cs" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" /> <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" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -21,19 +20,47 @@ <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="DAL" expanded="True"> <Node name="DriverLayer" expanded="True"> <Node name="Control.cs" selected="True" /> </Node> <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> <Node name="UI" expanded="True"> <Node name="CSS" expanded="True" /> <Node name="UI1-Login" expanded="True" /> <Node name="UI2" expanded="True"> <Node name="1-HomePage" expanded="True" /> <Node name="2-Classification" expanded="True" /> <Node name="4-PersonalCenter" expanded="True"> <Node name="PirDevice" 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_iOS" expanded="True" /> <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> </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> </Node> </State> </Pad> @@ -45,8 +72,8 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> HDL-ON_Android/Assets/Language.ini
@@ -411,6 +411,7 @@ 426=Air dry time 427=Disinfect time 428=Anion Time 429=Real time power consumption: {0}kw 429=H 430=Min @@ -422,6 +423,7 @@ 436=Added Devices 437=Device List 438=humidity:{0}% air:{1} wind:{2} 1000=Indoor Humidity @@ -1186,6 +1188,7 @@ 436=已添加功能 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 439=实时功耗: {0}kW 1000=室内湿度 1001=童锁 HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -336,6 +336,7 @@ <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" /> <Folder Include="Assets\Phone\PirIcon\" /> <Folder Include="Assets\Phone\VideoIcon\" /> <Folder Include="Assets\Phone\FunctionIcon\Energy\" /> </ItemGroup> <ItemGroup /> <ItemGroup> @@ -1076,16 +1077,11 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\0.png" /> <AndroidAsset Include="Assets\Phone\PirIcon\add.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\AC\More.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" /> </ItemGroup> <ItemGroup> <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> <AndroidNativeLibrary Include="libs\armeabi-v7a\libjcore127.so" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\ys\ys.csproj"> <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project> <Name>ys</Name> </ProjectReference> </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -446,6 +446,7 @@ <Folder Include="Resources\Phone\FunctionIcon\ArmSensor\" /> <Folder Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\" /> <Folder Include="Resources\Phone\FunctionIcon\EnvirSensor\" /> <Folder Include="Resources\Phone\FunctionIcon\Energy\" /> </ItemGroup> <ItemGroup> <InterfaceDefinition Include="LaunchScreen.storyboard" /> @@ -1195,6 +1196,7 @@ <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TvocIcon.png" /> <BundleResource Include="Resources\Phone\PirIcon\add.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\AC\More.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Resources/Language.ini
@@ -411,6 +411,7 @@ 426=Air dry time 427=Disinfect time 428=Anion Time 429=Real time power consumption: {0}kw 429=H 430=Min @@ -1187,6 +1188,7 @@ 436=已添加功能 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 439=实时功耗: {0}kW 1000=室内湿度 1001=童锁 HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
HDL_APP_Project.sln
@@ -9,8 +9,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,17 +55,5 @@ {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU EndGlobalSection EndGlobal HDL_ON/Common/R.cs
@@ -4,7 +4,7 @@ { public static class StringId { //public const int EnergyMonitoring = 439; public const int RealTimePowerConsumption = 439; public const int EnvirSensorValueTip = 438; public const int DeviceList = 437; public const int AddedDevice = 436; HDL_ON/Entity/Function/Function.cs
@@ -1070,6 +1070,23 @@ } #endregion #region 能源 /// <summary> /// 能源模块 /// </summary> public const string EnergyStandard = "energy.standard"; /// <summary> /// 能源spk列表 /// </summary> /// <returns></returns> public static List<string> EnergySpkList() { var spkList = new List<string>(); spkList.Add(EnergyStandard); return spkList; } #endregion #region 音乐 /// <summary> /// (音乐) HDL_ON/Entity/FunctionList.cs
@@ -80,6 +80,17 @@ var spkList = SPK.AirFreshSpkList(); return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } /// <summary> /// 能源列表 /// </summary> /// <returns></returns> public List<Function> GetEnergyList() { var spkList = SPK.EnergySpkList(); return Functions.FindAll((obj) => spkList.Contains(obj.spk)); } #region 家电列表 electricals /// <summary> /// 家电列表 HDL_ON/HDL_ON.projitems
@@ -391,6 +391,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\Send.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EchartsOption_Energy.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)DAL\" /> HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -204,6 +204,7 @@ } else { //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/FuntionControlView/Energy/EchartsOption_Energy.cs
New file @@ -0,0 +1,150 @@ using System; using System.Collections.Generic; namespace HDL_ON.UI.EchartsOption_Energy { public class EchartsOption_Energy { ///// <summary> ///// ///// </summary> public EchartTitle title = new EchartTitle(); /// <summary> /// /// </summary> public EchartTooltip tooltip; /// <summary> /// /// </summary> public EchartGrid grid = new EchartGrid(); /// <summary> /// /// </summary> public Echart_xAxis xAxis = new Echart_xAxis(); /// <summary> /// /// </summary> public Echart_yAxis yAxis = new Echart_yAxis(); /// <summary> /// /// </summary> public List<EchartSeriesItem> series =new List<EchartSeriesItem>(); public EchartsOption_Energy() { tooltip = new EchartTooltip { trigger = "axis", }; } } public class EchartTitle { public string text; } /// <summary> /// 线条属性 /// </summary> public class EchartLineStyle { /// <summary> /// 坐标轴刻度线宽 /// type | string /// 可选: /// 'solid' /// 'dashed' /// 'dotted' /// </summary> public string type = "solid"; /// <summary> /// /// </summary> public int width = 1; /// <summary> /// 刻度线的颜色 /// </summary> public string color = "#333"; } public class EchartTooltip { /// <summary> /// /// </summary> public string trigger ="axis"; } public class EchartGrid { /// <summary> /// /// </summary> public string left = "3%"; /// <summary> /// /// </summary> public string right = "4%"; /// <summary> /// /// </summary> public string bottom = "3%"; /// <summary> /// /// </summary> public bool containLabel = true; } /// <summary> /// 坐标轴属性 /// </summary> public class Echart_xAxis { public string type = "category"; public List<string> data = new List<string>(); public int offset = 5; public bool boundaryGap = false; } /// <summary> /// 坐标轴属性 /// </summary> public class Echart_yAxis { public string type = "value"; } public class EchartSeriesItem { /// <summary> /// 客厅 /// </summary> public string name = ""; /// <summary> /// /// </summary> public string type = "line"; /// <summary> /// /// </summary> public bool smooth = true; /// <summary> /// /// </summary> public List<int> data; /// <summary> /// none 去掉拐点 /// </summary> public string symbol = "none"; /// <summary> /// 线条样式 /// </summary> public EchartLineStyle lineStyle; } } HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -1,5 +1,7 @@ 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 @@ -7,26 +9,44 @@ public class EnergyMainPage : FrameLayout { FrameLayout bodyView; List<uint> colorList = new List<uint>(){0xFF80AEFF, 0xFFFFD154, 0xFFFF9D54, 0xFFFE6A6A, 0xFFB183C3, 0xFFADE764, 0xFFD7504B, 0xFFC6E579, 0xFFF4E001, 0xFFF0805A, 0xFF26C0C0}; List<string> colorList2 = new List<string>() { "#80AEFF", "#FFD154", "#FF9D54", "#FE6A6A", "#B183C3", "#ADE764", "#D7504B", "#C6E579", "#F4E001", "#F0805A", "#26C0C0"}; public EnergyMainPage() { bodyView = this; } /// <summary> /// /// </summary> public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView(); bodyView.BackgroundColor = CSS_Color.BackgroundColor; var contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(603), }; bodyView.AddChidren(contentView); #region 顶部view var generalTableView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(80), Y = Application.GetRealHeight(16), Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(148), Radius = (uint)Application.GetRealWidth(5), BackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(generalTableView); contentView.AddChidren(generalTableView); TextButton btnTotalValue = new TextButton() { @@ -58,18 +78,19 @@ }; generalTableView.AddChidren(btnTotalValueUint); var btnValue = new Button() var btnRealTimeData = new Button() { X = Application.GetRealWidth(18), Y = btnTotalValue.Bottom, Width = Application.GetRealWidth(209), Height = Application.GetRealWidth(28), TextColor = CSS_Color.FirstLevelTitleColor, TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.SubheadingFontSize, IsBold = true, TextAlignment = TextAlignment.CenterLeft, TextID = StringId.RealTimePowerConsumption, }; generalTableView.AddChidren(btnValue); generalTableView.AddChidren(btnRealTimeData); btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", "0"); var echartsView = new FrameLayout() { @@ -97,6 +118,361 @@ myEchartsView.ShowWithOption(echartRootJson); var btnDrodDown = new Button() { Y = Application.GetRealWidth(118), Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(30), UnSelectedImagePath = "FunctionIcon/Energy/EnergyDrodDownIcon.png", }; generalTableView.AddChidren(btnDrodDown); #endregion var energyList = FunctionList.List.GetEnergyList(); var energyListView = new FrameLayout() { Y = generalTableView.Bottom + Application.GetRealWidth(8), Height = Application.GetRealWidth(116 * energyList.Count) , }; contentView.AddChidren(energyListView); int index = 0; foreach(var energy in energyList) { EnergyRow(energy, energyListView, index); index++; } } public void ddd(FrameLayout contentView) { FrameLayout diagramView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(420), BackgroundColor = CSS_Color.MainBackgroundColor, Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, BorderWidth = 0, }; contentView.AddChidren(diagramView); #region 选择数据日期范围 var showDataTypeView = new FrameLayout() { X = Application.GetRealWidth(183), Y = Application.GetRealHeight(12), Width = Application.GetRealWidth(144), Height = Application.GetRealHeight(24), BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png", }; diagramView.AddChidren(showDataTypeView); var btnShowHistroyData_Day = new Button() { Width = Application.GetRealWidth(48), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.PromptingColor2, SelectedTextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, IsSelected = true, TextID = StringId.day, }; showDataTypeView.AddChidren(btnShowHistroyData_Day); var btnShowHistroyData_Week = new Button() { X = Application.GetRealWidth(48), Width = Application.GetRealWidth(48), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.PromptingColor2, SelectedTextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextID = StringId.week, }; showDataTypeView.AddChidren(btnShowHistroyData_Week); var btnShowHistroyData_Month = new Button() { X = Application.GetRealWidth(48 * 2), Width = Application.GetRealWidth(48), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.PromptingColor2, SelectedTextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = DateTime.Now.Month.ToString() + Language.StringByID(StringId.month), }; showDataTypeView.AddChidren(btnShowHistroyData_Month); #endregion var historyDataView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(52), Width = Application.GetRealWidth(343 - 32), Height = Application.GetRealHeight(270), }; diagramView.AddChidren(historyDataView); var myEchartsView = new MyEchartsViewOn(); historyDataView.AddChidren(myEchartsView); } /// <summary> /// 读取传感器历史数据 /// </summary> void ddd2(string curQueryType,Function function,int index) { var seriesList = new List<EchartSeriesItem>(); var loadPage = new Loading() { LodingBackgroundColor = 0x88888888, }; historyDataView.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); if (revertObj != null) { if (revertObj.Code == StateCode.SUCCESS) { var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString()); var sItem = new EchartSeriesItem { data = new List<int>(), lineStyle = new EchartLineStyle() { color = colorList2[i], #if __IOS__ width = 5, #elif __ANDROID__ width = 2, #endif }, }; foreach (var d in revertData) { echartRootJson.xAxis.data.Add(d.fieldName); echartRootJson.yAxis.data.Add(d.fieldValue); } seriesList.Add(sItem); } else { Application.RunOnMainThread(() => { IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed), false); }); } } i++; } } catch (Exception ex) { MainPage.Log($"sensor history error : {ex.Message}"); } finally { Application.RunOnMainThread(() => { loadPage.Hide(); }); } }) { IsBackground = true }.Start(); EchartsOption echartRootJson = new EchartsOption(); echartRootJson.series = seriesList; #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(); }; } /// <summary> /// /// </summary> public void EnergyRow(Function energy, FrameLayout view, int index) { var btnLine = new Button() { Y = Application.GetRealWidth(116 * index), Height = Application.GetRealWidth(16), }; view.AddChidren(btnLine); var row = new FrameLayout() { Y = btnLine.Bottom, Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(100), Radius = (uint)Application.GetRealWidth(12), BackgroundColor = CSS_Color.MainBackgroundColor, }; view.AddChidren(row); var btnColorTip = new Button() { X = Application.GetRealWidth(8), Y = Application.GetRealWidth(16), Width = Application.GetRealWidth(12), Height = Application.GetRealWidth(12), BackgroundColor = colorList[index], }; row.AddChidren(btnColorTip); var btnName = new Button() { X = Application.GetRealWidth(8 + 10 + 32), Y = Application.GetRealHeight(10), Width = Application.GetRealWidth(200), Height = Application.GetRealHeight(24), Text = energy.name, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, }; row.AddChidren(btnName); var btnFromFloor = new Button() { X = Application.GetRealWidth(8 + 10 + 32), Y = Application.GetRealHeight(10 + 24), Width = Application.GetRealWidth(200), Height = Application.GetRealHeight(18), Text = energy.GetRoomListName(), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; row.AddChidren(btnFromFloor); var btnValue = new Button() { X = Application.GetRealWidth(28), Y = Application.GetRealWidth(57), Width = Application.GetRealWidth(226), Height = Application.GetRealWidth(43), TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.HeadlineFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Text = "---" }; row.AddChidren(btnValue); var btnSetting = new Button() { X = Application.GetRealWidth(291), Y = Application.GetRealWidth(6), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "Public/FuncInfoSetIcon.png", }; row.AddChidren(btnSetting); Button btnSeltSensorValue = new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealWidth(47), Width = Application.GetRealWidth(200), Height = Application.GetRealWidth(43), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, IsBold = true, TextSize = CSS_FontSize.HeadlineFontSize, }; row.AddChidren(btnSeltSensorValue); Button btnShowData; btnShowData = new Button() { X = Application.GetRealWidth(291), Y = Application.GetRealWidth(62), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png", SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", IsSelected = true, }; row.AddChidren(btnShowData); btnSetting.MouseUpEventHandler = (sender, e) => { Action backAction = () => { btnName.Text = energy.name; }; var infoView = new FunctionBaseInfoSetPage(energy, backAction); MainPage.BasePageView.AddChidren(infoView); infoView.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; } } } HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -301,7 +301,7 @@ /// <summary> /// /// </summary> public List<string> data; public List<string> data = new List<string>(); /// <summary> /// 坐标轴偏移 /// </summary> HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -944,10 +944,7 @@ } void LoadEvent_SwitchOtherRoomSensorData() { } } public class EnvironmentalSensorHistor