From f382eaff90d5126387b5616b602b4168b37ad21c Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 12 一月 2021 16:54:12 +0800
Subject: [PATCH] Merge branch 'master' into wjc

---
 Crabtree/SmartHome/UI/SimpleControl/MainPage.cs |   84 +++++++++++++++++++++---------------------
 1 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
index 46332c8..ee06e8d 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
@@ -254,52 +254,52 @@
 
         //}
 
-        /// <summary>
-        /// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
-        /// </summary>
-        /// <returns>The https.</returns>
-        /// <param name="methodType">璇锋眰鏂规硶.</param>
-        /// <param name="dataStringJson">璇锋眰鐨勫弬鏁�.</param>
-        /// <param name="needHeaders">鏄惁闇�瑕佸寘澶�.</param>
-        public static byte [] RequestHttpsReturnByte (string methodType, string dataStringJson, bool needHeaders = false, string urlHead = "")
-        {
-            ResponsePack revertObj = null;
-            try {
+        ///// <summary>
+        ///// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
+        ///// </summary>
+        ///// <returns>The https.</returns>
+        ///// <param name="methodType">璇锋眰鏂规硶.</param>
+        ///// <param name="dataStringJson">璇锋眰鐨勫弬鏁�.</param>
+        ///// <param name="needHeaders">鏄惁闇�瑕佸寘澶�.</param>
+        //public static byte [] RequestHttpsReturnByte (string methodType, string dataStringJson, bool needHeaders = false, string urlHead = "")
+        //{
+        //    ResponsePack revertObj = null;
+        //    try {
 
-                ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, error) => {
-                    return true;
-                };
+        //        ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, error) => {
+        //            return true;
+        //        };
 
-                #region
-                var webClient = new WebClient ();
-                if (urlHead == "") {
-                    urlHead = RequestHttpsHost;
-                }
-                //else {
-                //    webClient.Headers.Add ("CONTENT-TYPE", "application/json");
-                //}
-                webClient.Headers.Add ("CONTENT-TYPE", "application/json");
-                string url = urlHead + methodType;
-                if (needHeaders && LoginUser != null) {/* 濡傛灉涓嶉渶瑕侀獙璇乀oken鍙互涓嶇敤浼犲叆 */
-                    webClient.Headers.Add ("Authorization", LoginUser.LoginTokenString);
-                }
-                byte [] bytes = null;
-                try {
-                    bytes = webClient.UploadData (url, Encoding.UTF8.GetBytes (dataStringJson));
-                } catch (System.Net.WebException webEx) {
-                    return bytes;
-                }
+        //        #region
+        //        var webClient = new WebClient ();
+        //        if (urlHead == "") {
+        //            urlHead = RequestHttpsHost;
+        //        }
+        //        //else {
+        //        //    webClient.Headers.Add ("CONTENT-TYPE", "application/json");
+        //        //}
+        //        webClient.Headers.Add ("CONTENT-TYPE", "application/json");
+        //        string url = urlHead + methodType;
+        //        if (needHeaders && LoginUser != null) {/* 濡傛灉涓嶉渶瑕侀獙璇乀oken鍙互涓嶇敤浼犲叆 */
+        //            webClient.Headers.Add ("Authorization", LoginUser.LoginTokenString);
+        //        }
+        //        byte [] bytes = null;
+        //        try {
+        //            bytes = webClient.UploadData (url, Encoding.UTF8.GetBytes (dataStringJson));
+        //        } catch (System.Net.WebException webEx) {
+        //            return bytes;
+        //        }
              
             
-                return bytes;
-                #endregion
-            } catch (Exception ex) {
-                Utlis.WriteLine (ex.Message);
-                return null;
-            } finally {
-                //requesTime = requesTime.AddDays(1);
-            }
-        }
+        //        return bytes;
+        //        #endregion
+        //    } catch (Exception ex) {
+        //        Utlis.WriteLine (ex.Message);
+        //        return null;
+        //    } finally {
+        //        //requesTime = requesTime.AddDays(1);
+        //    }
+        //}
 
 
         /// <summary>

--
Gitblit v1.8.0