From dd922032a3301ae960f4968eaf33ca14768c0ed1 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期三, 11 九月 2024 11:42:03 +0800
Subject: [PATCH] V2.6.0金茂热水器,金茂光伏测试通过的版本

---
 HDL-ON_Android/Properties/AndroidManifest.xml                         |    2 
 HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs |  437 +++++++---------
 HDL_ON/DAL/Server/HttpUtil.cs                                         |   12 
 HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs    |  433 +++++++---------
 HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs           |   25 
 HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs               |    1 
 HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs        |  603 +++++++++++++---------
 SiriIntents/Server/HttpUtil.cs                                        |   12 
 8 files changed, 782 insertions(+), 743 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 295e909..d3a57ee 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:versionName="2.6.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409101">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.6.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409111">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<uses-permission android:name="android.permission.RECEIVE_SMS" />
 	<!--绋嬪簭鍙互璇诲彇璁惧澶栭儴瀛樺偍绌洪棿(鍐呯疆SDcard鍜屽缃甋DCard)鐨勬枃浠讹紝鎴戠殑鏂囦欢绛�-->
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 58c5a1c..bac48c5 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,13 +18,13 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //public const string APP_KEY = "HDL-HOME-APP";
-        //public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        public const string APP_KEY = "HDL-HOME-APP";
+        public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
 
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
-        public const string APP_KEY = "HDL-HOME-APP-TEST";
-        public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //public const string APP_KEY = "HDL-HOME-APP-TEST";
+        //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
 
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
         //const string APP_KEY = "CPEVRLRT";
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
index 14282ac..61c562f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
@@ -700,7 +700,6 @@
             }).Start();
             #endregion
 
-
             #region 搴曢儴鎺у埗鏍�
             var bottomView = new FrameLayout()
             {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs
index f5ded51..504de37 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs
@@ -1047,111 +1047,118 @@
             };
             uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
             {
-                if (int1 < 0)
+                try
                 {
-                    int1 = 1;
-                }
-                if (pickerItems_Year[int1] != item1.ToString())
-                {
-                    int.TryParse(pickerItems_Year[int1], out item1);
-                    if (queryType1 == QueryType.custom_month || queryType1 == QueryType.day_hour)
+                    if (int1 < 0)
                     {
-                        pickerItems_Month = new List<string>();
-                        if (item1 == DateTime.Now.Year)
+                        int1 = 1;
+                    }
+                    if (pickerItems_Year[int1] != item1.ToString())
+                    {
+                        int.TryParse(pickerItems_Year[int1], out item1);
+                        if (queryType1 == QueryType.custom_month || queryType1 == QueryType.day_hour)
                         {
-                            int addMonth = 0;
-                            while (DateTime.Now.Month > addMonth)
+                            pickerItems_Month = new List<string>();
+                            if (item1 == DateTime.Now.Year)
                             {
-                                addMonth++;
-                                pickerItems_Month.Add(addMonth.ToString());
-                            }
-                        }
-                        else
-                        {
-                            for (var i = 1; i < 13; i++)
-                            {
-                                pickerItems_Month.Add(i.ToString());
-                            }
-                        }
-                        if (queryType1 == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                int addMonth = 0;
+                                while (DateTime.Now.Month > addMonth)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    addMonth++;
+                                    pickerItems_Month.Add(addMonth.ToString());
                                 }
                             }
                             else
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                for (var i = 1; i < 13; i++)
                                 {
-                                    pickerItems_Day.Add(i.ToString());
+                                    pickerItems_Month.Add(i.ToString());
+                                }
+                            }
+                            if (queryType1 == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
                         }
-                    }
-                    uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                    uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                        pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                        pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
 
-                }
-                if (pickerItems_Month != null)
-                {
-                    if (int2 >= pickerItems_Month.Count || int2 < 0)
-                    {
-                        int2 = 0;
                     }
-                    if (pickerItems_Month[int2] != item2.ToString())
+                    if (pickerItems_Month != null)
                     {
-                        int.TryParse(pickerItems_Month[int2], out item2);
-                        if (queryType1 == QueryType.day_hour)
+                        if (int2 >= pickerItems_Month.Count || int2 < 0)
                         {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                            int2 = 0;
+                        }
+                        if (pickerItems_Month[int2] != item2.ToString())
+                        {
+                            int.TryParse(pickerItems_Month[int2], out item2);
+                            if (queryType1 == QueryType.day_hour)
                             {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
-                            else
+                            try
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
-                                {
-                                    pickerItems_Day.Add(i.ToString());
-                                }
+                                uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                                uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                                    pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                                    pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                            }
+                            catch (Exception ex)
+                            {
+                                MainPage.Log("Error", $"閲戣寕鍘嗗彶鏁版嵁鎺т欢寮傚父:{ex.Message}");
                             }
                         }
-                        try
+                    }
+                    if (pickerItems_Day != null)
+                    {
+                        if (int3 >= pickerItems_Day.Count || int3 < 0)
                         {
-                            uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                            uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                                pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                                pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                            int3 = 0;
                         }
-                        catch (Exception ex)
+                        if (pickerItems_Day[int3] != item3.ToString())
                         {
-                            MainPage.Log("Error", $"閲戣寕鍘嗗彶鏁版嵁鎺т欢寮傚父:{ex.Message}");
+                            int.TryParse(pickerItems_Day[int3], out item3);
                         }
                     }
                 }
-                if (pickerItems_Day != null)
+                catch (Exception ex)
                 {
-                    if (int3 >= pickerItems_Day.Count || int3 < 0)
-                    {
-                        int3 = 0;
-                    }
-                    if (pickerItems_Day[int3] != item3.ToString())
-                    {
-                        int.TryParse(pickerItems_Day[int3], out item3);
-                    }
+                    MainPage.Log("Error", $"閲戣寕鐑按鍣ㄦ棩鏈熼�夋嫨寮傚父锛歿ex.StackTrace}");
                 }
             };
             btnConfrim.MouseUpEventHandler = (sender, e) =>
