Exemplo n.º 1
0
 private void tabControl1_TabCountChanged(object sender, QTabCancelEventArgs e) {
     if(pluginManager != null) {
         QTabItem tabPage = (QTabItem)e.TabPage;
         if(e.Action == TabControlAction.Selected) {
             pluginManager.OnTabAdded(e.TabPageIndex, tabPage.CurrentIDL, tabPage.CurrentPath);
         }
         else if(e.Action == TabControlAction.Deselected) {
             pluginManager.OnTabRemoved(e.TabPageIndex, tabPage.CurrentIDL, tabPage.CurrentPath);
         }
     }
 }
Exemplo n.º 2
0
 private void tabControl1_TabIconMouseDown(object sender, QTabCancelEventArgs e) {
     ShowSubdirTip_Tab((QTabItem)e.TabPage, e.Action == TabControlAction.Selecting, e.TabPageIndex, false, e.Cancel);
 }
Exemplo n.º 3
0
 private void tabControl1_Selecting(object sender, QTabCancelEventArgs e) {
     if(NowTabsAddingRemoving) {
         e.Cancel = true;
     }
 }
Exemplo n.º 4
0
 private void tabControl1_PointedTabChanged(object sender, QTabCancelEventArgs e) {
     if(pluginManager != null) {
         if(e.Action == TabControlAction.Selecting) {
             QTabItem tabPage = (QTabItem)e.TabPage;
             pluginManager.OnPointedTabChanged(e.TabPageIndex, tabPage.CurrentIDL, tabPage.CurrentPath);
         }
         else if(e.Action == TabControlAction.Deselecting) {
             pluginManager.OnPointedTabChanged(-1, null, string.Empty);
         }
     }
 }
Exemplo n.º 5
0
 private void tabControl1_Deselecting(object sender, QTabCancelEventArgs e) {
     if(e.TabPageIndex != -1) {
         SaveSelectedItems((QTabItem)e.TabPage);
     }
 }
Exemplo n.º 6
0
 private void tabControl1_CloseButtonClicked(object sender, QTabCancelEventArgs e) {
     if(NowTabDragging) {
         Cursor = Cursors.Default;
         NowTabDragging = false;
         DraggingTab = null;
         DraggingDestRect = Rectangle.Empty;
         SyncButtonBarCurrent(12);
         e.Cancel = true;
     }
     else if(!Explorer.Busy) {
         QTabItem tabPage = (QTabItem)e.TabPage;
         if(tabControl1.TabCount > 1) {
             e.Cancel = !CloseTab(tabPage);
         }
         else {
             WindowUtils.CloseExplorer(ExplorerHandle, 1);
         }
     }
 }
Exemplo n.º 7
0
 private void tabControl1_CloseButtonClicked(object sender, QTabCancelEventArgs e)
 {
     if(NowTabDragging) {
         Cursor = Cursors.Default;
         NowTabDragging = false;
         DraggingTab = null;
         DraggingDestRect = Rectangle.Empty;
         TryCallButtonBar(bbar => bbar.RefreshButtons());
         e.Cancel = true;
     }
     else if(!Explorer.Busy) {
         if(tabControl1.TabCount > 1) {
             e.Cancel = !CloseTab(e.TabPage);
         }
         else {
             WindowUtils.CloseExplorer(ExplorerHandle, 1);
         }
     }
 }