From f500e14c0a994487070380c50c85e0929cbc8e63 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 05 一月 2021 10:48:04 +0800
Subject: [PATCH] 2021-01-05 1.更新

---
 Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs                                             |    4 
 Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs                     |  732 ++++++++++++++++++++++++++--------------------------
 Crabtree/SmartHome/dll/IOS/JLJailBreak.dll                                                    |    0 
 Crabtree/IosService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs   |    2 
 Crabtree/IosService/Web References/service.hdlcontrol.com_push/Reference.cs                   |    2 
 Crabtree/.vs/SmartHome/xs/UserPrefs.xml                                                       |   31 +
 Crabtree/DroidService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs |    2 
 Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs                            |    8 
 Crabtree/DroidService/Web References/service.hdlcontrol.com_push/Reference.cs                 |    2 
 9 files changed, 395 insertions(+), 388 deletions(-)

diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
index 5b9d967..1225f23 100644
--- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
+++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml
@@ -1,15 +1,24 @@
-锘�<Properties StartupConfiguration="{9D9EF20B-6E65-4A65-92BF-567EBF1E1443}|Default">
-  <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.364c4b3158493098" />
-  <MonoDevelop.Ide.Workbench>
+锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default">
+  <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs">
+    <Files>
+      <File FileName="SmartHome/UI/SimpleControl/CommonPage.cs" Line="13" Column="22" />
+      <File FileName="SmartHome/UI/SimpleControl/MainPage.cs" Line="405" Column="48" />
+      <File FileName="SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs" Line="6" Column="41" />
+      <File FileName="SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs" Line="197" Column="49" />
+    </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="SmartHome" expanded="True">
-            <Node name="ON.Ios" expanded="True" selected="True" />
             <Node name="Shared" expanded="True">
-              <Node name="HDL" expanded="True">
-                <Node name="Operation" expanded="True">
-                  <Node name="ResponseEntity" expanded="True" />
+              <Node name="UI" expanded="True">
+                <Node name="SimpleControl" expanded="True">
+                  <Node name="Phone" expanded="True">
+                    <Node name="Sensor" expanded="True">
+                      <Node name="UserSensorPage.cs" selected="True" />
+                    </Node>
+                  </Node>
                 </Node>
               </Node>
             </Node>
@@ -25,12 +34,10 @@
     <String>Shared.IOS/Shared.IOS.csproj</String>
     <String>DroidLib/DroidLib.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
-  <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
+  <MonoDevelop.Ide.ItemProperties.ON.Ios automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.08FD445C-3EE8-4ED2-BF28-B42ADD0DA92C" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
-    <BreakpointStore>
-      <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/CrabtreeOn/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs" relfile="SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs" line="477" column="11" />
-    </BreakpointStore>
+    <BreakpointStore />
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
 </Properties>
\ No newline at end of file
diff --git a/Crabtree/DroidService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs b/Crabtree/DroidService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
index 2bc70e3..d2d3e77 100644
--- a/Crabtree/DroidService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
+++ b/Crabtree/DroidService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
@@ -33,7 +33,7 @@
         {
             this.Url = "http://service.hdlcontrol.com:8000/WebService/WebServiceAirQuality.asmx";
 #if Crabtree
-            this.Url = "https://homeautomation.havells.com/api/WebService/WebServiceAirQuality.asmx";
+            this.Url = "https://smarth-api.havells.com/api/WebService/WebServiceAirQuality.asmx";
 #endif
         }
         
diff --git a/Crabtree/DroidService/Web References/service.hdlcontrol.com_push/Reference.cs b/Crabtree/DroidService/Web References/service.hdlcontrol.com_push/Reference.cs
index df00810..950e144 100644
--- a/Crabtree/DroidService/Web References/service.hdlcontrol.com_push/Reference.cs
+++ b/Crabtree/DroidService/Web References/service.hdlcontrol.com_push/Reference.cs
@@ -45,7 +45,7 @@
         {
             this.Url = "http://service.hdlcontrol.com:8000/WebService/WebServicePush.asmx";
 #if Crabtree
-            this.Url = "https://homeautomation.havells.com/api/WebService/WebServicePush.asmx";
+            this.Url = "https://smarth-api.havells.com/api/WebService/WebServicePush.asmx";
 #endif
         }
         
diff --git a/Crabtree/IosService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs b/Crabtree/IosService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
index be0906b..e6a3160 100644
--- a/Crabtree/IosService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
+++ b/Crabtree/IosService/Web References/service.hdlcontrol.com_WebServiceAirQuality/Reference.cs
@@ -31,7 +31,7 @@
         {
             this.Url = "http://service.hdlcontrol.com:8000/WebService/WebServiceAirQuality.asmx";
             #if Crabtree
-            this.Url = "https://homeautomation.havells.com/api/WebService/WebServiceAirQuality.asmx";
+            this.Url = "https://smarth-api.havells.com/api/WebService/WebServiceAirQuality.asmx";
             #endif
         }
         