@@ -1186,6 +1193,9 @@
                     btnToday.Visible = btnToday.Enable = true;
                     btnToday.MouseUpEventHandler = (sender, e) =>
                     {
+                        item3 = queryTime_Day1 = DateTime.Now.Day;
+                        item2 = queryTime_Month1 = DateTime.Now.Month;
+                        item1 = queryTime_Year1 = DateTime.Now.Year;
                         pickerItems_Year = new List<string>();
                         pickerItems_Year.Add("2023");
                         while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
@@ -1193,50 +1203,21 @@
                             pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                         }
 
-                        if (queryType1 == QueryType.custom_month || queryType1 == QueryType.day_hour)
+                        pickerItems_Month = new List<string>();
+                        int addMonth = 0;
+                        while (DateTime.Now.Month > addMonth)
                         {
-                            pickerItems_Month = new List<string>();
-                            if (queryTime_Year1 == DateTime.Now.Year)
-                            {
-                                int addMonth = 0;
-                                while (DateTime.Now.Month > addMonth)
-                                {
-                                    addMonth++;
-                                    pickerItems_Month.Add(addMonth.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i < 13; i++)
-                                {
-                                    pickerItems_Month.Add(i.ToString());
-                                }
-                            }
-                            if (queryType1 == QueryType.day_hour)
-                            {
-                                pickerItems_Day = new List<string>();
-                                if (queryTime_Month1 == DateTime.Now.Month)
-                                {
-                                    int addDay = 0;
-                                    while (DateTime.Now.Day > addDay)
-                                    {
-                                        addDay++;
-                                        pickerItems_Day.Add(addDay.ToString());
-                                    }
-                                }
-                                else
-                                {
-                                    for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year1, queryTime_Month1); i++)
-                                    {
-                                        pickerItems_Day.Add(i.ToString());
-                                    }
-                                }
-                            }
+                            addMonth++;
+                            pickerItems_Month.Add(addMonth.ToString());
+                        }
+                        pickerItems_Day = new List<string>();
+                        int addDay = 0;
+                        while(DateTime.Now.Day > addDay)
+                        {
+                            addDay++;
+                            pickerItems_Day.Add(addDay.ToString());
                         }
 
-                        item3 = queryTime_Day1 = DateTime.Now.Day;
-                        item2 = queryTime_Month1 = DateTime.Now.Month;
-                        item1 = queryTime_Year1 = DateTime.Now.Year;
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year1.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month1.ToString()),
@@ -1383,105 +1364,112 @@
             };
             uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
             {
-                if (int1 < 0)
+                try
                 {
-                    int1 = 0;
-                }
-                if (pickerItems_Year[int1] != item1.ToString())
-                {
-                    int.TryParse(pickerItems_Year[int1], out item1);
-                    if (queryType2 == QueryType.custom_month || queryType2 == QueryType.day_hour)
+                    if (int1 < 0)
                     {
-                        pickerItems_Month = new List<string>();
-                        if (item1 == DateTime.Now.Year)
+                        int1 = 0;
+                    }
+                    if (pickerItems_Year[int1] != item1.ToString())
+                    {
+                        int.TryParse(pickerItems_Year[int1], out item1);
+                        if (queryType2 == QueryType.custom_month || queryType2 == QueryType.day_hour)
                         {
-                            int addMonth = 0;
-                            while (DateTime.Now.Month > addMonth)
+                            pickerItems_Month = new List<string>();
+                            if (item1 == DateTime.Now.Year)
                             {
-                                addMonth++;
-                                pickerItems_Month.Add(addMonth.ToString());
-                            }
-                        }
-                        else
-                        {
-                            for (var i = 1; i < 13; i++)
-                            {
-                                pickerItems_Month.Add(i.ToString());
-                            }
-                        }
-                        if (queryType2 == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                int addMonth = 0;
+                                while (DateTime.Now.Month > addMonth)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    addMonth++;
+                                    pickerItems_Month.Add(addMonth.ToString());
                                 }
                             }
                             else
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                for (var i = 1; i < 13; i++)
                                 {
-                                    pickerItems_Day.Add(i.ToString());
+                                    pickerItems_Month.Add(i.ToString());
+                                }
+                            }
+                            if (queryType2 == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
                         }
-                    }
-                    uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                    uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                        pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                        pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
-
-                }
-                if (pickerItems_Month != null)
-                {
-                    if (int2 > pickerItems_Month.Count || int2 < 0)
-                    {
-                        int2 = 0;
-                    }
-                    if (pickerItems_Month[int2] != item2.ToString())
-                    {
-                        int.TryParse(pickerItems_Month[int2], out item2);
-                        if (queryType2 == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
-                                {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
-                                {
-                                    pickerItems_Day.Add(i.ToString());
-                                }
-                            }
-                        }
-
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
                             pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+
+                    }
+                    if (pickerItems_Month != null)
+                    {
+                        if (int2 > pickerItems_Month.Count || int2 < 0)
+                        {
+                            int2 = 0;
+                        }
+                        if (pickerItems_Month[int2] != item2.ToString())
+                        {
+                            int.TryParse(pickerItems_Month[int2], out item2);
+                            if (queryType2 == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
+                                }
+                            }
+
+                            uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                            uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                                pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                                pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                        }
+                    }
+                    if (pickerItems_Day != null)
+                    {
+                        if (int3 >= pickerItems_Day.Count || int3 < 0)
+                        {
+                            int3 = 0;
+                        }
+                        if (pickerItems_Day[int3] != item3.ToString())
+                        {
+                            int.TryParse(pickerItems_Day[int3], out item3);
+                        }
                     }
                 }
-                if (pickerItems_Day != null)
+                catch (Exception ex)
                 {
-                    if (int3 >= pickerItems_Day.Count || int3 < 0)
-                    {
-                        int3 = 0;
-                    }
-                    if (pickerItems_Day[int3] != item3.ToString())
-                    {
-                        int.TryParse(pickerItems_Day[int3], out item3);
-                    }
+                    MainPage.Log("Error", $"閲戣寕鍏変紡鏃ユ湡2閫夋嫨寮傚父锛歿ex.StackTrace}");
                 }
             };
             btnConfrim.MouseUpEventHandler = (sender, e) =>
