protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);

            clickedTabIndex = -1;

            for (int i = 0; i < _tabPages.Count; i++)
            {
                Rectangle rect = (Rectangle)_tabRects[i];
                if (rect.Contains(e.X, e.Y))
                {
                    clickedTabIndex = i;
                    break;
                }
            }

            internalState = OpenFileTabState.Nothing;
            if (clickedTabIndex != -1)
            {
                if (ClickedView.ContentName == null)
                {
                    internalState |= OpenFileTabState.FileUntitled;
                }
                if (ClickedView.IsDirty)
                {
                    internalState |= OpenFileTabState.FileDirty;
                }
                if (ClickedView is Form)
                {
                    internalState |= OpenFileTabState.ClickedWindowIsForm;
                }
            }
        }
		protected override void OnMouseDown(MouseEventArgs e)
		{
			base.OnMouseDown(e);

			clickedTabIndex = -1;
			
			for(int i=0; i<_tabPages.Count; i++) 
			{
				Rectangle rect = (Rectangle)_tabRects[i];
				if (rect.Contains(e.X, e.Y)) 
				{
					clickedTabIndex = i;
					break;
				}
			}
			
			internalState = OpenFileTabState.Nothing;
			if (clickedTabIndex != -1) 
			{
				if (ClickedView.ContentName == null) 
				{
					internalState |= OpenFileTabState.FileUntitled;
				}
				if (ClickedView.IsDirty) 
				{
					internalState |= OpenFileTabState.FileDirty;
				}
				if (ClickedView is Form) 
				{
					internalState |= OpenFileTabState.ClickedWindowIsForm;
				}
			}
		}