From 84fa7c9665d9bed9aef79237be9c5eb57c49f13d Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期五, 05 三月 2021 10:54:37 +0800
Subject: [PATCH] Merge branch 'CJL' into ez-test

---
 HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs |  121 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 121 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
new file mode 100644
index 0000000..5a50897
--- /dev/null
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs
@@ -0,0 +1,121 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
+using Shared;
+namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice
+{
+    public class AddControlComplete:FrameLayout
+    {
+        public AddControlComplete()
+        {
+            Tag = "Pir";
+        }
+        public void Show(Control control) {
+            #region 鐣岄潰甯冨眬
+            this.BackgroundColor = CSS.CSS_Color.viewMiddle;
+            PirDevice.View.TopView topView = new View.TopView();
+            topView.topNameBtn.TextID = StringId.tianjiayaokongqi;
+            this.AddChidren(topView.FLayoutView());
+            topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); };
+
+            FrameLayout fLayout = new FrameLayout 
+            {
+                Y =Application.GetRealHeight(64),
+                BackgroundColor = CSS.CSS_Color.textWhiteColor,
+                Height = Application.GetRealHeight(224),
+                Width = Application.GetRealWidth(375),
+            };
+            this.AddChidren(fLayout);
+            //
+            Button iconBtn = new Button 
+            {
+                Y = Application.GetRealHeight(28),
+                X = Application.GetRealWidth(137),
+                Width = Application.GetRealWidth(102),
+                Height = Application.GetRealWidth(102),
+                UnSelectedImagePath = "PirIcon/succeed.png",
+            };
+            fLayout.AddChidren(iconBtn);
+
+            //娣诲姞鎴愬姛
+            Button text1Btn = new Button
+            {
+                Width = Application.GetRealWidth(375-32),
+                Height = Application.GetRealHeight(22),
+                Y = Application.GetRealHeight(158),
+                X = Application.GetRealWidth(16),
+                TextID = StringId.tianjiachenggong,
+                TextSize = TextSize.text16,
+                TextColor = CSS.CSS_Color.btnSaveBackgroundColor,
+                TextAlignment = TextAlignment.Center,
+            };
+            fLayout.AddChidren(text1Btn);
+            //鍙埌鍒嗙被-鍔熻兘-鐢靛櫒鎿嶄綔浣跨敤
+            Button text2Btn = new Button
+            {
+                Width = Application.GetRealWidth(375 - 32),
+                Height = Application.GetRealHeight(22),
+                Y = Application.GetRealHeight(188),
+                X = Application.GetRealWidth(16),
+                TextID = StringId.kedaofenlei,
+                TextSize = TextSize.text14,
+                TextColor = CSS.CSS_Color.textTipColor,
+                TextAlignment = TextAlignment.Center,
+            };
+            fLayout.AddChidren(text2Btn);
+            //鎵�灞炲垎绫�
+            View.PatchView fenlei = new View.PatchView();
+            fenlei.frameLayout.Y = fLayout.Bottom+ Application.GetRealHeight(8);
+            this.AddChidren(fenlei.FLayoutView(false));
+            fenlei.btnText1.TextID = StringId.suoshufenlei;
+            fenlei.btnText2.TextID = StringId.dianqi;
+            //閬ユ帶鍣ㄥ悕绉�
+            View.PatchView namePatchView = new View.PatchView();
+            namePatchView.frameLayout.Y = fenlei.frameLayout.Bottom;
+            this.AddChidren(namePatchView.FLayoutView());
+            namePatchView.btnText1.TextID = StringId.yaokongqimingcheng;
+            namePatchView.btnText2.Text = control.name;
+            //鎵�灞炲尯鍩�
+            View.PatchView quyuPatchView = new View.PatchView();
+            quyuPatchView.frameLayout.Y = namePatchView.frameLayout.Bottom;
+            this.AddChidren(quyuPatchView.FLayoutView());
+            quyuPatchView.btnText1.TextID = StringId.suoshuquyu;
+            quyuPatchView.btnText2.TextID = StringId.dianqi;
+
+            //缁х画娣诲姞
+            Button addBtn = new Button
+            {
+                Y = quyuPatchView.frameLayout.Bottom + Application.GetRealHeight(125),
+                X = Application.GetRealWidth(16),
+                Width = Application.GetRealWidth(375-32),
+                Height = Application.GetRealHeight(20),
+                TextID = StringId.jixutianjia,
+                TextSize = TextSize.text14,
+                TextColor = CSS.CSS_Color.textConfirmColor,
+                TextAlignment = TextAlignment.Center,
+            };
+            this.AddChidren(addBtn);
+            //瀹屾垚
+            View.SaveView saveView = new View.SaveView();
+            this.AddChidren(saveView.FLayoutView());
+            saveView.frameLayout.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            #endregion
+            #region  鐣岄潰鐐瑰嚮浜嬩欢
+            //閬ユ帶鍣ㄥ悕绉扮偣鍑讳簨浠�
+            namePatchView.btnClick.MouseUpEventHandler += (sender,e) => { };
+            //鎵�灞炲尯鍩熺偣鍑讳簨浠�
+            quyuPatchView.btnClick.MouseUpEventHandler += (sender, e) => { };
+            //缁х画娣诲姞鐐瑰嚮浜嬩欢
+            addBtn.MouseUpEventHandler += (sender, e) => {
+                Method method = new Method();
+                method.AddControl();
+            };
+            //瀹屾垚鐐瑰嚮浜嬩欢
+            saveView.btnClick.MouseUpEventHandler += (sender, e) => {
+                MainPage.BasePageView.RemoveViewByTag("AddControl");
+                MainPage.BasePageView.RemoveViewByTag("Pir");
+            };
+            #endregion
+        }
+    }
+}

--
Gitblit v1.8.0