From 133fb9821663a8c26d99a231086209af8756e508 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 31 三月 2021 15:27:55 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs | 8
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 5
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs | 1
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs | 228 +++++++++++++++++++------------------
HDL-ON_iOS/Info.plist | 4
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs | 2
HDL_ON/DAL/Server/HttpUtil.cs | 4
.vs/HDL_APP_Project/xs/UserPrefs.xml | 71 ++++-------
HDL_ON/UI/MainPage.cs | 2
HDL_ON/UI/UI1-Login/LoginPage.cs | 1
14 files changed, 165 insertions(+), 169 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 6806064..11ba9e7 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.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 />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 22c467c..7554ec9 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="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" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 141f9ad..9c565f0 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.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>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 7f7b499..9fb2b21 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
/// 鍥哄畾鍩熷悕,姝e紡鐜
/// 鍏叡鍩熷悕灏辫繎瑙f瀽
/// </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>
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 8fdab09..55244e7 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/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>
diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
index 6e906ef..06422ea 100644
--- a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
+++ b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
@@ -292,9 +292,11 @@
return myMethod.Invoke(form, parameter);
}
catch (Exception ex)
- {
- //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
- HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+ {
+#if DEBUG
+ //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+ HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+#endif
return null;
}
}
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index d059d91..80e88f3 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/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 鍥藉鏈嶅姟鍣ㄦ祴璇�
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 5696551..6e2e2c9 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/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;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
index 8519535..7cdf979 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
+++ b/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);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index aa73f74..0a3c074 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/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 淇敼鏃堕棿
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
index 839a35c..a6e82f6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
@@ -1,7 +1,7 @@
锘縰sing System;
using System.Collections.Generic;
-namespace HDL_ON.UI.EchartsOption_Energy
+namespace HDL_ON.UI.UI2.EchartsOption_Energy
{
public class EchartsOption_Energy
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
index 560fb7a..80ee1ff 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
+++ b/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
{
@@ -15,7 +16,7 @@
List<string> colorList2 = new List<string>() {
"#80AEFF", "#FFD154", "#FF9D54", "#FE6A6A", "#B183C3", "#ADE764",
"#D7504B", "#C6E579", "#F4E001", "#F0805A", "#26C0C0"};
-
+
public EnergyMainPage()
{
bodyView = this;
@@ -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),
};
@@ -134,21 +136,23 @@
var energyListView = new FrameLayout()
{
Y = generalTableView.Bottom + Application.GetRealWidth(8),
- Height = Application.GetRealWidth(116 * energyList.Count) ,
+ Height = Application.GetRealWidth(116 * energyList.Count),
};
contentView.AddChidren(energyListView);
int index = 0;
- foreach(var energy in energyList)
+ foreach (var energy in energyList)
{
EnergyRow(energy, energyListView, index);
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,134 +257,105 @@
historyDataView.AddChidren(myEchartsView);
}
- /// <summary>
- /// 璇诲彇浼犳劅鍣ㄥ巻鍙叉暟鎹�
- /// </summary>
- void ddd2(string curQueryType,Function function,int index)
+
+ void d2()
+ {
+ int index = 0;
+ var echartRootJson = new EchartsOption_Energy();
+ var seriesList = new List<EchartSeriesItem>();
+ foreach (var function in queryList)
{
- var seriesList = new List<EchartSeriesItem>();
- var loadPage = new Loading()
- {
- LodingBackgroundColor = 0x88888888,
- };
- historyDataView.AddChidren(loadPage);
+ var seriesItem = d3(function, index, echartRootJson.xAxis.data);
+ seriesList.Add(seriesItem);
+ }
+ }
+ /// <summary>
+ /// 鏌ヨ鍒楄〃
+ /// </summary>
+ /// <summary>
+ /// 璇诲彇浼犳劅鍣ㄥ巻鍙叉暟鎹�
+ /// </summary>
+ EchartSeriesItem d3(Function function, int index, List<string> xAxisData)
+ {
+ EchartSeriesItem sItem = null;
+ List<string> data = new List<string>();
+ var loadPage = new Loading()
+ {
+ LodingBackgroundColor = 0x88888888,
+ };
+ diagramView.AddChidren(loadPage);
- new System.Threading.Thread(() =>
+ try
+ {
+ Application.RunOnMainThread(() =>
{
- try
+ loadPage.Start(Language.StringByID(StringId.PleaseWait));
+ });
+ var sensorType = function.spk.Split(".")[0];
+ var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, sensorType);
+
+ if (revertObj != null)
+ {
+ if (revertObj.Code == StateCode.SUCCESS)
{
- Application.RunOnMainThread(() =>
- {
- loadPage.Start(Language.StringByID(StringId.PleaseWait));
- });
- int i = 0;
+ var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
+ sItem = new EchartSeriesItem
{
- var sensorType = function.spk.Split(".")[0];
- var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, sensorType);
-
- if (revertObj != null)
+ data = new List<int>(),
+ lineStyle = new EchartLineStyle()
{
- 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],
+ color = colorList2[index],
#if __IOS__
- width = 5,
+ 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
+ try
+ {
+ foreach (var d in revertData)
+ {
+ if (xAxisData.Count == 0)
{
- Application.RunOnMainThread(() =>
- {
- IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed), false);
- });
+ data.Add(d.fieldName);
}
+ sItem.data.Add(Convert.ToInt32(d.fieldValue));
}
- i++;
+ xAxisData.AddRange(data);
}
-
+ catch (Exception ex)
+ {
+ MainPage.Log($"revertData:{ex.Message}");
+ }
}
- catch (Exception ex)
- {
- MainPage.Log($"sensor history error : {ex.Message}");
- }
- finally
+ else
{
Application.RunOnMainThread(() =>
{
- loadPage.Hide();
+ IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed), false);
});
}
- })
- { 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()
+ catch (Exception ex)
{
- 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();
- };
-
+ MainPage.Log($"sensor history error : {ex.Message}");
}
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ loadPage.Hide();
+ });
+ }
+ return sItem;
+
+ //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson);
+ //myEchartsView.ShowWithOptionJsonString(echartRootJsonString);
+ }
/// <summary>
@@ -475,4 +481,4 @@
}
}
-}
+}
\ No newline at end of file
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
index 7a2db65..25fcc80 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -1,7 +1,7 @@
锘縰sing System;
using System.Collections.Generic;
-namespace HDL_ON.Entity
+namespace HDL_ON.UI.UI2.EnvironmentalScience
{
#region 鎶樼嚎鍥�
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index aaa80a9..5246752 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/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
{
--
Gitblit v1.8.0