From 4a83749337096aae6dd5ec4f44f16653fbc7268a Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 10 三月 2021 16:19:52 +0800 Subject: [PATCH] 2021-03-10 1.合并 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs | 41 ++++++++++++++++++++++++++++------------- 1 files changed, 28 insertions(+), 13 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs index 5a50897..ac1b20d 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs @@ -4,13 +4,14 @@ using Shared; namespace HDL_ON.UI.UI2.PersonalCenter.PirDevice { - public class AddControlComplete:FrameLayout + public class AddControlComplete : FrameLayout { public AddControlComplete() { Tag = "Pir"; } - public void Show(Control control) { + public void Show(Control control, bool bool_library) + { #region 鐣岄潰甯冨眬 this.BackgroundColor = CSS.CSS_Color.viewMiddle; PirDevice.View.TopView topView = new View.TopView(); @@ -18,16 +19,16 @@ this.AddChidren(topView.FLayoutView()); topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { this.RemoveFromParent(); }; - FrameLayout fLayout = new FrameLayout + FrameLayout fLayout = new FrameLayout { - Y =Application.GetRealHeight(64), + Y = Application.GetRealHeight(64), BackgroundColor = CSS.CSS_Color.textWhiteColor, Height = Application.GetRealHeight(224), Width = Application.GetRealWidth(375), }; this.AddChidren(fLayout); // - Button iconBtn = new Button + Button iconBtn = new Button { Y = Application.GetRealHeight(28), X = Application.GetRealWidth(137), @@ -40,7 +41,7 @@ //娣诲姞鎴愬姛 Button text1Btn = new Button { - Width = Application.GetRealWidth(375-32), + Width = Application.GetRealWidth(375 - 32), Height = Application.GetRealHeight(22), Y = Application.GetRealHeight(158), X = Application.GetRealWidth(16), @@ -65,7 +66,7 @@ fLayout.AddChidren(text2Btn); //鎵�灞炲垎绫� View.PatchView fenlei = new View.PatchView(); - fenlei.frameLayout.Y = fLayout.Bottom+ Application.GetRealHeight(8); + fenlei.frameLayout.Y = fLayout.Bottom + Application.GetRealHeight(8); this.AddChidren(fenlei.FLayoutView(false)); fenlei.btnText1.TextID = StringId.suoshufenlei; fenlei.btnText2.TextID = StringId.dianqi; @@ -87,7 +88,7 @@ { Y = quyuPatchView.frameLayout.Bottom + Application.GetRealHeight(125), X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(375-32), + Width = Application.GetRealWidth(375 - 32), Height = Application.GetRealHeight(20), TextID = StringId.jixutianjia, TextSize = TextSize.text14, @@ -102,16 +103,30 @@ #endregion #region 鐣岄潰鐐瑰嚮浜嬩欢 //閬ユ帶鍣ㄥ悕绉扮偣鍑讳簨浠� - namePatchView.btnClick.MouseUpEventHandler += (sender,e) => { }; + namePatchView.btnClick.MouseUpEventHandler += (sender, e) => { }; //鎵�灞炲尯鍩熺偣鍑讳簨浠� quyuPatchView.btnClick.MouseUpEventHandler += (sender, e) => { }; //缁х画娣诲姞鐐瑰嚮浜嬩欢 - addBtn.MouseUpEventHandler += (sender, e) => { - Method method = new Method(); - method.AddControl(); + addBtn.MouseUpEventHandler += (sender, e) => + { + if (bool_library) + { + this.RemoveFromParent(); + } + else + { + Method method = new Method(); + method.AddControl(this, (control1) => { + AddButton addButton = new AddButton(); + MainPage.BasePageView.AddChidren(addButton); + addButton.Show(control1); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }); + } }; //瀹屾垚鐐瑰嚮浜嬩欢 - saveView.btnClick.MouseUpEventHandler += (sender, e) => { + saveView.btnClick.MouseUpEventHandler += (sender, e) => + { MainPage.BasePageView.RemoveViewByTag("AddControl"); MainPage.BasePageView.RemoveViewByTag("Pir"); }; -- Gitblit v1.8.0