From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs | 52 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
index 1c5dc5c..c26b483 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
@@ -136,7 +136,10 @@
TextAlignment = TextAlignment.CenterLeft,
TextID = StringId.RealTimePowerConsumption,
};
- btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", function.GetAttrState("active_power"));
+ double realTimePower = 0;
+ double.TryParse(function.GetAttrState("active_power"), out realTimePower);
+ realTimePower /= 1000;
+ btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", realTimePower.ToString());
generalTableView.AddChidren(btnRealTimeData);
@@ -174,11 +177,11 @@
#region 閫夋嫨鏁版嵁鏃ユ湡鑼冨洿
var showDataTypeView = new FrameLayout()
{
- X = Application.GetRealWidth(183),
+ X = Application.GetRealWidth(136),
Y = Application.GetRealHeight(12),
- Width = Application.GetRealWidth(144),
+ Width = Application.GetRealWidth(144+47),
Height = Application.GetRealHeight(24),
- BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png",
+ BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png",
};
diagramView.AddChidren(showDataTypeView);
@@ -214,41 +217,68 @@
TextColor = CSS_Color.PromptingColor2,
SelectedTextColor = CSS_Color.MainColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
- Text = Language.StringByID(StringId.month),//DateTime.Now.Month.ToString() +
+ Text = Language.StringByID(StringId.month)
};
showDataTypeView.AddChidren(btnShowHistroyData_Month);
+
+ var btnShowHistroyData_Year = new Button()
+ {
+ X = Application.GetRealWidth(48 * 3),
+ Width = Application.GetRealWidth(48),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.PromptingColor2,
+ SelectedTextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ Text = Language.StringByID(StringId.Years),
+ };
+ showDataTypeView.AddChidren(btnShowHistroyData_Year);
btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
{
- showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
+ showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png";
btnShowHistroyData_Day.IsSelected = true;
btnShowHistroyData_Month.IsSelected = false;
btnShowHistroyData_Week.IsSelected = false;
+ btnShowHistroyData_Year.IsSelected = false;
curQueryType = "hour";
brokenLine.YvalueText = "";
- LoadMothed_GetHistoryData();
+ LoadMothed_GetHistoryData();
};
btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
{
- showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
+ showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png";
btnShowHistroyData_Day.IsSelected = false;
btnShowHistroyData_Month.IsSelected = false;
btnShowHistroyData_Week.IsSelected = true;
+ btnShowHistroyData_Year.IsSelected = false;
curQueryType = "week";
brokenLine.YvalueText = "";
- LoadMothed_GetHistoryData();
+ LoadMothed_GetHistoryData();
};
btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
{
- showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
+ showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png";
btnShowHistroyData_Day.IsSelected = false;
btnShowHistroyData_Month.IsSelected = true;
btnShowHistroyData_Week.IsSelected = false;
+ btnShowHistroyData_Year.IsSelected = false;
curQueryType = "month";
brokenLine.YvalueText = "";
- LoadMothed_GetHistoryData();
+ LoadMothed_GetHistoryData();
+ };
+
+ btnShowHistroyData_Year.MouseUpEventHandler = (sender, e) =>
+ {
+ showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png";
+ btnShowHistroyData_Day.IsSelected = false;
+ btnShowHistroyData_Month.IsSelected = false;
+ btnShowHistroyData_Year.IsSelected = true;
+ btnShowHistroyData_Week.IsSelected = false;
+ curQueryType = "year_month";
+ brokenLine.YvalueText = "";
+ LoadMothed_GetHistoryData();
};
#endregion
--
Gitblit v1.8.0