Beispiel #1
0
        private void OnCustomMenuItemClose(object sender, EventArgs e)
        {
            Infragistics.Win.UltraWinTabbedMdi.MdiTab tab = null;

            Infragistics.Win.IGControls.IGMenuItem mi = sender as Infragistics.Win.IGControls.IGMenuItem;
            switch (mi.Index)
            {
            case 0:
                tab = mi.Tag as Infragistics.Win.UltraWinTabbedMdi.MdiTab;
                tab.Close();
                break;

            case 1:
                do
                {
                    tabManager.TabGroups[0].Tabs[0].Close();
                } while (tabManager.TabGroups.Count != 0);
                break;

            case 2:
                tab = mi.Tag as Infragistics.Win.UltraWinTabbedMdi.MdiTab;
                do
                {
                    if (tabManager.TabGroups[0].Tabs[0].Key != tab.Key)
                    {
                        tabManager.TabGroups[0].Tabs[0].Close();
                    }
                    else if (tabManager.TabGroups[0].Tabs.Count > 1)
                    {
                        tabManager.TabGroups[0].Tabs[1].Close();
                    }
                } while (tabManager.TabGroups[0].Tabs.Count != 1);
                break;
            }
        }
Beispiel #2
0
 private void OnCustomMenuItemClose(object sender, EventArgs e)
 {
     Infragistics.Win.IGControls.IGMenuItem    mi  = sender as Infragistics.Win.IGControls.IGMenuItem;
     Infragistics.Win.UltraWinTabbedMdi.MdiTab tab = mi.Tag as Infragistics.Win.UltraWinTabbedMdi.MdiTab;
     tab.Close();
 }