From 002bb6950a15e703e2ad6ef7b2b4c5d80c4ee64b Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 22 三月 2021 17:56:07 +0800 Subject: [PATCH] 2021-3-22-2 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs index 8f38cfb..0be0bba 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs @@ -14,7 +14,11 @@ /// <summary> /// 鍥炶皟 /// </summary> - public Action BackAction; + public static Action BackAction; + /// <summary> + /// + /// </summary> + Button addDevice; /// <summary> /// 涓存椂鍌ㄥ瓨璁惧绫诲瀷鍒楄〃 /// </summary> @@ -26,9 +30,12 @@ topView.topNameBtn.TextID = StringId.hongwaiyaokong; topView.topIconBtn.Visible = true; this.AddChidren(topView.FLayoutView()); - topView.clickBackBtn.MouseUpEventHandler += (sender, e) => { + topView.clickBackBtn.MouseUpEventHandler += (sender, e) => + { BackAction(); - this.RemoveFromParent(); }; + BackAction = null; + this.RemoveFromParent(); + }; FrameLayout middFLayout = new FrameLayout(); middFLayout.Y = Application.GetRealHeight(64); @@ -38,19 +45,22 @@ VerticalRefreshLayout vv = new VerticalRefreshLayout(); middFLayout.AddChidren(vv); //鍔犲彿鍥炬爣 - Button addDevice = new Button + addDevice = new Button { Y = Application.GetRealHeight(480), X = Application.GetRealWidth(293), Width = Application.GetRealWidth(82), Height = Application.GetRealWidth(84), UnSelectedImagePath = "PirIcon/add.png", - }; + Visible=false, + }; + middFLayout.AddChidren(addDevice); if (Pir.currPir.FunctioList.Count < 10) { //10涓仴鎺у櫒灏变細闅愯棌娣诲姞鍥炬爣 - middFLayout.AddChidren(addDevice); + // middFLayout.AddChidren(addDevice); + addDevice.Visible = true; } vv.BeginHeaderRefreshingAction += () => @@ -77,7 +87,7 @@ MainPage.BasePageView.AddChidren(setPir); setPir.Show(() => { - BackAction(); + //BackAction(); ////鍒锋柊鐣岄潰 UIView(vv); }); @@ -267,7 +277,12 @@ Pir.currPir.FunctioList.Remove(Function); } UIView(vv); - + if (Pir.currPir.FunctioList.Count < 10) + { + //10涓仴鎺у櫒灏变細闅愯棌娣诲姞鍥炬爣 + // middFLayout.AddChidren(addDevice); + addDevice.Visible = true; + } }, "鍒犻櫎", "dialog", null, dialog); }, () => { }, false); -- Gitblit v1.8.0