@@ -1529,6 +1517,10 @@
                     btnToday.Visible = btnToday.Enable = true;
                     btnToday.MouseUpEventHandler = (sender, e) =>
                     {
+                        item3 = queryTime_Day2 = DateTime.Now.Day;
+                        item2 = queryTime_Month2 = DateTime.Now.Month;
+                        item1 = queryTime_Year2 = DateTime.Now.Year;
+
                         pickerItems_Year = new List<string>();
                         pickerItems_Year.Add("2023");
                         while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
@@ -1536,50 +1528,21 @@
                             pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                         }
 
-                        if (queryType2 == QueryType.custom_month || queryType2 == QueryType.day_hour)
+                        pickerItems_Month = new List<string>();
+                        int addMonth = 0;
+                        while (DateTime.Now.Month > addMonth)
                         {
-                            pickerItems_Month = new List<string>();
-                            if (queryTime_Year2 == DateTime.Now.Year)
-                            {
-                                int addMonth = 0;
-                                while (DateTime.Now.Month > addMonth)
-                                {
-                                    addMonth++;
-                                    pickerItems_Month.Add(addMonth.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i < 13; i++)
-                                {
-                                    pickerItems_Month.Add(i.ToString());
-                                }
-                            }
-                            if (queryType2 == QueryType.day_hour)
-                            {
-                                pickerItems_Day = new List<string>();
-                                if (queryTime_Month2 == DateTime.Now.Month)
-                                {
-                                    int addDay = 0;
-                                    while (DateTime.Now.Day > addDay)
-                                    {
-                                        addDay++;
-                                        pickerItems_Day.Add(addDay.ToString());
-                                    }
-                                }
-                                else
-                                {
-                                    for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year2, queryTime_Month2); i++)
-                                    {
-                                        pickerItems_Day.Add(i.ToString());
-                                    }
-                                }
-                            }
+                            addMonth++;
+                            pickerItems_Month.Add(addMonth.ToString());
+                        }
+                        pickerItems_Day = new List<string>();
+                        int addDay = 0;
+                        while (DateTime.Now.Day > addDay)
+                        {
+                            addDay++;
+                            pickerItems_Day.Add(addDay.ToString());
                         }
 
-                        item3 = queryTime_Day2 = DateTime.Now.Day;
-                        item2 = queryTime_Month2 = DateTime.Now.Month;
-                        item1 = queryTime_Year2 = DateTime.Now.Year;
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year2.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month2.ToString()),
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
index b5397a1..02bbf02 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -29,6 +29,10 @@
         /// </summary>
         Button pvLoad_TodayValuesButton;
         /// <summary>
+        /// 浠婃棩鐢ㄧ數閲忓崟浣嶆寜閽�
+        /// </summary>
+        Button loadEle_TodayUintButton;
+        /// <summary>
         /// 绱鐢ㄧ數閲忔暟鎹寜閽�
         /// </summary>
         Button pvLoad_TotalValuesButton;
@@ -272,7 +276,7 @@
             loadEleView.AddChidren(loadEle_TodayTextButton);
 
 
-            var loadEle_TodayUintButton = new Button()
+            loadEle_TodayUintButton = new Button()
             {
                 Y = Application.GetRealWidth(43),
                 Height = Application.GetRealWidth(17),
@@ -302,6 +306,8 @@
                 IsBold = true,
             };
 #if __IOS__
+            pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34);
+            pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width;
 #else
             pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37);
             pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width;
@@ -1295,6 +1301,15 @@
         private void upatePvGenerateTodayValues()
         {
             pvGenerate_TodayValuesButton.Text = pvGeneration_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_today.ToString());
+
+#if __IOS__
+            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft;
+            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+#else
+            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft;
+            pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37);
+            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(4);
+#endif
             pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right;
         }
         /// <summary>
@@ -1317,6 +1332,14 @@
         private void upatePvLoadTodayValues()
         {
             pvLoad_TodayValuesButton.Text = powerUsage_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString());
+
+#if __IOS__
+            pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34);
+            pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width;
+#else
+            pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37);
+            pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width;
+#endif
         }
         /// <summary>
         /// 鏇存柊鏈湀鐢ㄧ數閲�
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
index 3197659..fe07f72 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
@@ -143,9 +143,6 @@
         /// </summary>
         Button btnPowerControl;
 
-
-
-
         public WaterHeaterJinmaoPage(Function deviceFunction)
         {
             bodyView = this;
@@ -507,6 +504,7 @@
             #endregion
 
 
+            #region flow 鐑按娴侀噺
             if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.flow.ToString()) != null)
             {
                 contentView.AddChidren(new Button()
@@ -686,229 +684,240 @@
             {
                 Height = Application.GetRealWidth(8)
             });
-
-            #region 绀句細璐$尞 Social contribution
-            contentView.AddChidren(new Button()
-            {
-                Height = Application.GetRealWidth(46),
-                Width = Application.GetRealWidth(100),
-                X = Application.GetRealWidth(16),
-                Text = "绀句細璐$尞",
-                TextAlignment = TextAlignment.CenterLeft,
-                TextSize = 16,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                IsBold = true
-            });
-
-            var socialContributionView = new HorizontalScrolViewLayout()
-            {
-                Gravity = Gravity.CenterHorizontal,
-                Width = Application.GetRealWidth(343),
-                Height = Application.GetRealHeight(142),
-                ScrollEnabled = false,
-            };
-            contentView.AddChidren(socialContributionView);
-
-            #region 鐑洖鏀惰妭鐢甸噺
-            var socialContribution_InfoView_1 = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(109),
-                Height = Application.GetRealWidth(130),
-                BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_1.png"
-            };
-            socialContributionView.AddChidren(socialContribution_InfoView_1);
-
-            var socialContribution_Info1_IconButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(16),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(36),
-                UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_1.png"
-            };
-            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton);
-
-            socialContribution_Info1_ValuesButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(25),
-                Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()),
-                TextSize = 18,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-                IsBold = true,
-            };
-            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton);
-
-            socialContribution_Info1_UintButton = new Button()
-            {
-                X = socialContribution_Info1_ValuesButton.Right ,
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(50),
-                Height = Application.GetRealWidth(23),
-                Text = "kwh",
-                TextSize = 12,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-            };
-            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton);
-
-            var socialContribution_Info1_TipButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(98),
-                Width = Application.GetRealWidth(100),
-                Height = Application.GetRealWidth(17),
-                Text = "鐑洖鏀惰妭鐢甸噺",
-                TextSize = 12,
-                TextColor = 0xFF798394,
-                TextAlignment = TextAlignment.CenterLeft,
-            };
-            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_TipButton);
             #endregion
 
