From e990a9737e423d7005506a569e98fb4032fceb46 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 29 三月 2021 09:15:08 +0800
Subject: [PATCH] Merge branch 'temp-wxr' into WJC

---
 HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
new file mode 100644
index 0000000..14fba77
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.UI.CSS;
+using Shared;
+namespace HDL_ON.UI
+{
+    public class EnergyMainPage : FrameLayout
+    {
+        FrameLayout bodyView;
+        public EnergyMainPage()
+        {
+            bodyView = this;
+        }
+
+        public void LoadPage()
+        {
+            new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView();
+            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+
+            var generalTableView = new FrameLayout()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = Application.GetRealHeight(80),
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealWidth(148),
+                Radius = (uint)Application.GetRealWidth(5),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            bodyView.AddChidren(generalTableView);
+
+            TextButton btnTotalValue = new TextButton()
+            {
+                X = Application.GetRealWidth(18),
+                Y = Application.GetRealWidth(24),
+                Width = Application.GetRealWidth(18),
+                Height = Application.GetRealWidth(52),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                IsBold = true,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = 40,
+                Text = "000"
+            };
+            generalTableView.AddChidren(btnTotalValue);
+
+            btnTotalValue.Width = btnTotalValue.GetTextWidth();
+
+            var btnTotalValueUint = new Button()
+            {
+                X = btnTotalValue.Right,
+                Y = Application.GetRealWidth(24),
+                Width = Application.GetRealWidth(60),
+                Height = Application.GetRealWidth(28),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                IsBold = true,
+                Text = "kW鈥",
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            generalTableView.AddChidren(btnTotalValueUint);
+
+            var btnValue = new Button()
+            {
+                X = Application.GetRealWidth(18),
+                Y = btnTotalValue.Bottom,
+                Width = Application.GetRealWidth(209),
+                Height = Application.GetRealWidth(28),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.SubheadingFontSize,
+                IsBold = true,
+                TextAlignment = TextAlignment.CenterLeft,
+            };
+            generalTableView.AddChidren(btnValue);
+
+            var echartsView = new FrameLayout()
+            {
+                Width = Application.GetRealWidth(118),
+                Height = Application.GetRealWidth(118),
+                X = Application.GetRealWidth(227),
+                //Y = Application.GetRealWidth(16),
+            };
+            generalTableView.AddChidren(echartsView);
+            MyEchartsViewOn myEchartsView = new MyEchartsViewOn() {
+                Width = Application.GetRealWidth(118),
+                Height = Application.GetRealWidth(118),
+            };
+
+            echartsView.AddChidren(myEchartsView);
+            Dictionary<string, string> list = new Dictionary<string, string>();
+            list.Add("鐢靛啺绠�", "12");
+            list.Add("鐢甸鎵�", "2");
+            list.Add("绌鸿皟", "9");
+            list.Add("娲楄。鏈�", "3");
+            list.Add("鐢佃剳", "33");
+            var echartsPie = new EchartsOption_Pie();
+            var echartRootJson = echartsPie.InitDateJson(list);
+            //var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson);
+            myEchartsView.ShowWithOption(echartRootJson);
+
+
+        }
+    }
+}

--
Gitblit v1.8.0