| | |
| | | /// <summary>
|
| | | /// 画面关闭
|
| | | /// </summary> |
| | | public virtual void CloseForm() |
| | | public void CloseForm() |
| | | {
|
| | | //Log出力
|
| | | HdlLogLogic.Current.WriteLog(1, this.FormID + " 界面关闭");
|
| | | try
|
| | | {
|
| | | //移除接受在线状态推送
|
| | | this.RemoveGatewayOnlinePush();
|
| | | //移除设备属性变更推送
|
| | | this.RemoveDeviceAttributePush();
|
| | |
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | | //画面关闭之前
|
| | | this.CloseFormBefore();
|
| | |
|
| | | //调用的是Base的移除控件函数
|
| | | //而不是调用this的移除控件函
|
| | |
| | |
|
| | | //从列表中移除(防止画面二重添加)
|
| | | UserCenterLogic.RemoveActionForm(this);
|
| | |
|
| | | //画面关闭之后
|
| | | this.CloseFormAfter();
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | #endregion
|
| | |
|
| | | #region ■ 网关在线状态推送___________________ |
| | |
|
| | | /// <summary>
|
| | | /// 设置网关接受在线状态推送
|
| | | /// </summary> |
| | | public void AddGatewayOnlinePush()
|
| | | {
|
| | | for (int i = 0; i < UserCenterResourse.listGatewayOnlinePushForm.Count; i++)
|
| | | {
|
| | | if (this.FormID == UserCenterResourse.listGatewayOnlinePushForm[i].FormID)
|
| | | {
|
| | | //已经存在,则不再添加
|
| | | return;
|
| | | }
|
| | | }
|
| | | UserCenterResourse.listGatewayOnlinePushForm.Add(this);
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 移除网关接受在线状态推送
|
| | | /// </summary> |
| | | private void RemoveGatewayOnlinePush()
|
| | | {
|
| | | UserCenterResourse.listGatewayOnlinePushForm.RemoveAll((obj) => { return obj.FormID == this.FormID; });
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 网关在线状态变更推送(只有在变更的时候才会推送)
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | #endregion |
| | |
|
| | | #region ■ 设备属性变更推送___________________ |
| | |
|
| | | /// <summary>
|
| | | /// 设置接受设备属性变更推送
|
| | | /// </summary> |
| | | public void AddDeviceAttributePush()
|
| | | {
|
| | | for (int i = 0; i < UserCenterResourse.listDeviceAttributePushForm.Count; i++)
|
| | | {
|
| | | if (this.FormID == UserCenterResourse.listDeviceAttributePushForm[i].FormID)
|
| | | {
|
| | | //已经存在,则不再添加
|
| | | return;
|
| | | }
|
| | | }
|
| | | UserCenterResourse.listDeviceAttributePushForm.Add(this);
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 移除设备属性变更推送
|
| | | /// </summary> |
| | | private void RemoveDeviceAttributePush()
|
| | | {
|
| | | UserCenterResourse.listDeviceAttributePushForm.RemoveAll((obj) => { return obj.FormID == this.FormID; });
|
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 设备属性变更推送(只有在变更的时候才会推送)
|
| | | /// </summary>
|
| | | /// <param name="device">设备对象</param> |
| | | public virtual void DeviceAttributePush(ZigBee.Device.CommonDevice device)
|
| | | {
|
| | | } |
| | | |
| | | #endregion |
| | |
|
| | | #region ■ 圆形进度条_________________________ |