From ac3c6b64df51443519d3a27fa8cf0d25dd6ff6d7 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 04 三月 2021 09:37:54 +0800 Subject: [PATCH] Merge branch 'wjc' --- Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 90 +++++++++++++++++++++++---------------------- 1 files changed, 46 insertions(+), 44 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs index 46332c8..4e05170 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs @@ -38,7 +38,7 @@ //public static Button LogoButton = new Button (); - public static string RequestVersion = "2.601071"; + public static string RequestVersion = "2.603031"; public static UserInfo LoginUser; /// <summary> /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken) @@ -140,7 +140,9 @@ Application.DesignHeight = 1136; } //鍗板害瀹㈡埛瀹氬埗APP榛樿浣跨敤鑻辨枃 - Language.CurrentLanguage = "English"; + //Language.CurrentLanguage = "English"; + Language.CurrentLanguage = "Chinese"; + Shared.BusSocket.Start (6000); CommonPage.InitReceiveEvent (); @@ -254,52 +256,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