diff --git a/Crabtree/IosService/Web References/service.hdlcontrol.com_push/Reference.cs b/Crabtree/IosService/Web References/service.hdlcontrol.com_push/Reference.cs
index 2f9ef71..b266195 100644
--- a/Crabtree/IosService/Web References/service.hdlcontrol.com_push/Reference.cs
+++ b/Crabtree/IosService/Web References/service.hdlcontrol.com_push/Reference.cs
@@ -45,7 +45,7 @@
         {
             this.Url = "http://service.hdlcontrol.com:8000/WebService/WebServicePush.asmx";
             #if Crabtree
-            this.Url = "https://homeautomation.havells.com/api/WebService/WebServicePush.asmx";
+            this.Url = "https://smarth-api.havells.com/api/WebService/WebServicePush.asmx";
             #endif
         }
         
diff --git a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
index 33a2247..5c772f4 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
@@ -26,7 +26,7 @@
                         //127.0.0.1
                         if (ip == "0.0.0.0") {
                             try {
-                                ip = System.Net.Dns.GetHostEntry ("homeautomation.havells.com").AddressList [0].ToString ();
+                                ip = System.Net.Dns.GetHostEntry ("smarth-api.havells.com").AddressList [0].ToString ();
                             } catch { }
                         }
                         return new System.Net.IPEndPoint (System.Net.IPAddress.Parse (ip), 9999);
