コード例 #1
0
 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;
 }
コード例 #2
0
 /// <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));
     }
 }
コード例 #3
0
        /// <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();
                }
            }
        }
コード例 #4
0
        /// <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();
        }
コード例 #5
0
 public OpenWindowEventArgs(bool success, string name, TUIWindow window)
 {
     this.IsSuccess = success;
     this.WinName   = name;
     this.UiWindow  = window;
 }
コード例 #6
0
 /// <summary>
 /// 预加载指定窗口
 /// </summary>
 /// <param name="winName"></param>
 /// <param name="resCfg"></param>
 public void PreloadWindow(string winName, WinResurceCfg resCfg)
 {
     TUIWindow tUIWindow = this.ReadyToShowWin(winName, resCfg);
 }