-            socialContributionView.AddChidren(new Button()
+            #region 绀句細璐$尞 Social contribution
+            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()) != null
+                && function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.co2.ToString()) != null
+                && function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.trees.ToString()) != null)
             {
-                Width = Application.GetRealWidth(8),
-            });
+                contentView.AddChidren(new Button()
+                {
+                    Height = Application.GetRealWidth(46),
+                    Width = Application.GetRealWidth(100),
+                    X = Application.GetRealWidth(16),
+                    Text = "绀句細璐$尞",
+                    TextAlignment = TextAlignment.CenterLeft,
+                    TextSize = 16,
+                    TextColor = CSS_Color.FirstLevelTitleColor,
+                    IsBold = true
+                });
 
-            #region CO2鍑忔帓閲�
-            var socialContribution_InfoView_2 = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(109),
-                Height = Application.GetRealWidth(130),
-                BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_2.png"
-            };
-            socialContributionView.AddChidren(socialContribution_InfoView_2);
+                var socialContributionView = new HorizontalScrolViewLayout()
+                {
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(343),
+                    Height = Application.GetRealHeight(142),
+                    ScrollEnabled = false,
+                };
+                contentView.AddChidren(socialContributionView);
+                if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()) != null)
+                {
+                    #region 鐑洖鏀惰妭鐢甸噺
+                    var socialContribution_InfoView_1 = new FrameLayout()
+                    {
+                        Width = Application.GetRealWidth(109),
+                        Height = Application.GetRealWidth(130),
+                        BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_1.png"
+                    };
+                    socialContributionView.AddChidren(socialContribution_InfoView_1);
 
-            var socialContribution_Info2_IconButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(16),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(36),
-                UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_2.png"
-            };
-            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton);
+                    var socialContribution_Info1_IconButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(16),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(36),
+                        UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_1.png"
+                    };
+                    socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton);
 
-            socialContribution_Info2_ValuesButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(25),
-                Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString()),
-                TextSize = 18,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-                IsBold = true,
-            };
-            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton);
+                    socialContribution_Info1_ValuesButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(25),
+                        Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()),
+                        TextSize = 18,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                        IsBold = true,
+                    };
+                    socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+                    socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton);
+
+                    socialContribution_Info1_UintButton = new Button()
+                    {
+                        X = socialContribution_Info1_ValuesButton.Right,
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(50),
+                        Height = Application.GetRealWidth(23),
+                        Text = "kwh",
+                        TextSize = 12,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                    };
+                    socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton);
+
+                    var socialContribution_Info1_TipButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(98),
+                        Width = Application.GetRealWidth(100),
+                        Height = Application.GetRealWidth(17),
+                        Text = "鐑洖鏀惰妭鐢甸噺",
+                        TextSize = 12,
+                        TextColor = 0xFF798394,
+                        TextAlignment = TextAlignment.CenterLeft,
+                    };
+                    socialContribution_InfoView_1.AddChidren(socialContribution_Info1_TipButton);
+                    #endregion
+
+                    socialContributionView.AddChidren(new Button()
+                    {
+                        Width = Application.GetRealWidth(8),
+                    });
+                }
+                if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.co2.ToString()) != null)
+                {
+                    #region CO2鍑忔帓閲�
+                    var socialContribution_InfoView_2 = new FrameLayout()
+                    {
+                        Width = Application.GetRealWidth(109),
+                        Height = Application.GetRealWidth(130),
+                        BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_2.png"
+                    };
+                    socialContributionView.AddChidren(socialContribution_InfoView_2);
+
+                    var socialContribution_Info2_IconButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(16),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(36),
+                        UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_2.png"
+                    };
+                    socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton);
+
+                    socialContribution_Info2_ValuesButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(25),
+                        Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString()),
+                        TextSize = 18,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                        IsBold = true,
+                    };
+                    socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+                    socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton);
 
 
-            socialContribution_Info2_UintButton = new Button()
-            {
-                X = socialContribution_Info2_ValuesButton.Right ,
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(50),
-                Height = Application.GetRealWidth(23),
-                Text = "鍚�",
-                TextSize = 12,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-            };
+                    socialContribution_Info2_UintButton = new Button()
+                    {
+                        X = socialContribution_Info2_ValuesButton.Right,
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(50),
+                        Height = Application.GetRealWidth(23),
+                        Text = "鍚�",
+                        TextSize = 12,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                    };
 #if __IOS__
             socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66);
 #endif
-            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton);
+                    socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton);
 
-            var socialContribution_Info2_TipButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(98),
-                Width = Application.GetRealWidth(100),
-                Height = Application.GetRealWidth(17),
-                Text = "CO2鍑忔帓閲�",
-                TextSize = 12,
-                TextColor = 0xFF798394,
-                TextAlignment = TextAlignment.CenterLeft,
-            };
-            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_TipButton);
-            #endregion
+                    var socialContribution_Info2_TipButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(98),
+                        Width = Application.GetRealWidth(100),
+                        Height = Application.GetRealWidth(17),
+                        Text = "CO2鍑忔帓閲�",
+                        TextSize = 12,
+                        TextColor = 0xFF798394,
+                        TextAlignment = TextAlignment.CenterLeft,
+                    };
+                    socialContribution_InfoView_2.AddChidren(socialContribution_Info2_TipButton);
+                    #endregion
 
