From 950c0732a016ad3154981e983e71696055db2003 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 08 六月 2021 16:49:12 +0800 Subject: [PATCH] 5月功能迭代版本 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs | 21 +++++ HDL-ON_Android/Resources/mipmap-xhdpi/Loading.png | 0 HDL-ON_Android/Assets/Language.ini | 3 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs | 2 HDL-ON_Android/Resources/mipmap-hdpi/Loading.png | 0 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 2 HDL_ON/DAL/Mqtt/MqttClient.cs | 5 HDL_ON/UI/UI0-Public/TopViewDiv.cs | 12 +- HDL-ON_Android/Resources/mipmap-xxxhdpi/Loading.png | 0 HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs | 80 +++++++++---------- HDL-ON_Android/HDL-ON_Android.csproj | 20 +++++ HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 3 HDL_ON/Common/HDLCommon.cs | 2 HDL-ON_Android/Resources/Resource.designer.cs | 5 + HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs | 4 HDL-ON_Android/Resources/mipmap-mdpi/Loading.png | 0 .vs/HDL_APP_Project/xs/UserPrefs.xml | 31 ++----- HDL-ON_Android/Resources/drawable/Loading.png | 0 HDL_ON/DAL/DriverLayer/Control.cs | 1 HDL_ON/UI/MainPage.cs | 2 HDL-ON_Android/Resources/mipmap-xxhdpi/Loading.png | 0 HDL_ON/UI/UI1-Login/LoginPage.cs | 3 24 files changed, 120 insertions(+), 82 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 8821c68..fd0c567 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,20 +1,15 @@ -锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> +锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs"> + <MonoDevelop.Ide.Workbench> <Files> - <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="95" IsPinned="True" /> + <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="8" Column="17" IsPinned="True" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="360" Column="50" /> + <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="220" Column="56" /> + <File FileName="HDL_ON/UI/MainPage.cs" Line="23" Column="55" /> + <File FileName="HDL_ON/Common/HDLCommon.cs" Line="353" Column="41" /> + <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="720" Column="14" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs" Line="135" Column="35" /> <File FileName="HDL-ON_iOS/Info.plist" /> - <File FileName="HDL_ON/UI/MainPage.cs" /> - <File FileName="HDL-ON_iOS/Resources/Language.ini" /> - <File FileName="HDL-ON_Android/Assets/Language.ini" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs" /> - <File FileName="HDL_ON/Common/R.cs" /> - <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" /> - <File FileName="HDL_ON/DAL/Mqtt/MqttInfoConfig.cs" /> - <File FileName="HDL_ON/UI/UI1-Login/RegisterPage.cs" Line="610" Column="44" /> - <File FileName="HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs" Line="354" Column="44" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -24,13 +19,8 @@ <Node name="DAL" expanded="True"> <Node name="Server" expanded="True" /> </Node> - <Node name="UI" expanded="True"> - <Node name="UI1-Login" expanded="True"> - <Node name="ForgetPasswordPage.cs" selected="True" /> - </Node> - </Node> </Node> - <Node name="HDL-ON_iOS" expanded="True" /> + <Node name="HDL-ON_iOS" expanded="True" selected="True" /> </Node> </State> </Pad> @@ -49,7 +39,6 @@ <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/BindingResidence/BindingResidencePage.cs" relfile="HDL_ON/UI/BindingResidence/BindingResidencePage.cs" line="121" column="1" /> - <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="697" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index e612bf0..4c5c822 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -70,7 +70,7 @@ 69=All 70=Curtain 71=Name -72=The address of the residence +72=Address 73=Floor Management 74=Room Management 75=Administrator migration @@ -382,6 +382,7 @@ 378=Transition time 379=Transition speed 380=This function is not available! +381=Reload 400=Welcome home 401=Invalid barcode, please try again 402=Try again diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index efa837a..3140d0e 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -337,6 +337,26 @@ <SubType></SubType> <Generator></Generator> </AndroidResource> + <AndroidResource Include="Resources\mipmap-xhdpi\Loading.png"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + <AndroidResource Include="Resources\mipmap-hdpi\Loading.png"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + <AndroidResource Include="Resources\mipmap-mdpi\Loading.png"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + <AndroidResource Include="Resources\mipmap-xxhdpi\Loading.png"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> + <AndroidResource Include="Resources\mipmap-xxxhdpi\Loading.png"> + <SubType></SubType> + <Generator></Generator> + </AndroidResource> </ItemGroup> <ItemGroup> <Folder Include="Resources\drawable\" /> diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index db1533f..98454bb 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202106063" android:versionName="1.2.202106063" package="com.hdl.onpro"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202106081" android:versionName="1.2.202106081" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> <!-- 鍙瀵硅鏉冮檺--> <uses-permission android:name="android.permission.CAMERA" /> diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index d143a30..c504701 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -10428,7 +10428,10 @@ public const int ic_launcher_round = 2131558401; // aapt resource value: 0x7F0D0003 - public const int videogo_icon = 2131558403; + public const int Loading = 2131558403; + + // aapt resource value: 0x7F0D0004 + public const int videogo_icon = 2131558404; static Mipmap() { diff --git a/HDL-ON_Android/Resources/drawable/Loading.png b/HDL-ON_Android/Resources/drawable/Loading.png index ea80938..9f84a83 100644 --- a/HDL-ON_Android/Resources/drawable/Loading.png +++ b/HDL-ON_Android/Resources/drawable/Loading.png Binary files differ diff --git a/HDL-ON_Android/Resources/mipmap-hdpi/Loading.png b/HDL-ON_Android/Resources/mipmap-hdpi/Loading.png new file mode 100644 index 0000000..57f5c27 --- /dev/null +++ b/HDL-ON_Android/Resources/mipmap-hdpi/Loading.png Binary files differ diff --git a/HDL-ON_Android/Resources/mipmap-mdpi/Loading.png b/HDL-ON_Android/Resources/mipmap-mdpi/Loading.png new file mode 100644 index 0000000..57f5c27 --- /dev/null +++ b/HDL-ON_Android/Resources/mipmap-mdpi/Loading.png Binary files differ diff --git a/HDL-ON_Android/Resources/mipmap-xhdpi/Loading.png b/HDL-ON_Android/Resources/mipmap-xhdpi/Loading.png new file mode 100644 index 0000000..57f5c27 --- /dev/null +++ b/HDL-ON_Android/Resources/mipmap-xhdpi/Loading.png Binary files differ diff --git a/HDL-ON_Android/Resources/mipmap-xxhdpi/Loading.png b/HDL-ON_Android/Resources/mipmap-xxhdpi/Loading.png new file mode 100644 index 0000000..ea64f54 --- /dev/null +++ b/HDL-ON_Android/Resources/mipmap-xxhdpi/Loading.png Binary files differ diff --git a/HDL-ON_Android/Resources/mipmap-xxxhdpi/Loading.png b/HDL-ON_Android/Resources/mipmap-xxxhdpi/Loading.png new file mode 100644 index 0000000..3544e75 --- /dev/null +++ b/HDL-ON_Android/Resources/mipmap-xxxhdpi/Loading.png Binary files differ diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 825cf7a..47a0cd9 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.2.202106063</string> + <string>1.2.202106081</string> <key>CFBundleVersion</key> - <string>1.2.06063</string> + <string>1.2.06081</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index e612bf0..4c5c822 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -70,7 +70,7 @@ 69=All 70=Curtain 71=Name -72=The address of the residence +72=Address 73=Floor Management 74=Room Management 75=Administrator migration @@ -382,6 +382,7 @@ 378=Transition time 379=Transition speed 380=This function is not available! +381=Reload 400=Welcome home 401=Invalid barcode, please try again 402=Try again diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index f30ab05..cf27527 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -349,6 +349,8 @@ case "13602944661": case "18778381374": case "18316672920": + case "15626203746": + case "551775569@qq.com": return; } diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index 559605c..e4f1c1a 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -283,6 +283,7 @@ /// </summary> public void ControlScene(Scene scene) { + //杩滅▼鎴栬�呮帶鍒秎ink缃戝叧鍦烘櫙 if (!Ins.GatewayOnline_Local || DB_ResidenceData.Instance.GatewayType == 1) { new System.Threading.Thread(() => diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 4212f96..93d0ae7 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -224,10 +224,10 @@ Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; - //缃戝叧瀵嗛挜鏇存柊閫氱煡 + //涓�绔彛瀵嗛挜鏇存柊閫氱煡 var mqttkeyChange = new MqttTopicFilter() { - Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/custom/mqtt/secret/change", + Topic = $"/user/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/custom/mqtt/secret/change", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; @@ -710,6 +710,7 @@ case "18316672920": case "15971583093": case "15626203746": + case "551775569@qq.com": return; } diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 015f1e3..798e219 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -20,7 +20,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.2.0606"; + public static string VersionString = "1.2.0608"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs index 36b2834..0cacd40 100644 --- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs +++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs @@ -98,12 +98,6 @@ }; contentView.AddChidren(btnBackIcon); - btnBack = new Button() - { - Width = Application.GetRealWidth(100), - }; - contentView.AddChidren(btnBack); - Button btnTilte = new Button() { Gravity = Gravity.CenterHorizontal, @@ -118,6 +112,12 @@ contentView.AddChidren(btnTilte); + btnBack = new Button() + { + Width = Application.GetRealWidth(70), + }; + contentView.AddChidren(btnBack); + LoadEventList(); } /// <summary> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index b2a3213..344424f 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -216,7 +216,8 @@ //etAccount.Text = "BB01010101@evoyo.com";//鍙瀵硅 //etAccount.Text = "13168123446"; //etAccount.Text = "13676202754";//宸存灄鏈嶅姟鍣� - etAccount.Text = "13602944661";//kx + //etAccount.Text = "13602944661";//kx + etAccount.Text = "551775569@qq.com";//wcf //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374 //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 鍥藉鏈嶅姟鍣ㄦ祴璇� } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs index 20b2b55..ed1e894 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs @@ -128,6 +128,27 @@ AddDeviceEvent?.Invoke(new Function()); this.CloseForm(); }); + }else if(pack.Code == "10801") + { + var mes = ""; + if (Language.CurrentLanguage == "Chinese") + { + mes = "璇ヨ澶囧凡缁忚娣诲姞銆�"; + } + else + { + mes = "This device has been added."; + } + Application.RunOnMainThread(() => + { + var tip = new Tip() + { + Text = mes, + CloseTime = 2, + Direction = AMPopTipDirection.None + }; + tip.Show(MainPage.BaseView); + }); } else { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs index c35f687..4c24a2c 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/SenesorMegahealthManagerPage.cs @@ -67,11 +67,11 @@ if (Language.CurrentLanguage == "Chinese") { - btnTip.Text = "璇ヨ澶囧凡鐗╂嫙鍒板畨闃蹭紶鎰熷櫒绫诲埆鍙埌瀵瑰簲绫诲埆鏌ョ湅浣跨敤"; + btnTip.Text = "璇ヨ澶囧凡娣诲姞鍒板畨闃蹭紶鎰熷櫒绫诲埆锛屽彲鍒板搴斿姛鑳芥澘鍧楁煡鐪�"; } else { - btnTip.Text = "The device is planned to be used in the corresponding category for security sensor."; + btnTip.Text = "The device has been added to the security sensor category, which can be viewed in the corresponding function block."; } var btnDel = new Button() { diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs index f6365e3..a728cbc 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs @@ -29,13 +29,13 @@ /// </summary> TextButton btnTotalValue; /// <summary> + /// 鎬诲姛鑰�-楗煎浘 + /// </summary> + MyEchartsViewOn myEchartsView_Pie; + /// <summary> /// 鍘嗗彶鏁版嵁鍖哄煙 /// </summary> FrameLayout diagramView; - /// <summary> - /// 鏇茬嚎鍥� - /// </summary> - MyEchartsViewOn myLineEchartsView; /// <summary> /// 鏇茬嚎鍥炬暟鎹畇tring /// </summary> @@ -64,7 +64,7 @@ /// <summary> /// 鍘嗗彶鏁版嵁鍥捐〃 /// </summary> - MyEchartsViewOn myEchartsView; + MyEchartsViewOn myEchartsView_Line; /// <summary> /// 鏇茬嚎鍥炬槸鍚﹀睍寮� /// </summary> @@ -105,7 +105,7 @@ generalTableView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(16), + Y = Application.GetRealWidth(16), Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(148),//419//148 Radius = (uint)Application.GetRealWidth(5), @@ -154,8 +154,6 @@ }; generalTableView.AddChidren(btnRealTimeData); - UpdataValue(); - var echartsView = new FrameLayout() { @@ -165,29 +163,22 @@ //Y = Application.GetRealWidth(16), }; generalTableView.AddChidren(echartsView); - myEchartsView = new MyEchartsViewOn() + myEchartsView_Pie = new MyEchartsViewOn() { Width = Application.GetRealWidth(118), Height = Application.GetRealWidth(118), }; + echartsView.AddChidren(myEchartsView_Pie); - echartsView.AddChidren(myEchartsView); Dictionary<string, string> list = new Dictionary<string, string>(); - foreach(var ene in energyList) { double tt = 0; double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt); tt *= 100;//涔樹互100锛屽皬浜�1鏃犳硶鍔犺浇echart - list.Add(ene.name, tt.ToString()); } - - var echartsPie = new EchartsOption_Pie(); - var echartRootJson = echartsPie.InitDateJson(list); - //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson); - myEchartsView.ShowWithOption(echartRootJson); - + myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list)); btnDrodDown = new Button() { @@ -204,6 +195,7 @@ showDiagramView(); }; + UpdataValue(); #endregion @@ -218,7 +210,11 @@ { EnergyRow(energy, energyListView, index); index++; - Control.Ins.SendReadCommand(energy); + new System.Threading.Thread(() => + { + Control.Ins.SendReadCommand(energy); + }) + { IsBackground = true }.Start(); } @@ -231,13 +227,13 @@ { if (isUnfoldOrStow)//灞曞紑 { - generalTableView.Height = Application.GetRealHeight(419); + generalTableView.Height = Application.GetRealWidth(419); btnDrodDown.Y = Application.GetRealWidth(389); btnDrodDown.IsSelected = true; } else { - generalTableView.Height = Application.GetRealHeight(148); + generalTableView.Height = Application.GetRealWidth(148); btnDrodDown.Y = Application.GetRealWidth(118); btnDrodDown.IsSelected = false; } @@ -256,10 +252,10 @@ diagramView = new FrameLayout() { - Y = Application.GetRealHeight(136), + Y = Application.GetRealWidth(136), Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), - Height = Application.GetRealWidth(241), + Height = Application.GetRealWidth(281), BackgroundColor = CSS_Color.MainBackgroundColor, Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, @@ -361,19 +357,17 @@ var historyDataView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(52), - //Width = Application.GetRealWidth(343 - 32), - Height = Application.GetRealHeight(178), + Y = Application.GetRealWidth(52), + Height = Application.GetRealWidth(190), }; diagramView.AddChidren(historyDataView); - myEchartsView = new MyEchartsViewOn() { - Y = Application.GetRealHeight(10), - Height = Application.GetRealHeight(150), + myEchartsView_Line = new MyEchartsViewOn() + { + Y = Application.GetRealWidth(10), + Height = Application.GetRealWidth(180), }; - - historyDataView.AddChidren(myEchartsView); - + historyDataView.AddChidren(myEchartsView_Line); } /// <summary> @@ -392,7 +386,7 @@ Application.RunOnMainThread(() => { - myEchartsView.ShowWithOption(opString); + myEchartsView_Line.ShowWithOption(opString); }); return; @@ -435,11 +429,6 @@ sr.attributes.Add(new FunctionAttributes() { key = "ydata" }); } sr.SetAttrState("ydata", brokenLine.InitYdataText(sr.name, revertData, sr.GetAttrState("color")) + ","); - //if (sr.GetAttribute("ydata") == null) - //{ - // sr.attributes.Add(new FunctionAttributes() { key = "ydata" }); - //} - //sr.SetAttrState("ydata", brokenLine.InitYdataText(sr.name, revertData, sr.GetAttrState("color")) + ","); } } brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)"; @@ -452,7 +441,7 @@ Application.RunOnMainThread(() => { - myEchartsView.ShowWithOption(opString); + myEchartsView_Line.ShowWithOption(opString); }); } catch (Exception ex) @@ -515,8 +504,6 @@ row.Y = btnLine.Bottom; view.AddChidren(row); listButton_value.Add(row.btnValue); - - Control.Ins.SendReadCommand(energy); } @@ -560,6 +547,7 @@ { double totalValue = 0; double realtimeValue = 0; + Dictionary<string, string> list = new Dictionary<string, string>();//楗煎浘鏁版嵁 foreach (var ene in bodyView.energyList) { double power = 0; @@ -569,6 +557,13 @@ int realTimePower = 0; int.TryParse(ene.GetAttrState(FunctionAttributeKey.Power), out realTimePower); realtimeValue += realTimePower; + + #region 楗煎浘鏁版嵁 + double tt = 0; + double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt); + tt *= 100;//涔樹互100锛屽皬浜�1鏃犳硶鍔犺浇echart + list.Add(ene.name, tt.ToString()); + #endregion } bodyView.btnTotalValue.Text = totalValue.ToString(); realtimeValue /= 1000; @@ -576,6 +571,9 @@ ///鍔ㄦ�佽幏鍙栨枃鏈搴� bodyView.btnTotalValue.Width = bodyView.btnTotalValue.GetTextWidth() + Application.GetRealWidth(5); bodyView.btnTotalValueUint.X = bodyView.btnTotalValue.Right; + //鍒锋柊楗煎浘 + bodyView.myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list)); + } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs index 2f3bccc..050adba 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs @@ -132,7 +132,7 @@ top: '10%', left: '10%', right: '10%', - bottom: '10%', + bottom: '15%', }, xAxis: { type: 'category', diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs index 01603a3..f2c2ae5 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs @@ -128,7 +128,7 @@ Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(52), Width = Application.GetRealWidth(343 - 32), - Height = Application.GetRealHeight(270), + Height = Application.GetRealWidth(270), }; diagramView.AddChidren(historyDataView); -- Gitblit v1.8.0