| | |
| | | { |
| | | public class FunctionSetting : DoorLockCommonLayout, ZigBee.Common.IStatus |
| | | { |
| | | #region ◆ 构造函数__________________________ |
| | | #region 构造函数 |
| | | /// <summary> |
| | | /// 构造函数 |
| | | /// </summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | #region 变量申明 |
| | | public ZigBee.Device.DoorLock doorLock = null; |
| | | /// <summary> |
| | | /// 设备需要保存的设备名字 |
| | |
| | | FrameLayout bottomFrameLayout; |
| | | #endregion |
| | | |
| | | #region ◆ UI显示 __________________________ |
| | | #region UI显示 |
| | | /// <summary>
|
| | | /// UI显示
|
| | | /// </summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 中部显示 __________________________ |
| | | #region 中部显示 |
| | | public void MidFrameLayoutContent() |
| | | { |
| | | var MidTopFrameLayout = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(449), |
| | | Y = Application.GetRealHeight(58), |
| | | Width = Application.GetRealWidth(184), |
| | | Height = Application.GetRealHeight(184), |
| | | BackgroundImagePath = "DoorLock/DoorlockPicture.png", |
| | | }; |
| | | this.midFrameLayout.AddChidren(MidTopFrameLayout); |
| | | //图片 |
| | | var btnPic = new DeviceInfoIconControl(); |
| | | btnPic.Y = Application.GetRealHeight(92); |
| | | btnPic.Gravity = Gravity.CenterHorizontal; |
| | | this.midFrameLayout.AddChidren(btnPic); |
| | | btnPic.InitControl(doorLock); |
| | | |
| | | var btnDeviceText = new Button() |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 底部显示 __________________________ |
| | | #region 底部显示 |
| | | public void BottomFrameLayout() |
| | | { |
| | | #region UI |
| | |
| | | Y = Application.GetRealHeight(170), |
| | | }; |
| | | bottomFrameLayout.AddChidren(listview); |
| | | #endregion |
| | | #endregion |
| | | |
| | | FunctionDetail(doorLock); |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 功能显示 __________________________ |
| | | #region 功能显示 |
| | | void FunctionDetail(ZigBee.Device.DoorLock doorLock) |
| | | { |
| | | listview.RemoveAll(); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 添加全部菜单 |
| | | #region 添加全部菜单 |
| | | /// <summary> |
| | | /// 添加全部菜单 |
| | | /// </summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 设备重命名__________________________ |
| | | #region 设备重命名 |
| | | /// <summary> |
| | | /// 设备重命名 |
| | | /// </summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 行数超过容器时,补一个空白FrameLayout__________________________ |
| | | #region 行数超过容器时,补一个空白FrameLayout |
| | | /// <summary> |
| | | /// 行数超过容器时,补一个空白FrameLayout,使之能滑动 |
| | | /// </summary> |
| | | void FinishInitControl(FrameLayout bodyFrameLayout, VerticalListControl listview) |
| | | { |
| | | var btnFinish = new BottomClickButton(); |
| | | btnFinish.Y = Application.GetRealHeight(1054); |
| | | if (listview.ChildrenCount > 0) |
| | | { |
| | | var realHeight = listview.GetChildren(0).Height * listview.ChildrenCount; |
| | | |
| | | if (bodyFrameLayout.Height - btnFinish.Y + realHeight > listview.Height) |
| | | if (bodyFrameLayout.Height - Application.GetRealHeight(1054) + realHeight > listview.Height) |
| | | { |
| | | //促使被挡住的菜单能够向上滑动 |
| | | var frameTemp = new FrameLayout(); |
| | | frameTemp.Height = bodyFrameLayout.Height - btnFinish.Y + Application.GetRealHeight(115); |
| | | frameTemp.Height = bodyFrameLayout.Height - Application.GetRealHeight(1054) + Application.GetRealHeight(115); |
| | | listview.AddChidren(frameTemp); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ◆ 接口实现__________________________ |
| | | #region 接口实现 |
| | | /// <summary> |
| | | /// 处理变化事件 --将弃用 改用DeviceInfoChange() |
| | | /// </summary> |