-            socialContributionView.AddChidren(new Button()
-            {
-                Width = Application.GetRealWidth(8),
-            });
+                    socialContributionView.AddChidren(new Button()
+                    {
+                        Width = Application.GetRealWidth(8),
+                    });
+                }
+                if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.trees.ToString()) != null)
+                {
+                    #region 绛夋晥妞嶆爲閲�
+                    var socialContribution_InfoView_3 = new FrameLayout()
+                    {
+                        Width = Application.GetRealWidth(109),
+                        Height = Application.GetRealWidth(130),
+                        BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_3.png"
+                    };
+                    socialContributionView.AddChidren(socialContribution_InfoView_3);
 
-            #region 绛夋晥妞嶆爲閲�
-            var socialContribution_InfoView_3 = new FrameLayout()
-            {
-                Width = Application.GetRealWidth(109),
-                Height = Application.GetRealWidth(130),
-                BackgroundImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoBg_3.png"
-            };
-            socialContributionView.AddChidren(socialContribution_InfoView_3);
+                    var socialContribution_Info3_IconButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(16),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(36),
+                        UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_3.png"
+                    };
+                    socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton);
 
-            var socialContribution_Info3_IconButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(16),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(36),
-                UnSelectedImagePath = "FunctionIcon/Acst/WaterHeater/SocialContributionInfoIcon_3.png"
-            };
-            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton);
+                    socialContribution_Info3_ValuesButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(36),
+                        Height = Application.GetRealWidth(25),
+                        Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString()),
+                        TextSize = 18,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                        IsBold = true,
+                    };
+                    socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+                    socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton);
 
-            socialContribution_Info3_ValuesButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(36),
-                Height = Application.GetRealWidth(25),
-                Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString()),
-                TextSize = 18,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-                IsBold = true,
-            };
-            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton);
-
-            socialContribution_Info3_UintButton = new Button()
-            {
-                X = socialContribution_Info3_ValuesButton.Right ,
-                Y = Application.GetRealWidth(68),
-                Width = Application.GetRealWidth(50),
-                Height = Application.GetRealWidth(23),
-                Text = "妫�",
-                TextSize = 12,
-                TextColor = CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.BottomLeft,
-            };
+                    socialContribution_Info3_UintButton = new Button()
+                    {
+                        X = socialContribution_Info3_ValuesButton.Right,
+                        Y = Application.GetRealWidth(68),
+                        Width = Application.GetRealWidth(50),
+                        Height = Application.GetRealWidth(23),
+                        Text = "妫�",
+                        TextSize = 12,
+                        TextColor = CSS_Color.FirstLevelTitleColor,
+                        TextAlignment = TextAlignment.BottomLeft,
+                    };
 #if __IOS__
             socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66);
 #endif
-            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton);
+                    socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton);
 
-            var socialContribution_Info3_TipButton = new Button()
-            {
-                X = Application.GetRealWidth(12),
-                Y = Application.GetRealWidth(98),
-                Width = Application.GetRealWidth(100),
-                Height = Application.GetRealWidth(17),
-                Text = "绛夋晥妞嶆爲閲�",
-                TextSize = 12,
-                TextColor = 0xFF798394,
-                TextAlignment = TextAlignment.CenterLeft,
-            };
-            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_TipButton);
-            #endregion
-
+                    var socialContribution_Info3_TipButton = new Button()
+                    {
+                        X = Application.GetRealWidth(12),
+                        Y = Application.GetRealWidth(98),
+                        Width = Application.GetRealWidth(100),
+                        Height = Application.GetRealWidth(17),
+                        Text = "绛夋晥妞嶆爲閲�",
+                        TextSize = 12,
+                        TextColor = 0xFF798394,
+                        TextAlignment = TextAlignment.CenterLeft,
+                    };
+                    socialContribution_InfoView_3.AddChidren(socialContribution_Info3_TipButton);
+                    #endregion
+                }
+            }
 
 
             #endregion
@@ -926,8 +935,8 @@
                 Height = Application.GetRealWidth(50),
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealWidth(16),
+                SelectedImagePath = "FunctionIcon/Acst/orange/PowerIcon.png",
                 UnSelectedImagePath = "FunctionIcon/Acst/grey/PowerOffIcon.png",
-                SelectedImagePath = "FunctionIcon/Acst/blue/PowerIcon.png",
                 IsSelected = function.trait_on_off.curValue.ToString() == "on"
             };
             bottomView.AddChidren(btnPowerControl);
@@ -955,38 +964,34 @@
             //鑺傝兘妯″紡鎺у埗
             btnControlModeEconomic.MouseUpEventHandler = (sender, e) =>
             {
+                new System.Threading.Thread(() =>
                 {
-                    new System.Threading.Thread(() =>
+                    var dic = new Dictionary<string, string>();
+                    dic.Add(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.economic.ToString());
+                    Control.Ins.SendWriteCommand(function, dic);
+                    function.SetAttrState(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.economic.ToString());
+                    Application.RunOnMainThread(() =>
                     {
-                        var dic = new Dictionary<string, string>();
-                        dic.Add(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.economic.ToString());
-                        Control.Ins.SendWriteCommand(function, dic);
-                        function.SetAttrState(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.economic.ToString());
-                        Application.RunOnMainThread(() =>
-                        {
-                            updateModeUI();
-                        });
-                    })
-                    { IsBackground = true }.Start();
-                }
+                        updateModeUI();
+                    });
+                })
+                { IsBackground = true }.Start();
             };
             //閫熺儹妯″紡鎺у埗
             btnControlModeQuickHeat.MouseUpEventHandler = (sender, e) =>
             {
+                new System.Threading.Thread(() =>
                 {
-                    new System.Threading.Thread(() =>
+                    var dic = new Dictionary<string, string>();
+                    dic.Add(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.quick_heat.ToString());
+                    Control.Ins.SendWriteCommand(function, dic);
+                    function.SetAttrState(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.quick_heat.ToString());
+                    Application.RunOnMainThread(() =>
                     {
-                        var dic = new Dictionary<string, string>();
-                        dic.Add(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.quick_heat.ToString());
-                        Control.Ins.SendWriteCommand(function, dic);
-                        function.SetAttrState(WaterHeaterJinmao_AttrEnum.mode.ToString(), WaterHeaterJinmao_Attr_ModeEnum.quick_heat.ToString());
-                        Application.RunOnMainThread(() =>
-                        {
-                            updateModeUI();
-                        });
-                    })
-                    { IsBackground = true }.Start();
-                }
+                        updateModeUI();
+                    });
+                })
+                { IsBackground = true }.Start();
             };
             setTemp_Bar.OnStartTrackingTouchEvent = (sender, e) =>
             {
@@ -1054,16 +1059,80 @@
                 try
                 {
                     bodyView.updateFreeMode();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateTemp();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateModeUI();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateSetTemp();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateFlow();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateVolume();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateSocialContribution1();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateSocialContribution2();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updateSocialContribution3();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
+                }
+                try
+                {
                     bodyView.updatePowerButton();
-                }catch  (Exception ex)
+                }
+                catch (Exception ex)
                 {
                     MainPage.Log("Error", $"閲戣寕鐑按鎺т欢鏇存柊寮傚父锛歿ex.Message}");
                 }
