From 0fa1534827bd21d763216550d11006fc1441c6cb Mon Sep 17 00:00:00 2001 From: tzy <hxb@hdlchina.com.cn> Date: 星期五, 14 五月 2021 17:08:45 +0800 Subject: [PATCH] 门锁初始上传 --- HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 54 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs index 9407e12..e2d1475 100644 --- 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; @@ -95,6 +99,7 @@ { //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + this.PageChangeEvent?.Invoke(index); }; //鍒濆鍖栫涓�涓储寮曠殑妗屽竷 @@ -213,6 +218,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); @@ -225,6 +234,10 @@ this.pageLayout.PageIndex = 1; //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false) + { + this.pageLayout.ScrollEnabled = true; + } }; } @@ -249,7 +262,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> /// 娣诲姞澶撮儴銆愯缃�戠殑鍥炬爣 @@ -258,18 +304,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.IsOthreShare == true) + { + btnSetting.Visible = false; + } + btnSetting.ButtonClickEvent += (sender, e) => { var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => -- Gitblit v1.8.0