/// <summary>
        ///Get WindowNo of Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public int GetWindowNo(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            return(win.WindowNo);
        }   //  getWindowNo
        /// <summary>
        ///Get ID for Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public int GetWindowID(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                return(-1);
            }
            WBWindow win = _windows[index];

            return(win.ID);
        }
        /// <summary>
        /// Set WindowNo of Window
        /// </summary>
        /// <param name="index"></param>
        /// <param name="windowNo"></param>
        public void SetWindowNo(int index, int windowNo)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = (WBWindow)_windows[index];

            win.WindowNo = windowNo;
        }
        }   //  getWindowNo

        /// <summary>
        /// Dispose of Window
        /// </summary>
        /// <param name="index"></param>
        public void Dispose(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            if (win.mWindow != null)
            {
                win.mWindow.Dispose();
            }
            win.mWindow = null;
        }   //  dispose
        /// <summary>
        /// Get Image Icon of Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public System.Drawing.Image GetImage(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            if (win.mWindow != null && win.Type == TYPE_WINDOW)
            {
                return(win.mWindow.GetImage());
            }
            return(null);
        }
        /// <summary>
        ///  Get Description of Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public String GetDescription(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            if (win.mWindow != null && win.Type == TYPE_WINDOW)
            {
                return(win.mWindow.GetDescription());
            }
            return(null);
        }
        /// <summary>
        ///Get Window Model of Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public GridWindow GetMWindow(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            if (win.Type != TYPE_WINDOW)
            {
                throw new ArgumentException("Not a MWindow: " + index);
            }
            return(win.mWindow);
        }
        /// <summary>
        /// Set Window Model of Window
        /// </summary>
        /// <param name="index">index in workbench</param>
        /// <param name="mw">model window</param>
        public void SetMWindow(int index, GridWindow mw)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win = _windows[index];

            if (win.Type != TYPE_WINDOW)
            {
                throw new ArgumentException("Not a MWindow: " + index);
            }
            win.mWindow = mw;
        }
        /// <summary>
        /// Get AD_Color_ID of Window
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public int GetAD_Color_ID(int index)
        {
            if (index < 0 || index > _windows.Count)
            {
                throw new ArgumentException("Index invalid: " + index);
            }
            WBWindow win      = _windows[index];
            int      retValue = -1;

            //	if (win.mWindow != null && win.Type == TYPE_WINDOW)
            //		return win.mWindow.getAD_Color_ID();
            if (retValue == -1)
            {
                return(GetAD_Color_ID());
            }
            return(retValue);
        }