From cb6e11c5067ecaba4d8f9907989154167c1e8943 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 09 六月 2021 17:15:05 +0800 Subject: [PATCH] Merge branch 'wxr4' into dev-tzy --- HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs | 68 +++++++++++++++++++++++++++++---- 1 files changed, 59 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs old mode 100755 new mode 100644 index a09506a..3608632 --- a/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs +++ b/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs @@ -23,6 +23,10 @@ /// </summary> public Action SettionFinishEvent = null; /// <summary> + /// 宸﹀彸缈婚〉鐨勬帶浠剁殑浜嬩欢 + /// </summary> + public Action<int> PageChangeEvent = null; + /// <summary> /// 宸﹀彸鏁翠釜缈婚〉鐨勬帶浠� /// </summary> private PageLayout pageLayout = null; @@ -51,7 +55,10 @@ /// </summary> public NormalFrameLayout FrameWhiteCentet2 = null; - + /// <summary> + /// 鏄惁鏄剧ず鏀惰棌鎸夐挳 + /// </summary> + public bool ShowColltionButton = true; #endregion #region 鈻� 鍒濆鍖朹____________________________ @@ -92,6 +99,7 @@ { //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + this.PageChangeEvent?.Invoke(index); }; //鍒濆鍖栫涓�涓储寮曠殑妗屽竷 @@ -137,8 +145,7 @@ btnRoomName.Text = device.GetRoomListName(); btnRoomName.Width = btnRoomName.GetRealWidthByText(); FrameWhiteCentet1.AddChidren(btnRoomName); - //鎴愬憳娌℃湁鏀惰棌鍔熻兘 - if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare == false) + if (ShowColltionButton) { var btnCollection = new IconViewControl(40); btnCollection.X = Application.GetRealWidth(273); @@ -210,6 +217,10 @@ this.pageLayout.PageIndex = 0; //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false) + { + this.pageLayout.ScrollEnabled = true; + } }; this.btnBottomTwo = new NormalViewControl(14, 6, true); btnBottomTwo.X = btnBottomOne.Right + Application.GetRealWidth(8); @@ -222,6 +233,10 @@ this.pageLayout.PageIndex = 1; //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false) + { + this.pageLayout.ScrollEnabled = true; + } }; } @@ -246,7 +261,40 @@ #endregion + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + + this.SettionFinishEvent = null; + this.PageChangeEvent = null; + } + + #endregion + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鑾峰彇澶撮儴鍙宠竟鐨勩�愯缃�戝浘鏍囨帶浠� + /// </summary> + /// <returns></returns> + public PicViewControl GetTopSettingIcon() + { + for (int i = 0; i < topFrameLayout.ChildrenCount; i++) + { + var myView = topFrameLayout.GetChildren(i); + if (myView == null || myView.Name != "btnSetting") + { + continue; + } + return myView as PicViewControl; + } + return null; + } /// <summary> /// 娣诲姞澶撮儴銆愯缃�戠殑鍥炬爣 @@ -255,18 +303,20 @@ /// <param name="btnHigherDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢(鍘熸潵on鐨勬鏋跺お鍧�)</param> private void AddTopSettingIcon(Button btnHigherDeviceName, Button btnHigherRoom) { - //濡傛灉鏄垚鍛樻病鏈夊姛鑳� - if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare == true) - { - return; - } - //璁剧疆鍥炬爣 + //璁剧疆鍥炬爣(闂ㄩ攣鐣岄潰闇�瑕佸�熺敤杩欎釜鍥炬爣鐨刋杞村拰Y杞�,鎵�浠ュ姞杩涙潵) var btnSetting = new PicViewControl(28, 28); btnSetting.X = Application.GetRealWidth(337); btnSetting.Y = Application.GetRealHeight(9); btnSetting.UnSelectedImagePath = "Public/FuncInfoSetIcon.png"; + btnSetting.Name = "btnSetting"; topFrameLayout.AddChidren(btnSetting); + //濡傛灉鏄垚鍛樻病鏈夊姛鑳� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) + { + btnSetting.Visible = false; + } + btnSetting.ButtonClickEvent += (sender, e) => { var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => -- Gitblit v1.8.0