@@ -1221,60 +1290,82 @@
         /// </summary>
         private void updateSocialContribution1()
         {
-            socialContribution_Info1_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString());
-            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
-            if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61))
+
+            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.energy_electricity.ToString()) != null)
             {
-                socialContribution_Info1_ValuesButton.TextSize = 14;
-                socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
-                socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25);
-            }
+                try
+                {
+                    socialContribution_Info1_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString());
+                    socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
+                    if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61))
+                    {
+                        socialContribution_Info1_ValuesButton.TextSize = 14;
+                        socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
+                        socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25);
+                    }
 #if __IOS__
             socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6);
             socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4);
 #else
-            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2);
+                    socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right + Application.GetRealWidth(2);
 #endif
+                }
+                catch { }
+            }
         }
         /// <summary>
         /// 鏇存柊绀句細璐�2鐚暟鎹甎I
         /// </summary>
         private void updateSocialContribution2()
         {
-            socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString());
-            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
-            if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61))
+
+            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.co2.ToString()) != null)
             {
-                socialContribution_Info2_ValuesButton.TextSize = 14;
-                socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
-            }
+                try
+                {
+                    socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString());
+                    socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
+                    if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61))
+                    {
+                        socialContribution_Info2_ValuesButton.TextSize = 14;
+                        socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
+                    }
 #if __IOS__
             socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6);
             socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4);
 #else
-            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2);
+                    socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right + Application.GetRealWidth(2);
 #endif
-
+                }
+                catch { }
+            }
         }
         /// <summary>
         /// 鏇存柊绀句細璐�3鐚暟鎹甎I
         /// </summary>
         private void updateSocialContribution3()
         {
-            socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString());
-            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
-            if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61))
+            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.trees.ToString()) != null)
             {
-                socialContribution_Info3_ValuesButton.TextSize = 14;
-                socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
-                //socialContribution_Info3_UintButton.Height = Application.GetRealWidth(23);
-            }
+                try
+                {
+                    socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString());
+                    socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
+                    if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61))
+                    {
+                        socialContribution_Info3_ValuesButton.TextSize = 14;
+                        socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
+                        //socialContribution_Info3_UintButton.Height = Application.GetRealWidth(23);
+                    }
 #if __IOS__
             socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6);
             socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4);
 #else
-            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2);
+                    socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right + Application.GetRealWidth(2);
 #endif
+                }
+                catch { }
+            }
         }
 
         /// <summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs
index 9a0583c..3005623 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs
@@ -1051,110 +1051,118 @@
             };
             uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
             {
-                if (int1 < 0)
+                try
                 {
-                    int1 = 1;
-                }
-                if (pickerItems_Year[int1] != item1.ToString())
-                {
-                    int.TryParse(pickerItems_Year[int1], out item1);
-                    if (tempQueryType == QueryType.custom_month || tempQueryType == QueryType.day_hour)
+                    if (int1 < 0)
                     {
-                        pickerItems_Month = new List<string>();
-                        if (item1 == DateTime.Now.Year)
+                        int1 = 1;
+                    }
+                    if (pickerItems_Year[int1] != item1.ToString())
+                    {
+                        int.TryParse(pickerItems_Year[int1], out item1);
+                        if (tempQueryType == QueryType.custom_month || tempQueryType == QueryType.day_hour)
                         {
-                            int addMonth = 0;
-                            while (DateTime.Now.Month > addMonth)
+                            pickerItems_Month = new List<string>();
+                            if (item1 == DateTime.Now.Year)
                             {
-                                addMonth++;
-                                pickerItems_Month.Add(addMonth.ToString());
-                            }
-                        }
-                        else
-                        {
-                            for (var i = 1; i < 13; i++)
-                            {
-                                pickerItems_Month.Add(i.ToString());
-                            }
-                        }
-                        if (tempQueryType == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                int addMonth = 0;
+                                while (DateTime.Now.Month > addMonth)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    addMonth++;
+                                    pickerItems_Month.Add(addMonth.ToString());
                                 }
                             }
                             else
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                for (var i = 1; i < 13; i++)
                                 {
-                                    pickerItems_Day.Add(i.ToString());
+                                    pickerItems_Month.Add(i.ToString());
+                                }
+                            }
+                            if (tempQueryType == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
                         }
-                    }
-                    uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                    uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                        pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                        pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
 
