public CloseWindowEventArgs(bool success, string name, bool isDestroy, bool isRestart, TUIWindow win) { this.IsSuccess = success; this.WinName = name; this.IsDestroy = isDestroy; this.IsRestart = isRestart; this.UiWindow = win; }
/// <summary> /// 关闭指定窗口 /// </summary> /// <param name="winName"></param> public void CloseWindow(string winName) { if (this.mDicOpenWindows.ContainsKey(winName)) { TUIWindow tUIWindow = this.mDicOpenWindows[winName]; this.DoCloseWindow(winName, tUIWindow.DataCfg.IsDestroy); } else if (this.OnClosed != null) { this.OnClosed(new CloseWindowEventArgs(false, winName, false, false, null)); } }
/// <summary> /// 打开指定窗口 /// </summary> /// <param name="winName"></param> /// <param name="resCfg"></param> public void OpenWindow(string winName, WinResurceCfg resCfg) { TUIWindow tUIWindow = this.ReadyToShowWin(winName, resCfg); if (tUIWindow) { this.AdjustWinDepth(tUIWindow); this.RefreshReturnSeq(winName, tUIWindow); this.DoShowWindow(winName, tUIWindow); if (tUIWindow.DataCfg.WinType == WindowType.Normal) { this.mPreNormalWin = this.mCurNormalWin; this.mCurNormalWin = tUIWindow; } if (tUIWindow.DataCfg.IsOnset) { this.ClearReturnSeq(); } } }
/// <summary> /// 关闭销毁所有窗口 /// </summary> public void DestroyAllWindows() { List <string> list = new List <string>(this.mDicAllWindows.Keys); TUIWindow tUIWindow = null; for (int i = 0; i < list.Count; i++) { if (this.mDicAllWindows.TryGetValue(list[i], out tUIWindow)) { if (this.OnClosed != null) { this.OnClosed(new CloseWindowEventArgs(true, list[i], true, true, tUIWindow)); } if (tUIWindow != null) { tUIWindow.CloseWindow(true); } } } this.mDicAllWindows.Clear(); this.mDicOpenWindows.Clear(); this.mSepReturnWins.Clear(); }
public OpenWindowEventArgs(bool success, string name, TUIWindow window) { this.IsSuccess = success; this.WinName = name; this.UiWindow = window; }
/// <summary> /// 预加载指定窗口 /// </summary> /// <param name="winName"></param> /// <param name="resCfg"></param> public void PreloadWindow(string winName, WinResurceCfg resCfg) { TUIWindow tUIWindow = this.ReadyToShowWin(winName, resCfg); }