@@ -1243,7 +1243,7 @@
                             common.isMixBox = true;
                         } else {
                             Application.RunOnMainThread (() => {
-                                MainPage.Loading.Start ("Search for device:" + devcieTempName);
+                                //MainPage.Loading.Start ("Search for device:" + devcieTempName);
                                 ++searchTotal;
                                 GuideSettingGateway.InitSearchDeviceList (common);
                                 for (int k = 1; k <= common.LoopCount; k++) {
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs
index 0fee813..3050f31 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorHistoryPage.cs
@@ -1,393 +1,393 @@
-锘縰sing System;
-using System.Collections.Generic;
+锘�//using System;
+//using System.Collections.Generic;
 
-namespace Shared.SimpleControl.Phone
-{
-    public class UserSensorHistoryPage :FrameLayout
-    {
-        public UserSensorHistoryPage ()
-        {
-        }
+//namespace Shared.SimpleControl.Phone
+//{
+//    public class UserSensorHistoryPage :FrameLayout
+//    {
+//        public UserSensorHistoryPage ()
+//        {
+//        }
 
-        public void ShowPage(Common sensor)
-        {
-#if DEBUG
-            //UserConfig.Instance.GatewayMAC = "00005AF30A845F00";
-#endif
-            string unitText = "PM2.5";
-            string titleText = "";
-            switch (sensor.Type) {
-            case DeviceType.SensorPM25:
-                titleText = "PM2.5";
-                unitText = @"渭g/m鲁";
-                break;
-            case DeviceType.SensorCO2:
-                titleText = "CO2";
-                unitText = "ppm";
-                break;
-            case DeviceType.SensorTVOC:
-                titleText = "TVOC";
-                unitText = "ppm";
-                break;
-            case DeviceType.SensorTemperature:
-                titleText = Language.StringByID (R.MyInternationalizationString.Temp);
-                unitText = "掳C";
-                break;
-            case DeviceType.SensorHumidity:
-                titleText = Language.StringByID (R.MyInternationalizationString.Humidity);
-                unitText = "%";
-                break;
-            }
+//        public void ShowPage(Common sensor)
+//        {
+//#if DEBUG
+//            //UserConfig.Instance.GatewayMAC = "00005AF30A845F00";
+//#endif
+//            string unitText = "PM2.5";
+//            string titleText = "";
+//            switch (sensor.Type) {
+//            case DeviceType.SensorPM25:
+//                titleText = "PM2.5";
+//                unitText = @"渭g/m鲁";
+//                break;
+//            case DeviceType.SensorCO2:
+//                titleText = "CO2";
+//                unitText = "ppm";
+//                break;
+//            case DeviceType.SensorTVOC:
+//                titleText = "TVOC";
+//                unitText = "ppm";
+//                break;
+//            case DeviceType.SensorTemperature:
+//                titleText = Language.StringByID (R.MyInternationalizationString.Temp);
+//                unitText = "掳C";
+//                break;
+//            case DeviceType.SensorHumidity:
+//                titleText = Language.StringByID (R.MyInternationalizationString.Humidity);
+//                unitText = "%";
+//                break;
+//            }
 
-            List<SensorPushHistoryRes> revertData = new List<SensorPushHistoryRes> ();
-            this.BackgroundColor = SkinStyle.Current.MainColor;
-            #region 鏍囬
-            var topView = new FrameLayout () {
-                Y = Application.GetRealHeight (36),
-                Height = Application.GetRealHeight (90),
-                BackgroundColor = SkinStyle.Current.MainColor
-            };
-            AddChidren (topView);
+//            List<SensorPushHistoryRes> revertData = new List<SensorPushHistoryRes> ();
+//            this.BackgroundColor = SkinStyle.Current.MainColor;
+//            #region 鏍囬
+//            var topView = new FrameLayout () {
+//                Y = Application.GetRealHeight (36),
+//                Height = Application.GetRealHeight (90),
+//                BackgroundColor = SkinStyle.Current.MainColor
+//            };
+//            AddChidren (topView);
 
-            var title = new Button () {
-                TextAlignment = TextAlignment.Center,
-                Text = titleText +" " + Language.StringByID(R.MyInternationalizationString.DataHistory) ,
-                //TextID = R.MyInternationalizationString.SetPush,
-                TextColor = SkinStyle.Current.TextColor1,
-                TextSize = 19,
-            };
-            topView.AddChidren (title);
+//            var title = new Button () {
+//                TextAlignment = TextAlignment.Center,
+//                Text = titleText +" " + Language.StringByID(R.MyInternationalizationString.DataHistory) ,
+//                //TextID = R.MyInternationalizationString.SetPush,
+//                TextColor = SkinStyle.Current.TextColor1,
+//                TextSize = 19,
+//            };
+//            topView.AddChidren (title);
 
-            var logo = new Button () {
-                Width = Application.GetRealWidth (154),
-                Height = Application.GetRealHeight (90),
-                X = Application.GetRealWidth (486),
-                UnSelectedImagePath = MainPage.LogoString,
-            };
-            topView.AddChidren (logo);
-            var back = new Button () {
-                Height = Application.GetRealHeight (90),
-                Width = Application.GetRealWidth (85),
-                UnSelectedImagePath = "Item/Back.png",
-                SelectedImagePath = "Item/BackSelected.png",
-            };
-            topView.AddChidren (back);
-            back.MouseUpEventHandler += (sender, e) => {
-                (Parent as PageLayout).PageIndex -= 1;
-            };
-            #endregion
+//            var logo = new Button () {
+//                Width = Application.GetRealWidth (154),
+//                Height = Application.GetRealHeight (90),
+//                X = Application.GetRealWidth (486),
+//                UnSelectedImagePath = MainPage.LogoString,
+//            };
+//            topView.AddChidren (logo);
+//            var back = new Button () {
+//                Height = Application.GetRealHeight (90),
+//                Width = Application.GetRealWidth (85),
+//                UnSelectedImagePath = "Item/Back.png",
+//                SelectedImagePath = "Item/BackSelected.png",
+//            };
+//            topView.AddChidren (back);
+//            back.MouseUpEventHandler += (sender, e) => {
+//                (Parent as PageLayout).PageIndex -= 1;
+//            };
+//            #endregion
 
-            FrameLayout bodyView = new FrameLayout () { 
-                Y = topView.Bottom,
-                Height = Application.GetRealHeight(1136 -126),
-                BackgroundColor = SkinStyle.Current.ViewColor,
-            };
-            AddChidren (bodyView);
+//            FrameLayout bodyView = new FrameLayout () { 
+//                Y = topView.Bottom,
+//                Height = Application.GetRealHeight(1136 -126),
+//                BackgroundColor = SkinStyle.Current.ViewColor,
+//            };
+//            AddChidren (bodyView);
 
-            FrameLayout timeView = new FrameLayout () {
-                X = Application.GetRealWidth(20),
-                Height = Application.GetRealHeight (200),
-                Width = Application.GetRealWidth (600),
-            };
-            bodyView.AddChidren (timeView);
-            Button btnYear = new Button () {
-                Y = Application.GetRealHeight (50),
-                Width = Application.GetRealWidth (150),
-                Height = Application.GetRealHeight (80),
-                BorderColor = SkinStyle.Current.BorderColor,
-                BorderWidth = 1,
-                Radius = 1,
-                TextID = R.MyInternationalizationString.Year,
-                TextAlignment = TextAlignment.Center,
-                TextColor = SkinStyle.Current.TextColor1,
-                SelectedTextColor = SkinStyle.Current.SelectedColor,
-            };
-            timeView.AddChidren (btnYear);
+//            FrameLayout timeView = new FrameLayout () {
+//                X = Application.GetRealWidth(20),
+//                Height = Application.GetRealHeight (200),
+//                Width = Application.GetRealWidth (600),
+//            };
+//            bodyView.AddChidren (timeView);
+//            Button btnYear = new Button () {
+//                Y = Application.GetRealHeight (50),
+//                Width = Application.GetRealWidth (150),
+//                Height = Application.GetRealHeight (80),
+//                BorderColor = SkinStyle.Current.BorderColor,
+//                BorderWidth = 1,
+//                Radius = 1,
+//                TextID = R.MyInternationalizationString.Year,
+//                TextAlignment = TextAlignment.Center,
+//                TextColor = SkinStyle.Current.TextColor1,
+//                SelectedTextColor = SkinStyle.Current.SelectedColor,
+//            };
+//            timeView.AddChidren (btnYear);
 
-            Button btnMonth = new Button () {
-                X = btnYear.Right,
-                Y = Application.GetRealHeight (50),
-                Width = Application.GetRealWidth(150),
-                Height = Application.GetRealHeight (80),
-                BorderColor = SkinStyle.Current.BorderColor,
-                BorderWidth = 1,
-                Radius = 1,
-                Text = GetMonthText(DateTime.Now.Month),
-                TextAlignment = TextAlignment.Center,
-                TextColor= SkinStyle.Current.TextColor1,
-                SelectedTextColor = SkinStyle.Current.SelectedColor,
-            };
-            timeView.AddChidren (btnMonth);
+//            Button btnMonth = new Button () {
+//                X = btnYear.Right,
+//                Y = Application.GetRealHeight (50),
+//                Width = Application.GetRealWidth(150),
+//                Height = Application.GetRealHeight (80),
+//                BorderColor = SkinStyle.Current.BorderColor,
+//                BorderWidth = 1,
+//                Radius = 1,
+//                Text = GetMonthText(DateTime.Now.Month),
+//                TextAlignment = TextAlignment.Center,
+//                TextColor= SkinStyle.Current.TextColor1,
+//                SelectedTextColor = SkinStyle.Current.SelectedColor,
+//            };
+//            timeView.AddChidren (btnMonth);
 
-            Button btnDay = new Button () { 
-                X = btnMonth.Right,
-                Y = Application.GetRealHeight (50),
-                Width = Application.GetRealWidth (150),
-                Height = Application.GetRealHeight(80),
-                BorderColor = SkinStyle.Current.BorderColor,
-                BorderWidth = 1,
-                Radius = 1,
-                TextID = R.MyInternationalizationString.CurDay,
-                TextAlignment = TextAlignment.Center,
-                TextColor = SkinStyle.Current.TextColor1,
-                SelectedTextColor = SkinStyle.Current.SelectedColor,
-            };
-            timeView.AddChidren (btnDay);
+//            Button btnDay = new Button () { 
+//                X = btnMonth.Right,
+//                Y = Application.GetRealHeight (50),
+//                Width = Application.GetRealWidth (150),
+//                Height = Application.GetRealHeight(80),
+//                BorderColor = SkinStyle.Current.BorderColor,
+//                BorderWidth = 1,
+//                Radius = 1,
+//                TextID = R.MyInternationalizationString.CurDay,
+//                TextAlignment = TextAlignment.Center,
+//                TextColor = SkinStyle.Current.TextColor1,
+//                SelectedTextColor = SkinStyle.Current.SelectedColor,
+//            };
+//            timeView.AddChidren (btnDay);
 
-            Button btnTime = new Button () {
-                X = btnDay.Right,
-                Y = Application.GetRealHeight (50),
-                Width = Application.GetRealWidth (150),
-                Height = Application.GetRealHeight (80),
-                BorderColor = SkinStyle.Current.BorderColor,
-                BorderWidth = 1,
-                Radius = 1,
-                TextID = R.MyInternationalizationString.Days7,
-                TextAlignment = TextAlignment.Center,
-                TextColor = SkinStyle.Current.TextColor1,
-                SelectedTextColor = SkinStyle.Current.SelectedColor,
-            };
-            timeView.AddChidren (btnTime);
+//            Button btnTime = new Button () {
+//                X = btnDay.Right,
+//                Y = Application.GetRealHeight (50),
+//                Width = Application.GetRealWidth (150),
+//                Height = Application.GetRealHeight (80),
+//                BorderColor = SkinStyle.Current.BorderColor,
+//                BorderWidth = 1,
+//                Radius = 1,
+//                TextID = R.MyInternationalizationString.Days7,
+//                TextAlignment = TextAlignment.Center,
+//                TextColor = SkinStyle.Current.TextColor1,
+//                SelectedTextColor = SkinStyle.Current.SelectedColor,
+//            };
+//            timeView.AddChidren (btnTime);
 
-            FrameLayout chartView = new FrameLayout () { 
-                Y = Application.GetRealHeight(200),
-                Height = Application.GetRealHeight(600),
-            };
-            bodyView.AddChidren (chartView);
+//            FrameLayout chartView = new FrameLayout () { 
+//                Y = Application.GetRealHeight(200),
+//                Height = Application.GetRealHeight(600),
+//            };
+//            bodyView.AddChidren (chartView);
 
-            //MyEchartsView myEchartsView = new MyEchartsView ();
-            //chartView.AddChidren (myEchartsView);
-            Random random = new Random ();
-            List<string> xstrings = new List<string> ();
-            List<string> ystrings = new List<string> ();
+//            //MyEchartsView myEchartsView = new MyEchartsView ();
+//            //chartView.AddChidren (myEchartsView);
+//            Random random = new Random ();
+//            List<string> xstrings = new List<string> ();
+//            List<string> ystrings = new List<string> ();
          
 
-            btnMonth.BorderColor = SkinStyle.Current.SelectedColor;
-            btnMonth.IsSelected = true;
-            btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
-            btnDay.IsSelected = btnDay.IsSelected = false;
+//            btnMonth.BorderColor = SkinStyle.Current.SelectedColor;
+//            btnMonth.IsSelected = true;
+//            btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
+//            btnDay.IsSelected = btnDay.IsSelected = false;
 
-            btnYear.MouseUpEventHandler += (df, fd) => {
-                xstrings.Clear ();
-                ystrings.Clear ();
-                btnYear.BorderColor = SkinStyle.Current.SelectedColor;
-                btnYear.IsSelected = true;
-                btnMonth.BorderColor = btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
-                btnMonth.IsSelected = btnDay.IsSelected = btnTime.IsSelected = false;
-                System.Threading.Tasks.Task.Run (() => {
-                    try {
-                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowYear, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
-                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
-                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
-                        if (revertObj != null) {
-                            Application.RunOnMainThread (() => {
-                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
-                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
-                                    int ass = 0;
-                                    for (int i = 0; i < revertData.Count;i++) {
-                                        if (revertData [i].TargetValue.ToString () == "NaN") {
-                                            ass = 0;
-                                        } else {
-                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
-                                        }
-                                        xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().Month.ToString ());
-                                        ystrings.Add (ass.ToString ());
-                                    }
-                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
-                                }
-                            });
-                        }
-                    } catch (Exception ex) {
-                        Utlis.WriteLine (ex.ToString ());
-                    } finally {
-                        Application.RunOnMainThread (() => {
-                            MainPage.Loading.Hide ();
-                        });
-                    }
-                });
+//            btnYear.MouseUpEventHandler += (df, fd) => {
+//                xstrings.Clear ();
+//                ystrings.Clear ();
+//                btnYear.BorderColor = SkinStyle.Current.SelectedColor;
+//                btnYear.IsSelected = true;
+//                btnMonth.BorderColor = btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
+//                btnMonth.IsSelected = btnDay.IsSelected = btnTime.IsSelected = false;
+//                System.Threading.Tasks.Task.Run (() => {
+//                    try {
+//                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowYear, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
+//                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
+//                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
+//                        if (revertObj != null) {
+//                            Application.RunOnMainThread (() => {
+//                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
+//                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
+//                                    int ass = 0;
+//                                    for (int i = 0; i < revertData.Count;i++) {
+//                                        if (revertData [i].TargetValue.ToString () == "NaN") {
+//                                            ass = 0;
+//                                        } else {
+//                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
+//                                        }
+//                                        xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().Month.ToString ());
+//                                        ystrings.Add (ass.ToString ());
+//                                    }
+//                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
+//                                }
+//                            });
+//                        }
+//                    } catch (Exception ex) {
+//                        Utlis.WriteLine (ex.ToString ());
+//                    } finally {
+//                        Application.RunOnMainThread (() => {
+//                            MainPage.Loading.Hide ();
+//                        });
+//                    }
+//                });
 
-            };
+//            };
            
-            btnMonth.MouseUpEventHandler += (df, fd) => {
-                xstrings.Clear ();
-                ystrings.Clear ();
-                btnMonth.BorderColor = SkinStyle.Current.SelectedColor;
-                btnMonth.IsSelected = true;
-                btnYear.IsSelected = btnDay.IsSelected = btnDay.IsSelected = false;
-                btnYear.BorderColor = btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
+//            btnMonth.MouseUpEventHandler += (df, fd) => {
+//                xstrings.Clear ();
+//                ystrings.Clear ();
+//                btnMonth.BorderColor = SkinStyle.Current.SelectedColor;
+//                btnMonth.IsSelected = true;
+//                btnYear.IsSelected = btnDay.IsSelected = btnDay.IsSelected = false;
+//                btnYear.BorderColor = btnDay.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
 
-                Dialog dialogChooseMonth = new Dialog ();
+//                Dialog dialogChooseMonth = new Dialog ();
 
-                var chooseMonthView = new FrameLayout () { 
-                BackgroundColor = SkinStyle.Current.Black50Transparent,
-                };
-                dialogChooseMonth.AddChidren (chooseMonthView);
-                chooseMonthView.MouseUpEventHandler += (ddfd, fdfd) => {
-                    dialogChooseMonth.Close ();
-                };
+//                var chooseMonthView = new FrameLayout () { 
+//                BackgroundColor = SkinStyle.Current.Black50Transparent,
+//                };
+//                dialogChooseMonth.AddChidren (chooseMonthView);
+//                chooseMonthView.MouseUpEventHandler += (ddfd, fdfd) => {
+//                    dialogChooseMonth.Close ();
+//                };
 
-                VerticalScrolViewLayout chooseMothView = new VerticalScrolViewLayout () {
-                    Y = Application.GetRealHeight (636),
-                    Height = Application.GetRealHeight(500),
-                    BackgroundColor = SkinStyle.Current.DialogColor,
-                };
-                chooseMonthView.AddChidren (chooseMothView);
+//                VerticalScrolViewLayout chooseMothView = new VerticalScrolViewLayout () {
+//                    Y = Application.GetRealHeight (636),
+//                    Height = Application.GetRealHeight(500),
+//                    BackgroundColor = SkinStyle.Current.DialogColor,
+//                };
+//                chooseMonthView.AddChidren (chooseMothView);
 
-                for (int ii = 1; ii < DateTime.Now.Month+1; ii++) {
-                    Button btn = new Button () {
-                        Height = Application.GetRealHeight (100),
-                        TextAlignment = TextAlignment.Center,
-                        TextColor = SkinStyle.Current.TextColor,
-                        Tag = ii
-                    };
-                    btn.Text = GetMonthText (ii);
-                    chooseMothView.AddChidren (btn);
-                    btn.MouseUpEventHandler += (dff, ffd) => {
-                        chooseMothView.RemoveAll ();
-                        chooseMothView.RemoveFromParent ();
-                        dialogChooseMonth.Close ();
-                        btnMonth.Text = ((Button)dff).Text;
-                        System.Threading.Tasks.Task.Run (() => {
-                            try {
-                                var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowMonth, LoopID = 1, NowMonth = Convert.ToInt32 (((Button)dff).Tag), MAC = UserConfig.Instance.GatewayMAC };
-                                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
-                                var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
-                                if (revertObj != null) {
-                                    Application.RunOnMainThread (() => {
-                                        if (revertObj.StateCode.ToUpper() == "SUCCESS") {
-                                            revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
-                                            int ass = 0;
-                                            for (int i = 0; i < revertData.Count; i++) {
-                                                if (revertData [i].TargetValue.ToString () == "NaN") {
-                                                    ass = 0;
-                                                } else {
-                                                    ass = Convert.ToInt32 (revertData [i].TargetValue);
-                                                }
-                                                xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().Day.ToString ());
-                                                ystrings.Add (ass.ToString ());
-                                            }
-                                            //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
-                                        }
-                                    });
-                                }
-                            } catch (Exception ex) {
-                                Utlis.WriteLine (ex.ToString ());
-                            } finally {
-                                Application.RunOnMainThread (() => {
-                                    MainPage.Loading.Hide ();
-                                });
-                            }
-                        });
-                    };
+//                for (int ii = 1; ii < DateTime.Now.Month+1; ii++) {
+//                    Button btn = new Button () {
+//                        Height = Application.GetRealHeight (100),
+//                        TextAlignment = TextAlignment.Center,
+//                        TextColor = SkinStyle.Current.TextColor,
+//                        Tag = ii
+//                    };
+//                    btn.Text = GetMonthText (ii);
+//                    chooseMothView.AddChidren (btn);
+//                    btn.MouseUpEventHandler += (dff, ffd) => {
+//                        chooseMothView.RemoveAll ();
+//                        chooseMothView.RemoveFromParent ();
+//                        dialogChooseMonth.Close ();
+//                        btnMonth.Text = ((Button)dff).Text;
+//                        System.Threading.Tasks.Task.Run (() => {
+//                            try {
+//                                var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowMonth, LoopID = 1, NowMonth = Convert.ToInt32 (((Button)dff).Tag), MAC = UserConfig.Instance.GatewayMAC };
+//                                var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
+//                                var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
+//                                if (revertObj != null) {
+//                                    Application.RunOnMainThread (() => {
+//                                        if (revertObj.StateCode.ToUpper() == "SUCCESS") {
+//                                            revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
+//                                            int ass = 0;
+//                                            for (int i = 0; i < revertData.Count; i++) {
+//                                                if (revertData [i].TargetValue.ToString () == "NaN") {
+//                                                    ass = 0;
+//                                                } else {
+//                                                    ass = Convert.ToInt32 (revertData [i].TargetValue);
+//                                                }
+//                                                xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().Day.ToString ());
+//                                                ystrings.Add (ass.ToString ());
+//                                            }
+//                                            //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
+//                                        }
+//                                    });
+//                                }
+//                            } catch (Exception ex) {
+//                                Utlis.WriteLine (ex.ToString ());
+//                            } finally {
+//                                Application.RunOnMainThread (() => {
+//                                    MainPage.Loading.Hide ();
+//                                });
+//                            }
+//                        });
+//                    };
 
-                    Button btnLine = new Button (){
-                        BackgroundColor = SkinStyle.Current.Black50Transparent,
-                        Height = 1
-                    };
-                    chooseMothView.AddChidren (btnLine);
-                }
-                dialogChooseMonth.Show ();
-            };
-            btnDay.MouseUpEventHandler += (df, fd) => {
-                xstrings.Clear ();
-                ystrings.Clear ();
-                btnDay.BorderColor = SkinStyle.Current.SelectedColor;
-                btnDay.IsSelected = true;
-                btnYear.BorderColor = btnMonth.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
-                btnYear.IsSelected = btnMonth.IsSelected = btnTime.IsSelected = false;
-                System.Threading.Tasks.Task.Run (() => {
-                    try {
-                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowDay, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
-                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
-                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
-                        if (revertObj != null) {
-                            Application.RunOnMainThread (() => {
-                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
-                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
-                                    int ass = 0;
-                                    for (int i = 0; i < revertData.Count; i++) {
-                                        if (revertData [i].TargetValue.ToString () == "NaN") {
-                                            ass = 0;
-                                        } else {
-                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
-                                        }
-                                        xstrings.Add (revertData [i].CreatedOnUtc.Hour.ToString ());
-                                        ystrings.Add (ass.ToString ());
-                                    }
-                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
-                                }
-                            });
-                        }
-                    } catch (Exception ex) {
-                        Utlis.WriteLine (ex.ToString ());
-                    } finally {
-                        Application.RunOnMainThread (() => {
-                            MainPage.Loading.Hide ();
-                        });
-                    }
-                });
+//                    Button btnLine = new Button (){
+//                        BackgroundColor = SkinStyle.Current.Black50Transparent,
+//                        Height = 1
+//                    };
+//                    chooseMothView.AddChidren (btnLine);
+//                }
+//                dialogChooseMonth.Show ();
+//            };
+//            btnDay.MouseUpEventHandler += (df, fd) => {
+//                xstrings.Clear ();
+//                ystrings.Clear ();
+//                btnDay.BorderColor = SkinStyle.Current.SelectedColor;
+//                btnDay.IsSelected = true;
+//                btnYear.BorderColor = btnMonth.BorderColor = btnTime.BorderColor = SkinStyle.Current.BorderColor;
+//                btnYear.IsSelected = btnMonth.IsSelected = btnTime.IsSelected = false;
+//                System.Threading.Tasks.Task.Run (() => {
+//                    try {
+//                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.NowDay, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
+//                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
+//                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
+//                        if (revertObj != null) {
+//                            Application.RunOnMainThread (() => {
+//                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
+//                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
+//                                    int ass = 0;
+//                                    for (int i = 0; i < revertData.Count; i++) {
+//                                        if (revertData [i].TargetValue.ToString () == "NaN") {
+//                                            ass = 0;
+//                                        } else {
+//                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
+//                                        }
+//                                        xstrings.Add (revertData [i].CreatedOnUtc.Hour.ToString ());
+//                                        ystrings.Add (ass.ToString ());
+//                                    }
+//                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
+//                                }
+//                            });
+//                        }
+//                    } catch (Exception ex) {
+//                        Utlis.WriteLine (ex.ToString ());
+//                    } finally {
+//                        Application.RunOnMainThread (() => {
+//                            MainPage.Loading.Hide ();
+//                        });
+//                    }
+//                });
 
-            };
+//            };
           
-            Action action = () => {
-                xstrings.Clear ();
-                ystrings.Clear ();
-                btnTime.BorderColor = SkinStyle.Current.SelectedColor;
-                btnTime.IsSelected = true;
-                btnYear.BorderColor = btnMonth.BorderColor = btnDay.BorderColor = SkinStyle.Current.BorderColor;
-                btnYear.IsSelected = btnMonth.IsSelected = btnDay.IsSelected = false;
-                MainPage.Loading.Start ("Please wait...");
-                System.Threading.Tasks.Task.Run (() => {
-                    try {
-                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.LatelySevenDay, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
-                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
-                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
-                        if (revertObj != null) {
-                            Application.RunOnMainThread (() => {
-                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
-                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
-                                    int ass = 0;
-                                    for (int i = 0; i < revertData.Count; i++) {
-                                        if (revertData [i].TargetValue.ToString () == "NaN") {
-                                            ass = 0;
-                                        } else {
-                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
-                                        }
-                                        xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().ToString ("MM/dd"));
-                                        ystrings.Add (ass.ToString ());
-                                    }
-                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
-                                }
-                            });
-                        }
-                    } catch (Exception ex) {
-                        Utlis.WriteLine (ex.ToString ());
-                    } finally {
-                        Application.RunOnMainThread (() => {
-                            MainPage.Loading.Hide ();
-                        });
-                    }
-                });
+//            Action action = () => {
+//                xstrings.Clear ();
+//                ystrings.Clear ();
+//                btnTime.BorderColor = SkinStyle.Current.SelectedColor;
+//                btnTime.IsSelected = true;
+//                btnYear.BorderColor = btnMonth.BorderColor = btnDay.BorderColor = SkinStyle.Current.BorderColor;
+//                btnYear.IsSelected = btnMonth.IsSelected = btnDay.IsSelected = false;
+//                MainPage.Loading.Start ("Please wait...");
+//                System.Threading.Tasks.Task.Run (() => {
+//                    try {
+//                        var requestObj = new SensorPushHistory () { SubnetID = sensor.SubnetID, DeviceID = sensor.DeviceID, LargeType = sensor.BigClass, SmallType = sensor.MinClass, QueryType = QueryType.LatelySevenDay, LoopID = 1, NowMonth = 0, MAC = UserConfig.Instance.GatewayMAC };
+//                        var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject (requestObj);
+//                        var revertObj = MainPage.RequestHttps ("GetSensorPushHistory", requestJson);
+//                        if (revertObj != null) {
+//                            Application.RunOnMainThread (() => {
+//                                if (revertObj.StateCode.ToUpper() == "SUCCESS") {
+//                                    revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SensorPushHistoryRes>> (revertObj.ResponseData.ToString ());
+//                                    int ass = 0;
+//                                    for (int i = 0; i < revertData.Count; i++) {
+//                                        if (revertData [i].TargetValue.ToString () == "NaN") {
+//                                            ass = 0;
+//                                        } else {
+//                                            ass = Convert.ToInt32 (revertData [i].TargetValue);
+//                                        }
+//                                        xstrings.Add (revertData [i].CreatedOnUtc.ToLocalTime ().ToString ("MM/dd"));
+//                                        ystrings.Add (ass.ToString ());
+//                                    }
+//                                    //myEchartsView.Show (unitText, xstrings.ToArray (), ystrings.ToArray ());
+//                                }
+//                            });
+//                        }
+//                    } catch (Exception ex) {
+//                        Utlis.WriteLine (ex.ToString ());
+//                    } finally {
+//                        Application.RunOnMainThread (() => {
+//                            MainPage.Loading.Hide ();
+//                        });
+//                    }
+//                });
 
-            };
-            btnTime.MouseUpEventHandler += (df, fd) => {
-                action ();
-            };
+//            };
+//            btnTime.MouseUpEventHandler += (df, fd) => {
+//                action ();
+//            };
 