-                }
-                if (pickerItems_Month != null)
-                {
-                    if (int2 >= pickerItems_Month.Count || int2 < 0)
-                    {
-                        int2 = 0;
                     }
-                    if (pickerItems_Month[int2] != item2.ToString())
+                    if (pickerItems_Month != null)
                     {
-                        int.TryParse(pickerItems_Month[int2], out item2);
-                        if (tempQueryType == QueryType.day_hour)
+                        if (int2 >= pickerItems_Month.Count || int2 < 0)
                         {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                            int2 = 0;
+                        }
+                        if (pickerItems_Month[int2] != item2.ToString())
+                        {
+                            int.TryParse(pickerItems_Month[int2], out item2);
+                            if (tempQueryType == QueryType.day_hour)
                             {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
-                            else
+                            try
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
-                                {
-                                    pickerItems_Day.Add(i.ToString());
-                                }
+                                uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                                uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                                    pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                                    pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                            }
+                            catch (Exception ex)
+                            {
+                                MainPage.Log("Error", $"閲戣寕鍘嗗彶鏁版嵁鎺т欢寮傚父:{ex.Message}");
                             }
                         }
-                        try
+                    }
+                    if (pickerItems_Day != null)
+                    {
+                        if (int3 >= pickerItems_Day.Count || int3 < 0)
                         {
-                            uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                            uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                                pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                                pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
-                        }catch(Exception ex)
+                            int3 = 0;
+                        }
+                        if (pickerItems_Day[int3] != item3.ToString())
                         {
-                            MainPage.Log("Error", $"閲戣寕鍘嗗彶鏁版嵁鎺т欢寮傚父:{ex.Message}");
+                            int.TryParse(pickerItems_Day[int3], out item3);
                         }
                     }
                 }
-                if (pickerItems_Day != null)
+                catch (Exception ex)
                 {
-                    if (int3 >= pickerItems_Day.Count || int3 < 0)
-                    {
-                        int3 = 0;
-                    }
-                    if (pickerItems_Day[int3] != item3.ToString())
-                    {
-                        int.TryParse(pickerItems_Day[int3], out item3);
-                    }
+                    MainPage.Log("Error", $"閲戣寕鐑按鍣ㄦ棩鏈熼�夋嫨寮傚父锛歿ex.StackTrace}");
                 }
             };
             btnConfrim.MouseUpEventHandler = (sender, e) =>
@@ -1189,6 +1197,10 @@
                     btnToday.Visible = btnToday.Enable = true;
                     btnToday.MouseUpEventHandler = (sender, e) =>
                     {
+                        item3 = tempQueryTime_Day = DateTime.Now.Day;
+                        item2 = tempQueryTime_Month = DateTime.Now.Month;
+                        item1 = tempQueryTime_Year = DateTime.Now.Year;
+
                         pickerItems_Year = new List<string>();
                         pickerItems_Year.Add("2023");
                         while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
@@ -1196,50 +1208,21 @@
                             pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                         }
 
-                        if (tempQueryType == QueryType.custom_month || tempQueryType == QueryType.day_hour)
+                        pickerItems_Month = new List<string>();
+                        int addMonth = 0;
+                        while (DateTime.Now.Month > addMonth)
                         {
-                            pickerItems_Month = new List<string>();
-                            if (tempQueryTime_Year == DateTime.Now.Year)
-                            {
-                                int addMonth = 0;
-                                while (DateTime.Now.Month > addMonth)
-                                {
-                                    addMonth++;
-                                    pickerItems_Month.Add(addMonth.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i < 13; i++)
-                                {
-                                    pickerItems_Month.Add(i.ToString());
-                                }
-                            }
-                            if (tempQueryType == QueryType.day_hour)
-                            {
-                                pickerItems_Day = new List<string>();
-                                if (tempQueryTime_Month == DateTime.Now.Month)
-                                {
-                                    int addDay = 0;
-                                    while (DateTime.Now.Day > addDay)
-                                    {
-                                        addDay++;
-                                        pickerItems_Day.Add(addDay.ToString());
-                                    }
-                                }
-                                else
-                                {
-                                    for (var i = 1; i <= DateTime.DaysInMonth(tempQueryTime_Year, tempQueryTime_Month); i++)
-                                    {
-                                        pickerItems_Day.Add(i.ToString());
-                                    }
-                                }
-                            }
+                            addMonth++;
+                            pickerItems_Month.Add(addMonth.ToString());
+                        }
+                        pickerItems_Day = new List<string>();
+                        int addDay = 0;
+                        while (DateTime.Now.Day > addDay)
+                        {
+                            addDay++;
+                            pickerItems_Day.Add(addDay.ToString());
                         }
 
-                        item3 = tempQueryTime_Day = DateTime.Now.Day;
-                        item2 = tempQueryTime_Month = DateTime.Now.Month;
-                        item1 = tempQueryTime_Year = DateTime.Now.Year;
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(tempQueryTime_Year.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(tempQueryTime_Month.ToString()),
@@ -1386,105 +1369,112 @@
             };
             uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
             {
-                if (int1 < 0)
+                try
                 {
-                    int1 = 0;
-                }
-                if (pickerItems_Year[int1] != item1.ToString())
-                {
-                    int.TryParse(pickerItems_Year[int1], out item1);
-                    if (waterQueryType == QueryType.custom_month || waterQueryType == QueryType.day_hour)
+                    if (int1 < 0)
                     {
-                        pickerItems_Month = new List<string>();
-                        if (item1 == DateTime.Now.Year)
+                        int1 = 0;
+                    }
+                    if (pickerItems_Year[int1] != item1.ToString())
+                    {
+                        int.TryParse(pickerItems_Year[int1], out item1);
+                        if (waterQueryType == QueryType.custom_month || waterQueryType == QueryType.day_hour)
                         {
-                            int addMonth = 0;
-                            while (DateTime.Now.Month > addMonth)
+                            pickerItems_Month = new List<string>();
+                            if (item1 == DateTime.Now.Year)
                             {
-                                addMonth++;
-                                pickerItems_Month.Add(addMonth.ToString());
-                            }
-                        }
-                        else
-                        {
-                            for (var i = 1; i < 13; i++)
-                            {
-                                pickerItems_Month.Add(i.ToString());
-                            }
-                        }
-                        if (waterQueryType == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
+                                int addMonth = 0;
+                                while (DateTime.Now.Month > addMonth)
                                 {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
+                                    addMonth++;
+                                    pickerItems_Month.Add(addMonth.ToString());
                                 }
                             }
                             else
                             {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                for (var i = 1; i < 13; i++)
                                 {
-                                    pickerItems_Day.Add(i.ToString());
+                                    pickerItems_Month.Add(i.ToString());
+                                }
+                            }
+                            if (waterQueryType == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
                                 }
                             }
                         }
-                    }
-                    uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
-                    uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
-                        pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
-                        pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
-
-                }
-                if (pickerItems_Month != null)
-                {
-                    if (int2 > pickerItems_Month.Count || int2 < 0)
-                    {
-                        int2 = 0;
-                    }
-                    if (pickerItems_Month[int2] != item2.ToString())
-                    {
-                        int.TryParse(pickerItems_Month[int2], out item2);
-                        if (waterQueryType == QueryType.day_hour)
-                        {
-                            pickerItems_Day = new List<string>();
-                            if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
-                            {
-                                int addDay = 0;
-                                while (DateTime.Now.Day > addDay)
-                                {
-                                    addDay++;
-                                    pickerItems_Day.Add(addDay.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
-                                {
-                                    pickerItems_Day.Add(i.ToString());
-                                }
-                            }
-                        }
-
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
                             pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+
+                    }
+                    if (pickerItems_Month != null)
+                    {
+                        if (int2 > pickerItems_Month.Count || int2 < 0)
+                        {
+                            int2 = 0;
+                        }
+                        if (pickerItems_Month[int2] != item2.ToString())
+                        {
+                            int.TryParse(pickerItems_Month[int2], out item2);
+                            if (waterQueryType == QueryType.day_hour)
+                            {
+                                pickerItems_Day = new List<string>();
+                                if (item1 == DateTime.Now.Year && item2 == DateTime.Now.Month)
+                                {
+                                    int addDay = 0;
+                                    while (DateTime.Now.Day > addDay)
+                                    {
+                                        addDay++;
+                                        pickerItems_Day.Add(addDay.ToString());
+                                    }
+                                }
+                                else
+                                {
+                                    for (var i = 1; i <= DateTime.DaysInMonth(item1, item2); i++)
+                                    {
+                                        pickerItems_Day.Add(i.ToString());
+                                    }
+                                }
+                            }
+
+                            uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
+                            uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
+                                pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
+                                pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
+                        }
+                    }
+                    if (pickerItems_Day != null)
+                    {
+                        if (int3 >= pickerItems_Day.Count || int3 < 0)
+                        {
+                            int3 = 0;
+                        }
+                        if (pickerItems_Day[int3] != item3.ToString())
+                        {
+                            int.TryParse(pickerItems_Day[int3], out item3);
+                        }
                     }
                 }
-                if (pickerItems_Day != null)
+                catch (Exception ex)
                 {
-                    if (int3 >= pickerItems_Day.Count || int3 < 0)
-                    {
-                        int3 = 0;
-                    }
-                    if (pickerItems_Day[int3] != item3.ToString())
-                    {
-                        int.TryParse(pickerItems_Day[int3], out item3);
-                    }
+                    MainPage.Log("Error", $"閲戣寕鐑按鍣ㄦ棩鏈�2閫夋嫨寮傚父锛歿ex.StackTrace}");
                 }
             };
             btnConfrim.MouseUpEventHandler = (sender, e) =>
@@ -1524,7 +1514,6 @@
             };
             topView.AddChidren(btnToday);
 
