From 355bf4219bcd33f2178ed3b1aa54e0af71905fdf Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 19 三月 2021 09:44:27 +0800
Subject: [PATCH] Merge branch 'WJC' into temp-wxr

---
 HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs |  340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 340 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
new file mode 100644
index 0000000..f49dd0e
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs
@@ -0,0 +1,340 @@
+锘縰sing System;
+using HDL_ON.UI.Music;
+using Shared;
+namespace HDL_ON.UI.UI2.FuntionControlView.Video
+{
+    public class MainView : FrameLayout
+    {
+        public void Show()
+        {
+
+            this.BackgroundColor = MusicColor.ViewColor;
+            var topView = new TopView();
+            this.AddChidren(topView.TopFLayoutView());
+            topView.topNameBtn.Text = "鍙瀵硅";
+            topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                RemoveFromParent();
+            };
+
+            var pageView = new PageLayout()
+            {
+                Y = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(667 - 64),
+                IsShowPoint = false,
+            };
+            this.AddChidren(pageView);
+            var view1 = new FrameLayout();
+            pageView.AddChidren(view1);
+            var view2 = new FrameLayout();
+            pageView.AddChidren(view2);
+            View1(view1);
+            View2(view2);
+            Button btn11 = new Button
+            {
+                X = Application.GetRealWidth(170),
+                Y = Application.GetRealHeight(578),
+                Width = Application.GetRealWidth(14),
+                Height = Application.GetRealHeight(6),
+                BackgroundColor = MusicColor.SelectedColor,
+                Radius = (uint)Application.GetRealHeight(4),
+            };
+            view1.AddChidren(btn11);
+
+            Button btn12 = new Button
+            {
+                X = Application.GetRealWidth(192),
+                Y = Application.GetRealHeight(578),
+                Width = Application.GetRealWidth(14),
+                Height = Application.GetRealHeight(6),
+                BackgroundColor = 0x404484F4,
+                Radius = (uint)Application.GetRealHeight(4),
+            };
+            view1.AddChidren(btn12);
+            Button btn21 = new Button
+            {
+                X = Application.GetRealWidth(170),
+                Y = Application.GetRealHeight(578),
+                Width = Application.GetRealWidth(14),
+                Height = Application.GetRealHeight(6),
+                BackgroundColor = 0x404484F4,
+                Radius = (uint)Application.GetRealHeight(4),
+            };
+            view2.AddChidren(btn21);
+
+            Button btn22 = new Button
+            {
+                X = Application.GetRealWidth(192),
+                Y = Application.GetRealHeight(578),
+                Width = Application.GetRealWidth(14),
+                Height = Application.GetRealHeight(6),
+                BackgroundColor = MusicColor.SelectedColor,
+                Radius = (uint)Application.GetRealHeight(4),
+            };
+            view2.AddChidren(btn22);
+
+            pageView.PageChange = (sender, e) =>
+            {
+
+                if (pageView.PageIndex == 0)
+                {
+                    topView.topNameBtn.Text = "鍙瀵硅";
+                }
+                else
+                {
+                    topView.topNameBtn.Text = "閫氳瘽璁板綍";
+
+                }
+            };
+        }
+        /// <summary>
+        /// 绗竴涓晫闈�
+        /// </summary>
+        /// <param name="view1">鐖舵帶浠�</param>
+        void View1(FrameLayout view1)
+        {
+        
+            var bjFl = new FrameLayout
+            {
+                Y = Application.GetRealHeight(24),
+                X = Application.GetRealWidth(24),
+                Height = Application.GetRealHeight(526),
+                Width = Application.GetRealWidth(327),
+                BackgroundImagePath = "MusicIcon/playBj.png",
+            };
+            view1.AddChidren(bjFl);
+            /// <summary>
+            ///  姹夊瓧
+            /// </summary>
+            Button nameBtn = new Button
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(16),
+                Width = Application.GetRealWidth(100),
+                Height = Application.GetRealHeight(33),
+                TextColor = MusicColor.MusicTxet14Color,
+                TextSize = TextSize.Text24,
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = "鍙瀵硅",
+            };
+            bjFl.AddChidren(nameBtn);
+            /// <summary>
+            ///  鍖哄煙鍚嶇О
+            /// </summary>
+            Button regionBtn = new Button
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(53),
+                Width = Application.GetRealWidth(270),
+                Height = Application.GetRealHeight(17),
+                TextColor = MusicColor.MusicNoTxetColor,
+                TextSize = TextSize.Text12,
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = "123456"
+            };
+            bjFl.AddChidren(regionBtn);
+            /// <summary>
+            ///鏀惰棌鍥炬爣
+            /// </summary>
+            Button collectIconBtn = new Button
+            {
+                X = Application.GetRealWidth(273),
+                Y = Application.GetRealHeight(14),
+                Width = Application.GetRealWidth(40),
+                Height = Application.GetRealWidth(40),
+                UnSelectedImagePath = "MusicIcon/collect.png",
+                SelectedImagePath = "MusicIcon/collectSelected.png",
+            };
+            bjFl.AddChidren(collectIconBtn);
+
+            Button intercomBtnIcon = new Button
+            {
+                X = Application.GetRealWidth(84),
+                Y = Application.GetRealHeight(118),
+                Width = Application.GetRealWidth(160),
+                Height = Application.GetRealWidth(160),
+                UnSelectedImagePath = "VideoIcon/keshiduijiang.png",
+
+            };
+            bjFl.AddChidren(intercomBtnIcon);
+
+            var vv = new VerticalScrolViewLayout {
+                Y = Application.GetRealHeight(306),
+                Height = Application.GetRealHeight(220),
+                Width = Application.GetRealWidth(327),
+            };
+            bjFl.AddChidren(vv);
+            //鏁扮粍涓暟
+            int value = 15;
+            //鍏堣绠楁暟鎹墍闇�瑕佺殑寰堥珮搴︼紱
+            int l = 0;
+            if (value % 3 == 0)
+            {
+                l = value / 3;
+            }
+            else
+            {
+
+                l = (value / 3) + 1;
+            }
+            var fL = new FrameLayout
+            {
+                Height = Application.GetRealHeight((48 + 24) * l),
+
+            };
+            vv.AddChidren(fL);
+            int line = 0;
+            for (int i = 1, j = 0; i <= value; i++, j++)
+            {
+                var fLayout = new FrameLayout
+                {
+                    Width = Application.GetRealWidth(50),
+                    Height = Application.GetRealWidth(48),
+                    X = Application.GetRealWidth(31 + (58 + 50) * j),
+                    Y = Application.GetRealHeight(20 + (48 + 24) * line),
+
+                };
+                fL.AddChidren(fLayout);
+
+                var iconBtn = new Button
+                {
+                    X = Application.GetRealWidth(11),
+                    Width = Application.GetRealWidth(28),
+                    Height = Application.GetRealWidth(28),
+                    UnSelectedImagePath = "VideoIcon/weiqiangji.png",
+                };
+                fLayout.AddChidren(iconBtn);
+
+                var iconNameBtn = new Button
+                {
+                    Y = iconBtn.Bottom + Application.GetRealHeight(6),
+                    Width = Application.GetRealWidth(50),
+                    Height = Application.GetRealHeight(14),
+                    TextSize = TextSize.Text10,
+                    TextColor = CSS.CSS_Color.TextualColor,
+                    TextAlignment = TextAlignment.Center,
+                    Text="鏌ョ湅鍗曞厓鏈�"
+                };
+                fLayout.AddChidren(iconNameBtn);
+
+                var clickBtn = new Button { Tag = i };
+                fLayout.AddChidren(clickBtn);
+                if (i % 3 == 0)
+                {
+                    //婊′竴琛岄噸缃甹=0鍊�;
+                    j = -1;
+                    line += 1;
+                }
+                // GetIconAndText(i, deviceIconBtn, iconNameBtn);
+                clickBtn.MouseUpEventHandler += (sender, e) =>
+                {
+
+                    ////1=绌鸿皟;2=鐢佃;3=椋庢墖;4=鏈洪《鐩�;5=DVD/EVD/VCD;6=鎶曞奖浠�;7=鑷畾涔�;
+                    //int if_value = int.Parse(clickBtn.Tag.ToString());
+                    //if (if_value == 7)
+                    //{
+                    //    Method method = new Method();
+                    //    method.AddControl(this, (control) =>
+                    //    {
+                    //        AddButton addButton = new AddButton();
+                    //        MainPage.BasePageView.AddChidren(addButton);
+                    //        addButton.Show(control);
+                    //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                    //    });
+                    //}
+                    //else
+                    //{
+                    //    if (DeviceTypeList.Count == 0)
+                    //    {
+                    //        GetDeviceTypeList(true, () =>
+                    //        {
+                    //            DeviceTypeViewClick(if_value);
+
+                    //        });
+                    //    }
+                    //    else
+                    //    {
+                    //        DeviceTypeViewClick(if_value);
+                    //    }
+                    //}
+                };
+            }
+
+
+        }
+        /// <summary>
+        /// 绗簩涓晫闈�
+        /// </summary>
+        /// <param name="view2">鐖舵帶浠�</param>
+        void View2(FrameLayout view2)
+        {
+            
+            var bjFl = new FrameLayout
+            {
+                Y = Application.GetRealHeight(24),
+                X = Application.GetRealWidth(24),
+                Height = Application.GetRealHeight(526),
+                Width = Application.GetRealWidth(327),
+                BackgroundImagePath = "MusicIcon/playBj.png",
+            };
+            view2.AddChidren(bjFl);
+            /// <summary>
+            ///  姹夊瓧
+            /// </summary>
+            Button nameBtn = new Button
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(16),
+                Width = Application.GetRealWidth(100),
+                Height = Application.GetRealHeight(33),
+                TextColor = MusicColor.MusicTxet14Color,
+                TextSize = TextSize.Text24,
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = "閫氳瘽璁板綍",
+            };
+            bjFl.AddChidren(nameBtn);
+            /// <summary>
+            ///  浜戠鐓х墖鍙繚鐣�30澶�
+            /// </summary>
+            Button regionBtn = new Button
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(53),
+                Width = Application.GetRealWidth(270),
+                Height = Application.GetRealHeight(17),
+                TextColor = MusicColor.SelectedColor,
+                TextSize = TextSize.Text12,
+                TextAlignment = TextAlignment.CenterLeft,
+                Text = "*浜戠鐓х墖鍙繚鐣�30澶�"
+            };
+            bjFl.AddChidren(regionBtn);
+
+            var vv = new VerticalScrolViewLayout
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealHeight(58),
+                Height = Application.GetRealHeight(458),
+                Width = Application.GetRealWidth(295),
+            };
+            bjFl.AddChidren(vv);
+            for (int i = 0; i < 6; i++)
+            {
+
+                if (i == 0|| i == 2)
+                {
+                    View.FrameLayout50 frameLayout50 = new View.FrameLayout50();
+                    vv.AddChidren(frameLayout50.FLayoutView());
+                }
+                else
+                {
+                    View.FrameLayout60 frameLayout60 = new View.FrameLayout60();
+                    vv.AddChidren(frameLayout60.FLayoutView());
+                }
+            }
+
+        }
+
+       
+    }
+
+}

--
Gitblit v1.8.0