From f5b46f80546aac860ade6e4c53821e43df833b39 Mon Sep 17 00:00:00 2001
From: tzy <hxb@hdlchina.com.cn>
Date: 星期三, 09 六月 2021 11:11:28 +0800
Subject: [PATCH] Revert "Merge remote-tracking branch 'origin/wxr4' into dev-tzy"

---
 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs |  144 ++---------------------------------------------
 1 files changed, 8 insertions(+), 136 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 68f8232..ed8ba3b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -1,8 +1,6 @@
 锘縰sing System;
-using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
-using Newtonsoft.Json.Linq;
 using Shared;
 
 namespace HDL_ON.UI
@@ -52,21 +50,14 @@
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
             new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(actionRefresh);
 
-            var contentView = new VerticalScrolViewLayout()
-            {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(600),
-                ScrollEnabled = false,
-            };
-            bodyView.AddChidren(contentView);
-
             #region name view
             var nameView = new FrameLayout()
             {
+                Y = Application.GetRealHeight(64),
                 Height = Application.GetRealHeight(50),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-            contentView.AddChidren(nameView);
+            bodyView.AddChidren(nameView);
 
             var btnNameText = new Button()
             {
@@ -115,10 +106,11 @@
             #region 浣嶇疆绠$悊
             var locationMagtView = new FrameLayout()
             {
+                Y = nameView.Bottom,
                 Height = Application.GetRealHeight(55),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-            contentView.AddChidren(locationMagtView);
+            bodyView.AddChidren(locationMagtView);
 
             var btnLocationMagtTitle = new Button()
             {
@@ -166,10 +158,11 @@
             #region 鍏变韩
             //var sharedView = new FrameLayout()
             //{
+            //    Y = locationMagtView.Bottom,
             //    Height = Application.GetRealHeight(55),
             //    BackgroundColor = CSS_Color.MainBackgroundColor,
             //};
-            //contentView.AddChidren(sharedView);
+            //bodyView.AddChidren(sharedView);
 
             //var btnSharedText = new Button()
             //{
@@ -207,10 +200,11 @@
             #region 娣诲姞鍒版闈�
             var addToDesktopView = new FrameLayout()
             {
+                Y = locationMagtView.Bottom,
                 Height = Application.GetRealHeight(55),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-            contentView.AddChidren(addToDesktopView);
+            bodyView.AddChidren(addToDesktopView);
 
             var btnAddToDesktopText = new Button()
             {
@@ -235,128 +229,6 @@
 
             #endregion
 #endif
-
-            if (function.spk == SPK.ElectricEnergy)
-            {
-                #region 鑳芥簮鏁版嵁
-                var energyView1 = new FrameLayout()
-                {
-                    Height = Application.GetRealHeight(55),
-                    BackgroundColor = CSS_Color.MainBackgroundColor,
-                };
-                contentView.AddChidren(energyView1);
-
-                var btnEnergyText1 = new Button()
-                {
-                    X = Application.GetRealWidth(16),
-                    Width = Application.GetRealWidth(160),
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = CSS_Color.FirstLevelTitleColor,
-                    TextSize = CSS_FontSize.SubheadingFontSize,
-                    TextID = StringId.RealTimeEnergyConsumption,
-                };
-                energyView1.AddChidren(btnEnergyText1);
-
-
-                double realTimePower = 0;
-                double.TryParse(function.GetAttrState(FunctionAttributeKey.Power), out realTimePower);
-                realTimePower /= 1000;
-
-                var energyValue1 = new Button()
-                {
-                    Width = Application.GetRealWidth(355),
-                    TextAlignment = TextAlignment.CenterRight,
-                    TextSize = CSS_FontSize.TextFontSize,
-                    TextColor = CSS_Color.PromptingColor1,
-                    Text = realTimePower + "kW",
-                };
-                energyView1.AddChidren(energyValue1);
-
-                energyView1.AddChidren(
-                    new Button()
-                    {
-                        Gravity = Gravity.CenterHorizontal,
-                        Y = Application.GetRealHeight(54),
-                        BackgroundColor = CSS_Color.DividingLineColor,
-                        Width = Application.GetRealWidth(343),
-                        Height = Application.GetRealHeight(1)
-                    });
-                //-----------------
-
-                var energyView2 = new FrameLayout()
-                {
-                    Height = Application.GetRealHeight(55),
-                    BackgroundColor = CSS_Color.MainBackgroundColor,
-                };
-                contentView.AddChidren(energyView2);
-
-                var btnEnergyText2 = new Button()
-                {
-                    X = Application.GetRealWidth(16),
-                    Width = Application.GetRealWidth(160),
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = CSS_Color.FirstLevelTitleColor,
-                    TextSize = CSS_FontSize.SubheadingFontSize,
-                    TextID = StringId.EnergyConsumptionOfThisMonth,
-                };
-                energyView2.AddChidren(btnEnergyText2);
-
-                var btnEnergyValue2 = new Button()
-                {
-                    Width = Application.GetRealWidth(355),
-                    TextAlignment = TextAlignment.CenterRight,
-                    TextSize = CSS_FontSize.TextFontSize,
-                    TextColor = CSS_Color.PromptingColor1,
-                    Text = "--kW",
-                };
-                energyView2.AddChidren(btnEnergyValue2);
-
-                energyView2.AddChidren(
-                    new Button()
-                    {
-                        Gravity = Gravity.CenterHorizontal,
-                        Y = Application.GetRealHeight(54),
-                        BackgroundColor = CSS_Color.DividingLineColor,
-                        Width = Application.GetRealWidth(343),
-                        Height = Application.GetRealHeight(1)
-                    });
-
-                new System.Threading.Thread(() =>
-                {
-                    var pm = new HttpServerRequest();
-                    var data = pm.GetLastMonthHistory(function.deviceId, FunctionAttributeKey.TotalElectricity);
-                    if (data != null)
-                    {
-                        if (data.Code == StateCode.SUCCESS)
-                        {
-                            var dataPack = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(data.Data.ToString());
-                            if (dataPack != null)
-                            {
-                                try
-                                {
-                                    var dataValue = dataPack.GetValue("monthDiff").ToString();
-                                    if (!string.IsNullOrEmpty(dataValue))
-                                    {
-                                        Application.RunOnMainThread(() =>
-                                        {
-                                            btnEnergyValue2.Text = dataValue + "kW鈥";
-                                        });
-                                    }
-                                }
-                                catch
-                                {
-
-                                }
-                            }
-                        }
-                    }
-
-                })
-                { IsBackground = true }.Start();
-
-                #endregion
-            }
-
             LoadEventList();
         }
 

--
Gitblit v1.8.0