From d72ca686a3e262693f8a6e45e747e8e8da43335b Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 06 七月 2021 09:39:03 +0800 Subject: [PATCH] 2021-07-06 1.更新 --- HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 1 deletions(-) diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs index dd40fac..8b74ab9 100644 --- a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs @@ -147,7 +147,8 @@ /// 璁惧鐘舵�佹洿鏂版帹閫� /// </summary> /// <param name="i_LocalDevice">鏈湴璁惧瀵硅薄</param> - public void DeviceStatuPush(Entity.Function i_LocalDevice) + /// <param name="refreshCardContr">鏄惁鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩殑鐘舵��,榛樿涓嶅埛鏂�(姝ゅ彉閲忕洰鍓嶆槸缁檅us鎺ユ敹閭i噷浣跨敤鐨�)</param> + public void DeviceStatuPush(Entity.Function i_LocalDevice, bool refreshCardContr = false) { HdlThreadLogic.Current.RunMain(() => { @@ -155,14 +156,66 @@ { this.ListActionForm[i]?.DeviceStatuPush(i_LocalDevice); } + if (refreshCardContr == true) + { + //鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩姸鎬� + this.RefreshAllDeviceCardControl(i_LocalDevice); + } + }, ShowErrorMode.NO); } #endregion + #region 鈻� 鎵嬪姩鍒锋柊鍚勮澶囧崱鐗嘷________________ + + /// <summary> + /// 鎵嬪姩鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩姸鎬� + /// </summary> + /// <param name="i_device">闇�瑕佸埛鏂扮殑璁惧瀵硅薄</param> + public void RefreshAllDeviceCardControl(Entity.Function i_device) + { + //鍒锋柊涓婚〉 + UI.HomePage.UpdataFunctionStates(i_device); + //鍒锋柊鍒嗙被 + UI.ClassificationPage.UpdataInfo(i_device); + //鍒锋柊鎴块棿 + UI.RoomPage.UpdataStates(i_device); + //鍒锋柊鍔熻兘 + UI.FunctionPage.UpdataStates(i_device); + } + + #endregion + #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> + /// 鍏抽棴鎵�鏈夋墦寮�浜嗙殑鐣岄潰 + /// </summary> + /// <param name="tagetFrom">鐩爣鐣岄潰,濡傛灉鎸囧畾浜嗙殑璇�,鍒欏叧闂洰鏍囩晫闈笂灞傜殑鍏ㄩ儴鐣岄潰(瀹冭嚜韬笉鍏抽棴)</param> + public void CloseAllOpenForm(string tagetFrom = null) + { + //鏈�鍚庝竴涓槸瑁呰浇涓婚〉鐨勫鍣�,鎵�浠ヤ笉鑳藉垹闄� + while (MainPage.BasePageView.ChildrenCount > 1) + { + var view = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1); + if (view is CommonFormBase) + { + if (((CommonFormBase)view).FormID == tagetFrom) + { + //鍙叧闂埌鎸囧畾鐩爣鐣岄潰 + return; + } + ((CommonFormBase)view).CloseForm(); + } + else + { + view.RemoveFromParent(); + } + } + } + + /// <summary> /// 鑾峰彇褰撳墠姝e湪婵�娲荤殑鐣岄潰 /// </summary> /// <returns></returns> -- Gitblit v1.8.0