From 15066d818e8bafb36405e549328a37918a6a4be3 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 17 五月 2022 09:08:21 +0800
Subject: [PATCH] 环境传感器等级

---
 HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs |  129 ++++++++++++++----------------------------
 1 files changed, 44 insertions(+), 85 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
index 0f9942c..60179d5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -631,7 +631,7 @@
             };
             contentView.AddChidren(listView);
 
-            if (ximoVideoList.Count == 1)
+            //if (ximoVideoList.Count == 1)
             {
                 Loading loading = new Loading();
                 contentView.AddChidren(loading);
@@ -649,11 +649,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 +675,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