Example #1
0
        public override bool RemoveSelf()
        {
            ITabButtonContainerItem pTabButtonContainerItem = this.pOwner as ITabButtonContainerItem;

            if (pTabButtonContainerItem == null)
            {
                return(base.RemoveSelf());
            }
            ITabControl pTabControl = pTabButtonContainerItem.TryGetTabControl();

            if (pTabControl == null)
            {
                return(base.RemoveSelf());
            }
            pTabControl.RemoveTabPage(this.pTabPageItem);
            return(true);
        }
        protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)
        {
            base.OnMouseUp(mevent);
            //
            ITabControl pTabControl = this.m_Owner.TryGetTabControl();

            if (pTabControl == null)
            {
                return;
            }
            ITabButtonItem pTabButtonItem = this.m_Owner.SelectTabButtonItem;

            if (pTabButtonItem == null)
            {
                return;
            }
            pTabControl.RemoveTabPage(pTabButtonItem.pTabPageItem);
        }