-
             if (waterQueryType == QueryType.day_hour)
             {
                 try
@@ -1532,57 +1521,31 @@
                     btnToday.Visible = btnToday.Enable = true;
                     btnToday.MouseUpEventHandler = (sender, e) =>
                     {
+                        item3 = waterQueryTime_Day = DateTime.Now.Day;
+                        item2 = waterQueryTime_Month = DateTime.Now.Month;
+                        item1 = waterQueryTime_Year = DateTime.Now.Year;
+
                         pickerItems_Year = new List<string>();
                         pickerItems_Year.Add("2023");
                         while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
                         {
                             pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                         }
-
-                        if (waterQueryType == QueryType.custom_month || waterQueryType == QueryType.day_hour)
+                        pickerItems_Month = new List<string>();
+                        int addMonth = 0;
+                        while (DateTime.Now.Month > addMonth)
                         {
-                            pickerItems_Month = new List<string>();
-                            if (waterQueryTime_Year == DateTime.Now.Year)
-                            {
-                                int addMonth = 0;
-                                while (DateTime.Now.Month > addMonth)
-                                {
-                                    addMonth++;
-                                    pickerItems_Month.Add(addMonth.ToString());
-                                }
-                            }
-                            else
-                            {
-                                for (var i = 1; i < 13; i++)
-                                {
-                                    pickerItems_Month.Add(i.ToString());
-                                }
-                            }
-                            if (waterQueryType == QueryType.day_hour)
-                            {
-                                pickerItems_Day = new List<string>();
-                                if (waterQueryTime_Month == DateTime.Now.Month)
-                                {
-                                    int addDay = 0;
-                                    while (DateTime.Now.Day > addDay)
-                                    {
-                                        addDay++;
-                                        pickerItems_Day.Add(addDay.ToString());
-                                    }
-                                }
-                                else
-                                {
-                                    for (var i = 1; i <= DateTime.DaysInMonth(waterQueryTime_Year, waterQueryTime_Month); i++)
-                                    {
-                                        pickerItems_Day.Add(i.ToString());
-                                    }
-                                }
-                            }
+                            addMonth++;
+                            pickerItems_Month.Add(addMonth.ToString());
+                        }
+                        pickerItems_Day = new List<string>();
+                        int addDay = 0;
+                        while (DateTime.Now.Day > addDay)
+                        {
+                            addDay++;
+                            pickerItems_Day.Add(addDay.ToString());
                         }
 
-                        item3 = waterQueryTime_Day = DateTime.Now.Day;
-                        item2 = waterQueryTime_Month = DateTime.Now.Month;
-                        item1 = waterQueryTime_Year = DateTime.Now.Year;
                         uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                         uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(waterQueryTime_Year.ToString()),
                             pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(waterQueryTime_Month.ToString()),
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 8a086c3..1a66ef0 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,13 +16,13 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //const string APP_KEY = "HDL-HOME-APP";
-        //const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        const string APP_KEY = "HDL-HOME-APP";
+        const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
 
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
-        public const string APP_KEY = "HDL-HOME-APP-TEST";
-        public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //public const string APP_KEY = "HDL-HOME-APP-TEST";
+        //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
 
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
         //const string APP_KEY = "CPEVRLRT";

--
Gitblit v1.8.0