JLChen
2021-04-01 813aee559e544e6bf7777404612a4712cad184c8
HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
@@ -5,7 +5,6 @@
using HDL_ON.Stan;
using ZXing.QrCode.Internal;
using static HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod;
using HDL_ON.Entity;
namespace HDL_ON.UI.UI2.FuntionControlView.Video
{
@@ -17,10 +16,8 @@
        /// <param name="listVideo">门口机列表</param>
        /// <param name="listCall">通话记录列表</param>
        /// <param name="video">当前的可视对讲</param>
        //public void Show(List<VideoMethod.FlVideo> listVideo, List<CallView> listCall, VideoClouds video)
        public void Show()
        public void Show(List<VideoMethod.FlVideo> listVideo, List<CallView> listCall, VideoClouds video)
        {
            #region 布局界面
            this.BackgroundColor = MusicColor.ViewColor;
            var topView = new TopView();
@@ -42,8 +39,8 @@
            pageView.AddChidren(view1);
            var view2 = new FrameLayout();
            pageView.AddChidren(view2);
            View1(view1);
            View2(view2);
            View1(view1, listVideo, video);
            View2(view2, listCall, video);
            Button btn11 = new Button
            {
                X = Application.GetRealWidth(170),
@@ -108,13 +105,7 @@
        /// <param name="view1">父控件</param>
        /// <param name="list">门口机列表</param>
        /// <param name="videoClouds">当前的可视对讲</param>
        void View1(FrameLayout view1)
        {
            new System.Threading.Thread(() =>
            {
                var list = VideoSend.GetVideoInfoList(FunctionList.List.videoIntercom);
                Application.RunOnMainThread(() =>
        void View1(FrameLayout view1, List<VideoMethod.FlVideo> list, VideoClouds videoClouds)
                {
                    #region 布局界面
                    var bjFl = new FrameLayout
@@ -156,7 +147,7 @@
                        TextAlignment = TextAlignment.CenterLeft,
                        Text = "123456"
                    };
                    bjFl.AddChidren(regionBtn);
            // bjFl.AddChidren(regionBtn);
                    /// <summary>
                    ///收藏图标
                    /// </summary>
@@ -169,7 +160,7 @@
                        UnSelectedImagePath = "MusicIcon/collect.png",
                        SelectedImagePath = "MusicIcon/collectSelected.png",
                    };
                    bjFl.AddChidren(collectIconBtn);
            // bjFl.AddChidren(collectIconBtn);
                    ///可视对讲图标
                    Button intercomBtnIcon = new Button
                    {
@@ -204,11 +195,13 @@
                    }
                    else
                    {
                        l = (list.Count / 3) + 1;
                    }
                    var fL = new FrameLayout
                    {
                        Height = Application.GetRealHeight((48 + 24) * l),
                    };
                    vv.AddChidren(fL);
                    int line = 0;
@@ -262,11 +255,11 @@
                        //门口机的点击事件
                        clickBtn.MouseUpEventHandler += (sender, e) =>
                        {
                            var flVideo = clickBtn.Tag as VideoMethod.FlVideo;
                    var flVideo = clickBtn.Tag as FlVideo;
                            if (flVideo.devType == "100")
                            {
                                //门禁二维码固定有的
                                VideoSend.GetQRcode(this, FunctionList.List.videoIntercom, (tag, paw) =>
                        VideoSend.GetQRcode(this, videoClouds, (tag, paw) =>
                                        {
                                            if (tag)
                                            {
@@ -286,8 +279,8 @@
                                {
                                    ESVideoUUID = getUuid(flVideo.uuid),
                                    DeviceName = flVideo.aliasName,
                                    roomno = FunctionList.List.videoIntercom.flRoomId,
                                    unitno = FunctionList.List.videoIntercom.flBuildingId,
                            roomno = videoClouds.flRoomId,
                            unitno = videoClouds.flBuildingId,
                                };
                                ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo);
                            }
@@ -295,9 +288,8 @@
                        };
                    }
                });
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 第二个界面
@@ -305,13 +297,9 @@
        /// <param name="view2">父控件</param>
        /// <param name="listCall">通话记录列表</param>
        /// <param name="video">当前的可视对讲</param>
        void View2(FrameLayout view2)
        void View2(FrameLayout view2, List<CallView> listCall, VideoClouds video)
        {
            new System.Threading.Thread(() =>
            {
                var listCall = new HDL_ON.UI.UI2.FuntionControlView.Video.VideoMethod().getCall(FunctionList.List.videoIntercom.id);
                Application.RunOnMainThread(() =>
                {
                    var bjFl = new FrameLayout
                    {
                        Y = Application.GetRealHeight(24),
@@ -363,15 +351,13 @@
                    vv.BeginHeaderRefreshingAction += () =>
                    {
                        VideoMethod videoMethod = new VideoMethod();
                        var list = videoMethod.getCall(FunctionList.List.videoIntercom.id);
                var list = videoMethod.GetCall(video.id);
                        RefreshView(vv, list);
                        //关闭刷新View;
                        vv.EndHeaderRefreshing();
                    };
                    //RefreshView(vv, listCall);
                });
            })
            { IsBackground = true }.Start();
            RefreshView(vv, listCall);
        }
        /// <summary>
        /// 通话记录刷新界面