| | |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | | public class VideoMethod : FrameLayout |
| | | public class VideoMethod |
| | | { |
| | | public void MianView() |
| | | /// <summary> |
| | | /// 程序主入口 |
| | | /// </summary> |
| | | /// <param name="frameLayout">log父控件</param> |
| | | /// <param name="video">可视对讲对象</param> |
| | | public void MianView(FrameLayout frameLayout, VideoClouds video) |
| | | { |
| | | var d = VideoSend.GetVideo(); |
| | | getVideo((video) => |
| | | //加载log |
| | | Loading loading = new Loading(); |
| | | frameLayout.AddChidren(loading); |
| | | loading.Start(); |
| | | List<ESVideoInfo> listESVideoInfo = new List<ESVideoInfo>(); |
| | | List<CallView> listCall = new List<CallView>(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | List<ESVideoInfo> listESVideoInfo = new List<ESVideoInfo>(); |
| | | List<CallView> listCall = new List<CallView>(); |
| | | new System.Threading.Thread(() => |
| | | try |
| | | { |
| | | try |
| | | { |
| | | listESVideoInfo = VideoSend.GetVideoInfoList(video); |
| | | listCall = getCall(video.id); |
| | | } |
| | | catch |
| | | { |
| | | listESVideoInfo = VideoSend.GetVideoInfoList(video); |
| | | listCall = getCall(video.id); |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | finally |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | 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); |
| | | loading.Hide(); |
| | | var mainView = new MainView(); |
| | | MainPage.BasePageView.AddChidren(mainView); |
| | | mainView.Show(listESVideoInfo, listCall, video); |
| | | 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<VideoObj> action, FrameLayout frame, bool tag) |
| | | 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<VideoObj>(str); |
| | | var videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); |
| | | action(videoObj); |
| | | } |
| | | catch { } |
| | |
| | | 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() != "") |
| | |
| | | |
| | | } |
| | | List<string> strYear = new List<string>(); |
| | | //查询年份 |
| | | for (int i = 0; i < listCall.Count; i++) |
| | | { |
| | | var call = listCall[i]; |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //重新存储 |
| | | for (int j = 0; j < strYear.Count; j++) |
| | | { |
| | | var year = strYear[j]; |
| | |
| | | /// <param name="frame">log父控件</param> |
| | | /// <param name="dialog">log父控件</param> |
| | | /// <param name="tag">是否要显示log</param> |
| | | public static void ThreadSend(VideoObj videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true) |
| | | public static void ThreadSend(VideoClouds videoObj, Action<ResponsePackNew> action, string str, string view, FrameLayout frame, Dialog dialog, bool tag = true) |
| | | { |
| | | |
| | | //加载log |
| | |
| | | |
| | | |
| | | } |
| | | [Serializable] |
| | | public class VideoObj |
| | | { |
| | | |
| | | [Serializable] |
| | | public class VideoClouds |
| | | { |
| | | /// <summary> |
| | | /// 丰林绑定id(flBindId) |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public string flBindId = string.Empty; |
| | | } |
| | | |
| | | [Serializable] |
| | | public class CallView |
| | | { |
| | |
| | | public List<Call> callList = new List<Call>(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |