Beispiel #1
0
        private void editortabs_MouseClick(object sender, MouseEventArgs e)
        {
            Control fromTabs = sender as Control;

            OpenTab.TAB_SIDE side = OpenTab.TAB_SIDE.None;
            TabControlExtra  Tab  = null;

            switch (fromTabs.Name)
            {
            case "editortabsleft":
                side = OpenTab.TAB_SIDE.Left;
                Tab  = editortabsleft;
                break;

            case "editortabsright":
                side = OpenTab.TAB_SIDE.Right;
                Tab  = editortabsright;
                break;
            }

            if (e.Button == MouseButtons.Right)
            {
                for (int ix = 0; ix < Tab.TabCount; ++ix)
                {
                    if (Tab.GetTabRect(ix).Contains(e.Location))
                    {
                        RightClickedTab = new OpenTab(side, ix);
                        toolstabrightclick.Show(Cursor.Position);
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        public void SwitchToTab(OpenTab.TAB_SIDE side, int index)
        {
            switch (side)
            {
            case OpenTab.TAB_SIDE.Left:
                editortabsleft.SelectTab(index);
                break;

            case OpenTab.TAB_SIDE.Right:
                editortabsright.SelectTab(index);
                break;
            }
        }