From da22725d616af0f3081670c76195eaf57794bc29 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 18 五月 2022 16:03:33 +0800
Subject: [PATCH] Merge branch 'dev-CQY' into dev 1.调整全视通与自研的逻辑 2.增加获取可视对讲第三方账号接口

---
 HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs |  147 +++++++++++++++++++-----------------------------
 1 files changed, 58 insertions(+), 89 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
index 0f9942c..c2cfd0b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -38,7 +38,9 @@
             var view1 = new FrameLayout();
             pageView.AddChidren(view1);
             var view2 = new FrameLayout();
-            pageView.AddChidren(view2);
+            if (!Entity.DB_ResidenceData.Instance.SupportFVDevice) {//闈炲叏瑙嗛�氬睍绀洪�氳瘽璁板綍
+                pageView.AddChidren(view2);
+            }
             View1(view1, videoList);
             View2(view2, listCall, videoList);
             Button btn11 = new Button
@@ -50,7 +52,7 @@
                 BackgroundColor = MusicColor.SelectedColor,
                 Radius = (uint)Application.GetRealHeight(4),
             };
-            view1.AddChidren(btn11);
+            //view1.AddChidren(btn11);
 
             Button btn12 = new Button
             {
@@ -61,7 +63,13 @@
                 BackgroundColor = 0x404484F4,
                 Radius = (uint)Application.GetRealHeight(4),
             };
-            view1.AddChidren(btn12);
+            //view1.AddChidren(btn12);
+            if (!Entity.DB_ResidenceData.Instance.SupportFVDevice)
+            {//闈炲叏瑙嗛�氬睍绀轰笅鏂归�夋嫨鎸夐挳
+                view1.AddChidren(btn11);
+                view1.AddChidren(btn12);
+            }
+
             Button btn21 = new Button
             {
                 X = Application.GetRealWidth(170),
@@ -330,8 +338,10 @@
                             Lc_Psk = video.deviceId,//2021-10-15 PSK瀛楁涓嶈兘鍙杁eviceName
                             Lc_PlayToken = video.playToken,
                             deviceSipAccount = video.deviceSipAccount,
-                            HomeId = video.homeId
+                            HomeId = video.homeId,
+                            deviceCode=video.deviceCode
                         };
+                        
                         ESOnVideo.Current.ShowESVideoMonitor(eSVideoInfo, video.interphoneType);
                     }
                 };
@@ -631,7 +641,7 @@
             };
             contentView.AddChidren(listView);
 
-            if (ximoVideoList.Count == 1)
+            //if (ximoVideoList.Count == 1)
             {
                 Loading loading = new Loading();
                 contentView.AddChidren(loading);
@@ -649,11 +659,11 @@
                                 ImageView codeImage = new ImageView()
                                 {
                                     Gravity = Gravity.Center,
-                                    Height = Application.GetRealWidth(200),
-                                    Width = Application.GetRealWidth(200),
+                                    Height = Application.GetRealWidth(320),
+                                    Width = Application.GetRealWidth(320),
                                     ImageBytes = Scan.BytesFromText(pairs[0].qrcode, Application.GetRealWidth(200), Application.GetRealWidth(200)),
                                 };
-                                contentView.AddChidren(codeImage);
+                                dialogView.AddChidren(codeImage);
                             });
                         }
                     }
@@ -675,96 +685,55 @@
                 })
                 { IsBackground = true }.Start();
             }
