| | |
| | | /// </summary>
|
| | | public Action SettionFinishEvent = null;
|
| | | /// <summary>
|
| | | /// 左右翻页的控件的事件
|
| | | /// </summary>
|
| | | public Action<int> PageChangeEvent = null;
|
| | | /// <summary>
|
| | | /// 左右整个翻页的控件
|
| | | /// </summary>
|
| | | private PageLayout pageLayout = null;
|
| | |
| | | {
|
| | | //设置底部两个按钮的状态
|
| | | this.SetBottomTwoButtonStatu();
|
| | | this.PageChangeEvent?.Invoke(index);
|
| | | };
|
| | |
|
| | | //初始化第一个索引的桌布
|
| | |
| | | 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);
|
| | |
| | | this.pageLayout.PageIndex = 1;
|
| | | //设置底部两个按钮的状态
|
| | | this.SetBottomTwoButtonStatu();
|
| | | if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false)
|
| | | {
|
| | | this.pageLayout.ScrollEnabled = true;
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | |
| | |
|
| | | #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>
|
| | | /// 添加头部【设置】的图标
|
| | |
| | | /// <param name="btnHigherDeviceName">上一级界面的设备名字控件(原来on的框架太坑)</param>
|
| | | private void AddTopSettingIcon(Button btnHigherDeviceName, Button btnHigherRoom)
|
| | | {
|
| | | //如果是成员没有功能
|
| | | if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //设置图标
|
| | | //设置图标(门锁界面需要借用这个图标的X轴和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, () =>
|