-            action ();
-        }
+//            action ();
+//        }
 
-        string GetMonthText (int InMonth)
-        {
-            string strReturn = "";
-            if (Language.CurrentLanguage == "English") {
-                string strParaMonthn = "Jan._Feb._Mar._Apr._May_Jun._Jul._Aug._Sep._Oct._Nov._Dec.";
-                string [] strSubMonth = strParaMonthn.Split ("_".ToCharArray ());
-                strReturn = strSubMonth [InMonth - 1];
-            } else {
-                strReturn = InMonth + "  鏈�";
-            }
-            return strReturn;
-        }
-    }
-}
+//        string GetMonthText (int InMonth)
+//        {
+//            string strReturn = "";
+//            if (Language.CurrentLanguage == "English") {
+//                string strParaMonthn = "Jan._Feb._Mar._Apr._May_Jun._Jul._Aug._Sep._Oct._Nov._Dec.";
+//                string [] strSubMonth = strParaMonthn.Split ("_".ToCharArray ());
+//                strReturn = strSubMonth [InMonth - 1];
+//            } else {
+//                strReturn = InMonth + "  鏈�";
+//            }
+//            return strReturn;
+//        }
+//    }
+//}
diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs
index f788de6..1e8c76f 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Sensor/UserSensorPage.cs
@@ -194,10 +194,10 @@
             updateTextThreadList.Add (thread);
             thread.Start ();
             EventHandler<MouseEventArgs> eventHandler = (dd, ff) => {
-                UserSensorHistoryPage usp = new UserSensorHistoryPage ();
-                UserMiddle.DevicePageView.AddChidren (usp);
-                usp.ShowPage (sensor);
-                UserMiddle.DevicePageView.PageIndex = UserMiddle.DevicePageView.ChildrenCount - 1;
+                //UserSensorHistoryPage usp = new UserSensorHistoryPage ();
+                //UserMiddle.DevicePageView.AddChidren (usp);
+                //usp.ShowPage (sensor);
+                //UserMiddle.DevicePageView.PageIndex = UserMiddle.DevicePageView.ChildrenCount - 1;
             };
             btnUnit.MouseUpEventHandler += eventHandler;
             bntTitle.MouseUpEventHandler += eventHandler;
diff --git a/Crabtree/SmartHome/dll/IOS/JLJailBreak.dll b/Crabtree/SmartHome/dll/IOS/JLJailBreak.dll
index 6fead7a..e1956e8 100644
--- a/Crabtree/SmartHome/dll/IOS/JLJailBreak.dll
+++ b/Crabtree/SmartHome/dll/IOS/JLJailBreak.dll
Binary files differ

--
Gitblit v1.8.0