-            else
-            {
+            //else
+            //{
 
-                foreach (var v in ximoVideoList)
-                {
-                    Button btnMsg = new Button()
-                    {
-                        Gravity = Gravity.CenterHorizontal,
-                        Height = Application.GetRealHeight(50),
-                        Width = Application.GetRealHeight(160),
-                        TextAlignment = TextAlignment.Center,
-                        TextColor = CSS_Color.TextualColor,
-                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                        Text = v.deviceName,
-                        Radius = (uint)Application.GetRealWidth(5),
-                        BackgroundColor = CSS_Color.DividingLineColor,
-                        IsMoreLines = true,
-                    };
-                    listView.AddChidren(btnMsg);
+            //    foreach (var v in ximoVideoList)
+            //    {
+            //        Button btnMsg = new Button()
+            //        {
+            //            Gravity = Gravity.CenterHorizontal,
+            //            Height = Application.GetRealHeight(50),
+            //            Width = Application.GetRealHeight(160),
+            //            TextAlignment = TextAlignment.Center,
+            //            TextColor = CSS_Color.TextualColor,
+            //            TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            //            Text = v.deviceName,
+            //            Radius = (uint)Application.GetRealWidth(5),
+            //            BackgroundColor = CSS_Color.DividingLineColor,
+            //            IsMoreLines = true,
+            //        };
+            //        listView.AddChidren(btnMsg);
 
-                    listView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
+            //        listView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
 
-                    btnMsg.MouseUpEventHandler = (sender, e) =>
-                    {
+            //        btnMsg.MouseUpEventHandler = (sender, e) =>
+            //        {
 
 
-                        if (v.spk == "door.gate")
-                        {
-                            Loading loading = new Loading();
-                            contentView.AddChidren(loading);
-                            loading.Start("");
-                            new System.Threading.Thread(() =>
-                            {
-                                try
-                                {
-                                    var pack = VideoSend.GetQRcode();
-                                    var pairs = Newtonsoft.Json.JsonConvert.DeserializeObject<List<AccessControlQRode>>(pack.Data.ToString());
-                                    if (pairs.Count > 0)
-                                    {
-                                        Application.RunOnMainThread(() =>
-                                        {
-                                            ImageView codeImage = new ImageView()
-                                            {
-                                                Gravity = Gravity.Center,
-                                                Height = Application.GetRealWidth(200),
-                                                Width = Application.GetRealWidth(200),
-                                                ImageBytes = Scan.BytesFromText(pairs[0].qrcode, Application.GetRealWidth(200), Application.GetRealWidth(200)),
-                                            };
-                                            contentView.AddChidren(codeImage);
-                                        });
-                                    }
-                                }
-                                catch (Exception ex)
-                                {
-                                    MainPage.Log($"鑾峰彇闂ㄧ浜岀淮鐮佸紓甯革細{ex.Message}");
-                                }
-                                finally
-                                {
-                                    Application.RunOnMainThread(() =>
-                                    {
-                                        if (loading != null)
-                                        {
-                                            loading.Hide();
-                                            loading.RemoveFromParent();
-                                        }
-                                    });
-                                }
-                            })
-                            { IsBackground = true }.Start();
-                            return;
-                        }
+            //            if (v.spk == "door.gate")
+            //            {
+                          
+            //                return;
+            //            }
 
-                        //闂ㄧ浜岀淮鐮佸浐瀹氭湁鐨�
-                        VideoSend.GetQRcode(this, v, (tag, paw) =>
-                        {
-                            if (tag)
-                            {
-                            //娉ㄦ剰锛氬瘑鐮佹湁鍙兘寤舵椂1鍒嗛挓鐢熸晥
-                            View.ShowDialog showDialog = new View.ShowDialog();
-                                showDialog.QRcode(paw);
-                            }
-                        });
-                        dialog.Close();
-                    };
-                }
-            }
+            //            //闂ㄧ浜岀淮鐮佸浐瀹氭湁鐨�
+            //            VideoSend.GetQRcode(this, v, (tag, paw) =>
+            //            {
+            //                if (tag)
+            //                {
+            //                //娉ㄦ剰锛氬瘑鐮佹湁鍙兘寤舵椂1鍒嗛挓鐢熸晥
+            //                View.ShowDialog showDialog = new View.ShowDialog();
+            //                    showDialog.QRcode(paw);
+            //                }
+            //            });
+            //            dialog.Close();
+            //        };
+            //    }
+            //}
             dialog.Show();
 
         }
-
 
         /// <summary>
         /// 閫夋嫨寰樺緤鎶ヨ鍒楄〃鏄剧ず

--
Gitblit v1.8.0