From ccdff82fac4bcc1067ec806ade5ae897f1214f4d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 01 四月 2021 14:41:53 +0800
Subject: [PATCH] 异常捕获

---
 HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs |  138 ++++++++++++++++++++++++++-------------------
 1 files changed, 79 insertions(+), 59 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs
index e8086fb..3b5bcd8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMethod.cs
@@ -6,58 +6,63 @@
 
 namespace HDL_ON.UI.UI2.FuntionControlView.Video
 {
-    public class VideoMethod : FrameLayout
+    public class VideoMethod
     {
-        public void MianView()
-        {
-            var d = VideoSend.GetVideo();
-            getVideo((video) =>
-            {
-                List<ESVideoInfo> listESVideoInfo = new List<ESVideoInfo>();
-                List<CallView> listCall = new List<CallView>();
-                new System.Threading.Thread(() =>
-                {
-                    try
-                    {
-                        listESVideoInfo = VideoSend.GetVideoInfoList(video);
-                        listCall = getCall(video.id);
-                    }
-                    catch
-                    {
-
-                    }
-                    finally
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            var mainView = new MainView();
-                            MainPage.BasePageView.AddChidren(mainView);
-                            mainView.Show(listESVideoInfo, listCall);
-                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                        });
-                    }
-                })
-                { IsBackground = true }.Start();
-            }, this, true);
-        }
-        /// <summary>
-        /// 鑾峰彇鍙瀵硅
-        /// </summary>
-        /// <param name="action">鍥炶皟鍑芥暟</param>
-        /// <param name="frame">log鐖舵帶浠�</param>
-        public void getVideo(Action<VideoObj> action, FrameLayout frame, bool tag)
-        {
-            ThreadSend(null, (responsePackNew) =>
-             {
-                 try
-                 {
-                     var str = responsePackNew.Data.ToString();
-                     var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoObj>(str);
-                     action(videoObj);
-                 }
-                 catch { }
-             }, "鑾峰彇鍙瀵硅", "fram", frame, null, tag);
-        }
+        ///// <summary>
+        ///// 绋嬪簭涓诲叆鍙�
+        ///// </summary>
+        ///// <param name="frameLayout">log鐖舵帶浠�</param>
+        ///// <param name="video">鍙瀵硅瀵硅薄</param>
+        //public void MianView(FrameLayout frameLayout, VideoClouds video)
+        //{
+        //    //鍔犺浇log
+        //    Loading loading = new Loading();
+        //    frameLayout.AddChidren(loading);
+        //    loading.Start();
+        //    List<VideoMethod.FlVideo> listESVideoInfo = new List<VideoMethod.FlVideo>();
+        //    List<CallView> listCall = new List<CallView>();
+        //    new System.Threading.Thread(() =>
+        //    {
+        //        try
+        //        {
+        //            listESVideoInfo = VideoSend.GetVideoInfoList(video);
+        //            listCall = getCall(video.id);
+        //        }
+        //        catch
+        //        {
+        //        }
+        //        finally
+        //        {
+        //            Application.RunOnMainThread(() =>
+        //            {
+        //                loading.Hide();
+        //                var mainView = new HDL_ON.UI.UI2.FuntionControlView.Video.MainView();
+        //                MainPage.BasePageView.AddChidren(mainView);
+        //                mainView.Show();
+        //                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+        //            });
+        //        }
+        //    })
+        //    { IsBackground = true }.Start();
+        //}
+        ///// <summary>
+        ///// 鑾峰彇鍙瀵硅
+        ///// </summary>
+        ///// <param name="action">鍥炶皟鍑芥暟</param>
+        ///// <param name="frame">log鐖舵帶浠�</param>
+        //public void getVideo(Action<VideoClouds> action, FrameLayout frame, bool tag)
+        //{
+        //    ThreadSend(null, (responsePackNew) =>
+        //     {
+        //         try
+        //         {
+        //             var str = responsePackNew.Data.ToString();
+        //             var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str);
+        //             action(videoObj);
+        //         }
+        //         catch { }
+        //     }, "鑾峰彇鍙瀵硅", "fram", frame, null, tag);
+        //}
         /// <summary>
         /// 鑾峰彇鍘嗗彶閫氳瘽璁板綍
         /// </summary>
@@ -67,6 +72,7 @@
             List<CallView> callViewList = new List<CallView>();
             try
             {
+                
                 List<Call> listCall = new List<Call>();
                 var responsePackNew = VideoSend.GetCall(id);
                 if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "")
@@ -77,6 +83,7 @@
 
                 }
                 List<string> strYear = new List<string>();
+                //鏌ヨ骞翠唤
                 for (int i = 0; i < listCall.Count; i++)
                 {
                     var call = listCall[i];
@@ -93,7 +100,7 @@
                     }
 
                 }
-
+                //閲嶆柊瀛樺偍
                 for (int j = 0; j < strYear.Count; j++)
                 {
                     var year = strYear[j];
@@ -130,7 +137,7 @@
         /// <param name="frame">log鐖舵帶浠�</param>
         /// <param name="dialog">log鐖舵帶浠�</param>
         /// <param name="tag">鏄惁瑕佹樉绀簂og</param>
-        public static void ThreadSend(VideoObj videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true)
+        public void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true)
         {
 
             //鍔犺浇log
@@ -195,11 +202,14 @@
 
 
         }
-        [Serializable]
-        public class VideoObj
+       
+     
+    
+        [Serializable] 
+        public class VideoClouds
         {
             /// <summary>
-            /// 涓版灄缁戝畾id锛坒lBindId锛�
+            /// 涓版灄缁戝畾id锛坒lBindId锛�(userKey)
             /// </summary>
             public string id = string.Empty;
             /// <summary>
@@ -276,7 +286,6 @@
             /// </summary>
             public string flBindId = string.Empty;
         }
-
         [Serializable]
         public class CallView
         {
@@ -288,8 +297,19 @@
            public List<Call> callList = new List<Call>();
 
         }
+        [Serializable]
+        public class FlVideo
+        {
+            /// <summary>
+            /// 璁惧鍚嶇О
+            /// </summary>
+            public string aliasName = string.Empty;
+            /// <summary>
+            /// 璁惧绫诲瀷锛�(1瀹ゅ唴鏈�,2瀹ゅ鏈猴紝3鍥村鏈猴紝4绠$悊鏈�,5浜屾纭鏈�)
+            /// </summary>
+            public string devType = string.Empty;
+            public string uuid = string.Empty;
+        }
 
-
-        
     }
 }

--
Gitblit v1.8.0