Esempio n. 1
0
 private void dotNetBarManager1_DockTabClosing(object sender, DevComponents.DotNetBar.DockTabClosingEventArgs e)
 {
     deck.Clear();
     dockContainerItem1.Text = "主卡组(00)";
     dockContainerItem2.Text = "副卡组(00)";
     dockContainerItem3.Text = "额外卡组(00)";
     ShowDeck();
     e.Cancel = true;
 }
Esempio n. 2
0
 private void bar2_DockTabClosed(object sender, DevComponents.DotNetBar.DockTabClosingEventArgs e)
 {
     for (int i = 0; i < tab.Items.Count; i++)
     {
         if (tab.Items[i].ToString() == e.DockContainerItem.Text)
         {
             tab.Items[i].Visible = false;
             break;
         }
     }
     e.Cancel = true;
     tab.Show();
     menuStrip2.Show();
 }
Esempio n. 3
0
        private void OnDocumentClosing(object sender, DevComponents.DotNetBar.DockTabClosingEventArgs e)
        {
            // In this event you save any changes to the active document or cancel the closing...
            // e.DockContainerItem returns the reference to the item being closed
            // Set e.Cancel to true to cancel the closing
            // Set e.RemoveDockTab to true to automatically remove the closed tab from Bar.Items collection, otherwise tab will just be hidden

            DialogResult r = MessageBox.Show("Document '" + e.DockContainerItem.Text + " is about to close. Close it?", "Document Docking", MessageBoxButtons.YesNo);

            if (r == DialogResult.No)
            {
                e.Cancel = true;
            }
        }
Esempio n. 4
0
        private void MainManager_DockTabClosing(object sender, DevComponents.DotNetBar.DockTabClosingEventArgs e)
        {
            int i = 0;

            foreach (DevComponents.DotNetBar.DockContainerItem dock in BarMain.Items)
            {
                if (dock.Visible)
                {
                    i++;
                }
            }
            if (i == 1)
            {
                e.Cancel = true;
            }
        }
Esempio n. 5
0
 private void bar1_DockTabClosing(object sender, DevComponents.DotNetBar.DockTabClosingEventArgs e)
 {
 }