From 311aa775e05f567795e9cc131c67310b3bb133aa Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 26 三月 2021 10:49:09 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 115 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs
new file mode 100644
index 0000000..d04a166
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/Send.cs
@@ -0,0 +1,115 @@
+锘縰sing System;
+using System.IO;
+using System.Net;
+
+namespace HDL_ON.UI.UI2.FuntionControlView.Video
+{
+    public class Send
+    {
+        public Send()
+        {
+        }
+
+        ///// <summary>
+        ///// 鑾峰彇鍙瀵硅鍒楄〃
+        ///// </summary>
+        //static async System.Threading.Tasks.Task<List<VideoCalss>> GetVideoInfoList(CloudsVideo clouds)
+        //{
+        //    List<VideoCalss> eSVideoInfosList = new List<VideoCalss>();
+        //    var jobject = new JObject();
+        //    jobject.Add("cmtID", clouds.FLCommunityID);
+        //    jobject.Add("unitno", clouds.FLBuildingID);
+        //    jobject.Add("method", "getUUIDList");
+        //    var url = "http://112.74.164.111:180/api.php/Device/getmonitorUUID";
+        //    var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST");
+        //    if (string.IsNullOrEmpty(str))
+        //    {
+        //        return eSVideoInfosList;
+        //    }
+        //    var json = JObject.Parse(str);
+        //    if (json == null)
+        //    {
+        //        return eSVideoInfosList;
+        //    }
+        //    if (json["resCode"].ToString() != "0")
+        //    {
+        //        return eSVideoInfosList;
+        //    }
+        //    var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json["list"].ToString());
+        //    if (list.Count == 0)
+        //    {
+        //        return eSVideoInfosList;
+        //    }
+        //    foreach (var videoInfo in list)
+        //    {
+        //        VideoCalss eSVideoInfo = new VideoCalss();
+        //        eSVideoInfo.ESRoomID = int.Parse(clouds.FLRoomID);
+        //        string str1 = clouds.FLBuildingID.Substring(0, 2).TrimStart('0');
+        //        string str2 = clouds.FLBuildingID.Substring(2, 2).TrimStart('0');
+        //        eSVideoInfo.RoomName = str1 + Language.StringByID(R.MyInternationalizationString.dong) + str2 + Language.StringByID(R.MyInternationalizationString.unit);
+        //        eSVideoInfo.DeviceName = videoInfo["aliasName"];
+        //        if (videoInfo["uuid"].Contains(","))
+        //        {
+        //            var uuid = videoInfo["uuid"].Split(',');
+        //            eSVideoInfo.ESVideoUUID = uuid[0];
+        //        }
+        //        else
+        //        {
+        //            eSVideoInfo.ESVideoUUID = videoInfo["uuid"];
+        //        }
+        //        eSVideoInfosList.Add(eSVideoInfo);
+        //    }
+        //    return eSVideoInfosList;
+        //}
+
+        ///// <summary>
+        /////  璇锋眰鏈嶅姟鍣ㄧ殑鏂规硶(鏀寔璇锋眰鏂瑰紡涓篜OST/GET)
+        ///// </summary>
+        ///// <param name="getUrl">璇锋眰鐨勫湴鍧�</param>
+        ///// <param name="str">璇锋眰鏁版嵁</param>
+        ///// <param name="method">璇锋眰鏂瑰紡涓篜OST/GET</param>
+        ///// <param name="second">瓒呮椂鏃堕棿</param>
+        ///// <returns></returns>
+        //public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3, bool _bool = false)
+        //{
+        //    try
+        //    {
+        //        HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //鍒涘缓璇锋眰
+        //        request.Method = method; //璇锋眰鏂瑰紡涓篜OST/GET
+        //        request.ContentType = "application/json";
+        //        request.Timeout = second * 1000;//瓒呮椂鏃堕棿
+        //        if (_bool)
+        //        {
+        //            //鐢ㄤ簬楂樿儨鍙瀵硅鎺ュ彛
+        //            request.Headers.Add("Authorization", Config.Instance.Token);
+        //        }
+        //        if (method == "POST")
+        //        {
+        //            byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
+        //            request.ContentLength = jsonbyte.Length;
+        //            Stream postStream = request.GetRequestStream();
+        //            postStream.Write(jsonbyte, 0, jsonbyte.Length);
+        //            postStream.Close();
+        //        }
+        //        //鍙戦�佽姹傚苟鑾峰彇鐩稿簲鍥炲簲鏁版嵁       
+        //        HttpWebResponse res;
+        //        try
+        //        {
+        //            res = (HttpWebResponse)request.GetResponse();
+        //        }
+        //        catch (WebException ex)
+        //        {
+        //            res = (HttpWebResponse)ex.Response;
+        //        }
+        //        StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.UTF8);
+        //        string content = sr.ReadToEnd(); //鑾峰緱鍝嶅簲瀛楃涓�
+        //        return content;
+        //    }
+        //    catch
+        //    {
+        //        return null;
+        //    }
+       // }
+
+    }
+}

--
Gitblit v1.8.0