當前位置: 首頁>>代碼示例>>C#>>正文


C# QTTabBarLib.QTabItem類代碼示例

本文整理匯總了C#中QTTabBarLib.QTabItem的典型用法代碼示例。如果您正苦於以下問題:C# QTabItem類的具體用法?C# QTabItem怎麽用?C# QTabItem使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


QTabItem類屬於QTTabBarLib命名空間,在下文中一共展示了QTabItem類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreateGroup

 private void CreateGroup(QTabItem contextMenuedTab) {
     NowModalDialogShown = true;
     QTUtility.RefreshGroupsDic();
     using(CreateNewGroupForm form = new CreateNewGroupForm(contextMenuedTab.CurrentPath, tabControl1.TabPages)) {
         if(NowTopMost) {
             form.TopMost = true;
         }
         if(DialogResult.OK == form.ShowDialog()) {
             QTUtility.SaveGroupsReg();
             SyncButtonBarBroadCast(1);
             SyncTaskBarMenu();
         }
     }
     NowModalDialogShown = false;
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:15,代碼來源:QTTabBarClass.cs

示例2: TabWrapper

 public TabWrapper(QTabItem tab, QTTabBarClass tabBar)
 {
     this.tab = tab;
     this.tabBar = tabBar;
     this.tab.Closed += tab_Closed;
 }
開發者ID:svn2github,項目名稱:QTTabBar,代碼行數:6,代碼來源:PluginServer.cs

示例3: Clone

 public QTabItem Clone(bool fAll = false) {
     QTabItem item = new QTabItem(Text, currentPath, Owner);
     item.TabBounds = TabBounds;
     item.Comment = Comment;
     item.currentIDL = currentIDL;
     item.ToolTipText = ToolTipText;
     item.tooltipText2 = tooltipText2;
     if(fAll) {
         item.tabLocked = tabLocked;
     }
     LogData[] array = stckHistoryForward.ToArray();
     LogData[] dataArray2 = stckHistoryBackward.ToArray();
     Array.Reverse(array);
     Array.Reverse(dataArray2);
     item.stckHistoryForward = new Stack<LogData>(array);
     item.stckHistoryBackward = new Stack<LogData>(dataArray2);
     item.dicFocusedItemName = new Dictionary<string, string>(dicFocusedItemName);
     item.lstHistoryBranches = new List<LogData>(lstHistoryBranches.ToArray());
     Dictionary<string, Address[]> dictionary = dicSelectdItems.Keys
             .ToDictionary(str => str, str => dicSelectdItems[str]);
     item.dicSelectdItems = dictionary;
     return item;
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:23,代碼來源:QTabItem.cs

示例4: CloneTabButton

 private QTabItem CloneTabButton(QTabItem tab, string optionURL, bool fSelect, int index) {
     NowTabCloned = fSelect;
     QTabItem item = tab.Clone();
     if(index < 0) {
         AddInsertTab(item);
     }
     else if((-1 < index) && (index < (tabControl1.TabCount + 1))) {
         tabControl1.TabPages.Insert(index, item);
     }
     else {
         AddInsertTab(item);
     }
     if(optionURL != null) {
         using(IDLWrapper wrapper = new IDLWrapper(optionURL)) {
             item.NavigatedTo(optionURL, wrapper.IDL, -1);
         }
     }
     if(fSelect) {
         tabControl1.SelectTab(item);
     }
     else {
         item.RefreshRectangle();
         tabControl1.Refresh();
     }
     return item;
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:26,代碼來源:QTTabBarClass.cs

示例5: CloseTab

        private bool CloseTab(QTabItem closingTab, bool fCritical, bool fSkipSync = false) {
            if(closingTab == null) {
                return false;
            }
            if((!fCritical && closingTab.TabLocked) && QTUtility2.PathExists(closingTab.CurrentPath)) {
                return false;
            }
            int index = tabControl1.TabPages.IndexOf(closingTab);
            if(index == -1) {
                return false;
            }
            lstActivatedTabs.Remove(closingTab);
            AddToHistory(closingTab);
            tabControl1.TabPages.Remove(closingTab);
            closingTab.OnClose();
            if(closingTab != CurrentTab) {
                if(!fSkipSync) SyncButtonBarCurrent(0x1003c);
                return true;
            }
            CurrentTab = null;
            int tabCount = tabControl1.TabCount;
            if(tabCount == 0) return true;
            QTabItemBase tabPage = null;
            switch(QTUtility.ConfigValues[2]) {
                case 0:
                    tabPage = tabControl1.TabPages[index == tabCount ? index - 1: index];
                    break;

                case 1:
                    tabPage = tabControl1.TabPages[index == 0 ? 0 : index - 1];
                    break;

                case 2:
                    tabPage = tabControl1.TabPages[tabCount - 1];
                    break;

                case 3:
                    tabPage = tabControl1.TabPages[0];
                    break;

                case 4:
                    if(lstActivatedTabs.Count <= 0) {
                        tabPage = tabControl1.TabPages[0];
                        break;
                    }
                    QTabItemBase lastTab = lstActivatedTabs[lstActivatedTabs.Count - 1];
                    lstActivatedTabs.RemoveAt(lstActivatedTabs.Count - 1);
                    tabPage = tabControl1.TabPages.Contains(lastTab)
                        ? lastTab : tabControl1.TabPages[0];
                    break;
            }
            if(tabPage != null) {
                tabControl1.SelectTab(tabPage);
            }
            else {
                tabControl1.SelectTab(0);
            }
            if(!fSkipSync) SyncButtonBarCurrent((tabPage == null) ? 60 : 0x3f);
            return true;
        }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:60,代碼來源:QTTabBarClass.cs

示例6: tabControl1_MouseUp

 private void tabControl1_MouseUp(object sender, MouseEventArgs e) {
     if(NowTabDragging && (e.Button == MouseButtons.Left)) {
         QTabItem tabMouseOn = (QTabItem)tabControl1.GetTabMouseOn();
         Keys modifierKeys = ModifierKeys;
         if(((tabMouseOn == null) && (DraggingTab != null)) && ((modifierKeys == Keys.Control) || (modifierKeys == (Keys.Control | Keys.Shift)))) {
             bool flag = false;
             Point pt = tabControl1.PointToScreen(e.Location);
             if(!QTUtility.IsXP) {
                 RECT rect;
                 PInvoke.GetWindowRect(ReBarHandle, out rect);
                 flag = PInvoke.PtInRect(ref rect, pt);
             }
             else {
                 RECT rect2;
                 IntPtr ptr;
                 if(QTUtility.instanceManager.TryGetButtonBarHandle(ExplorerHandle, out ptr) && PInvoke.IsWindowVisible(ptr)) {
                     PInvoke.GetWindowRect(ptr, out rect2);
                     if(PInvoke.PtInRect(ref rect2, pt)) {
                         flag = true;
                     }
                 }
                 PInvoke.GetWindowRect(Handle, out rect2);
                 if(PInvoke.PtInRect(ref rect2, pt)) {
                     flag = true;
                 }
             }
             if(flag) {
                 CloneTabButton(DraggingTab, null, false, tabControl1.TabCount);
             }
         }
         else if(((tabMouseOn != null) && (tabMouseOn == DraggingTab)) && ((modifierKeys == Keys.Control) && (DraggingDestRect == Rectangle.Empty))) {
             DraggingTab.TabLocked = !DraggingTab.TabLocked;
         }
         NowTabDragging = false;
         DraggingTab = null;
         DraggingDestRect = Rectangle.Empty;
         SyncButtonBarCurrent(12);
     }
     else if((e.Button == MouseButtons.Middle) && !Explorer.Busy) {
         DraggingTab = null;
         NowTabDragging = false;
         QTabItem clickedTab = (QTabItem)tabControl1.GetTabMouseOn();
         if((clickedTab != null) && ((ModifierKeys & Keys.Control) != Keys.Control)) {
             HandleTabClickAction(clickedTab, true);
         }
     }
     Cursor = Cursors.Default;
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:48,代碼來源:QTTabBarClass.cs

示例7: TranslateAcceleratorIO

        public override int TranslateAcceleratorIO(ref MSG msg) {
            if(msg.message == WM.KEYDOWN) {
                Keys wParam = (Keys)((int)((long)msg.wParam));
                bool flag = (((int)((long)msg.lParam)) & 0x40000000) != 0;
                switch(wParam) {
                    case Keys.Delete: {
                            if(!tabControl1.Focused || ((subDirTip_Tab != null) && subDirTip_Tab.MenuIsShowing)) {
                                break;
                            }
                            int focusedTabIndex = tabControl1.GetFocusedTabIndex();
                            if((-1 < focusedTabIndex) && (focusedTabIndex < tabControl1.TabCount)) {
                                bool flag3 = focusedTabIndex == (tabControl1.TabCount - 1);
                                if(CloseTab((QTabItem)tabControl1.TabPages[focusedTabIndex]) && flag3) {
                                    tabControl1.FocusNextTab(true, false, false);
                                }
                            }
                            return 0;
                        }
                    case Keys.Apps:
                        if(!flag) {
                            int index = tabControl1.GetFocusedTabIndex();
                            if((-1 >= index) || (index >= tabControl1.TabCount)) {
                                break;
                            }
                            ContextMenuedTab = (QTabItem)tabControl1.TabPages[index];
                            Rectangle tabRect = tabControl1.GetTabRect(index, true);
                            contextMenuTab.Show(PointToScreen(new Point(tabRect.Right + 10, tabRect.Bottom - 10)));
                        }
                        return 0;

                    case Keys.F6:
                    case Keys.Tab:
                    case Keys.Left:
                    case Keys.Right: {
                            if(!tabControl1.Focused || ((subDirTip_Tab != null) && subDirTip_Tab.MenuIsShowing)) {
                                break;
                            }
                            bool fBack = (ModifierKeys == Keys.Shift) || (wParam == Keys.Left);
                            if(!tabControl1.FocusNextTab(fBack, false, false)) {
                                break;
                            }
                            return 0;
                        }
                    case Keys.Back:
                        return 0;

                    case Keys.Return:
                    case Keys.Space:
                        if(!flag && !tabControl1.SelectFocusedTab()) {
                            break;
                        }
                        listView.SetFocus();
                        return 0;

                    case Keys.Escape:
                        if(tabControl1.Focused && ((subDirTip_Tab == null) || !subDirTip_Tab.MenuIsShowing)) {
                            listView.SetFocus();
                        }
                        break;

                    case Keys.End:
                    case Keys.Home:
                        if((!tabControl1.Focused || ((subDirTip_Tab != null) && subDirTip_Tab.MenuIsShowing)) || !tabControl1.FocusNextTab(wParam == Keys.Home, false, true)) {
                            break;
                        }
                        return 0;

                    case Keys.Up:
                    case Keys.Down:
                        if(((!QTUtility.CheckConfig(Settings.ShowSubDirTipOnTab) || !tabControl1.Focused) || ((subDirTip_Tab != null) && subDirTip_Tab.MenuIsShowing)) || (!flag && !tabControl1.PerformFocusedFolderIconClick(wParam == Keys.Up))) {
                            break;
                        }
                        return 0;
                }
            }
            return base.TranslateAcceleratorIO(ref msg);
        }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:77,代碼來源:QTTabBarClass.cs

示例8: HandleKEYDOWN


//.........這裏部分代碼省略.........
                    }
                    if(imkey == QTUtility.ShortcutKeys[0x23]) {
                        listView.SetFocus();
                        return true;
                    }
                    if(imkey == QTUtility.ShortcutKeys[0x24]) {
                        if(!QTUtility.IsXP) {
                            PInvoke.SetFocus(GetSearchBand_Edit());
                            return true;
                        }
                    }
                    else if(imkey == QTUtility.ShortcutKeys[0x25]) {
                        IntPtr ptr4;
                        if(QTUtility.instanceManager.TryGetButtonBarHandle(ExplorerHandle, out ptr4) && PInvoke.IsWindow(ptr4)) {
                            QTUtility2.SendCOPYDATASTRUCT(ptr4, (IntPtr)8, null, IntPtr.Zero);
                            return true;
                        }
                    }
                    else if(imkey == QTUtility.ShortcutKeys[0x26]) {
                        if(!QTUtility.CheckConfig(Settings.NoShowSubDirTips)) {
                            if(!fRepeat) {
                                listView.ShowAndClickSubDirTip();
                            }
                            return true;
                        }
                    }
                    else {
                        if(imkey == QTUtility.ShortcutKeys[0x27]) {
                            if(!fRepeat) {
                                ShowTaskbarItem(ExplorerHandle, false);
                            }
                            return true;
                        }
                        if(imkey == QTUtility.ShortcutKeys[40]) {
                            tabControl1.Focus();
                            tabControl1.FocusNextTab(false, true, false);
                            return true;
                        }
                        if(Array.IndexOf(QTUtility.PluginShortcutKeysCache, imkey) != -1) {
                            foreach(string str in QTUtility.dicPluginShortcutKeys.Keys) {
                                int[] numArray = QTUtility.dicPluginShortcutKeys[str];
                                if(numArray != null) {
                                    for(int i = 0; i < numArray.Length; i++) {
                                        if(imkey == numArray[i]) {
                                            Plugin plugin;
                                            if(pluginManager.TryGetPlugin(str, out plugin)) {
                                                try {
                                                    plugin.Instance.OnShortcutKeyPressed(i);
                                                }
                                                catch(Exception exception) {
                                                    PluginManager.HandlePluginException(exception, ExplorerHandle, plugin.PluginInformation.Name, "On shortcut key pressed. Index is " + i);
                                                }
                                                return true;
                                            }
                                            return false;
                                        }
                                    }
                                }
                            }
                        }
                        else {
                            if(!fRepeat && QTUtility.dicUserAppShortcutKeys.ContainsKey(imkey)) {
                                MenuItemArguments mia = QTUtility.dicUserAppShortcutKeys[imkey];
                                try {
                                    using(IDLWrapper wrapper2 = GetCurrentPIDL()) {
                                        Address[] addressArray;
                                        string str2;
                                        if((wrapper2.Available && wrapper2.HasPath) && ShellBrowser.TryGetSelection(out addressArray, out str2, false)) {
                                            AppLauncher launcher = new AppLauncher(addressArray, wrapper2.Path);
                                            launcher.ReplaceTokens_WorkingDir(mia);
                                            launcher.ReplaceTokens_Arguments(mia);
                                        }
                                    }
                                    AppLauncher.Execute(mia, ExplorerHandle);
                                }
                                catch(Exception exception2) {
                                    QTUtility2.MakeErrorLog(exception2, null);
                                }
                                finally {
                                    mia.RestoreOriginalArgs();
                                }
                                return true;
                            }
                            if(!fRepeat && QTUtility.dicGroupShortcutKeys.ContainsKey(imkey)) {
                                OpenGroup(QTUtility.dicGroupShortcutKeys[imkey], false);
                                return true;
                            }
                        }
                    }
                }
                imkey -= 0x100000;
                return (imkey == 0x20057);
            }

            bool flag = tabControl1.TabPages.Cast<QTabItem>().All(item2 => item2.TabLocked);
            foreach(QTabItem item3 in tabControl1.TabPages) {
                item3.TabLocked = !flag;
            }
            return true;
        }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:101,代碼來源:QTTabBarClass.cs

示例9: HandleTabClickAction

        private void HandleTabClickAction(QTabItem clickedTab, bool fWheel) {
            byte num = fWheel ? QTUtility.ConfigValues[12] : QTUtility.ConfigValues[3];
            switch(num) {
                case 0:
                case 1:
                    if(!(fWheel ^ (num == 1))) {
                        UpOneLevel();
                        return;
                    }
                    NowTabDragging = false;
                    if(tabControl1.TabCount <= 1) {
                        if(clickedTab.TabLocked) {
                            break;
                        }
                        WindowUtils.CloseExplorer(ExplorerHandle, 1);
                        return;
                    }
                    CloseTab(clickedTab);
                    return;

                case 2:
                    clickedTab.TabLocked = !clickedTab.TabLocked;
                    return;

                case 3:
                    ContextMenuedTab = clickedTab;
                    contextMenuTab.Show(MousePosition);
                    return;

                case 4:
                    using(IDLWrapper wrapper = new IDLWrapper(clickedTab.CurrentIDL)) {
                        OpenNewWindow(wrapper);
                    }
                    if((ModifierKeys & Keys.Shift) != Keys.Shift) {
                        break;
                    }
                    CloseTab(clickedTab);
                    return;

                case 5:
                    CloneTabButton(clickedTab, null, true, -1);
                    return;

                case 6: {
                        string currentPath = clickedTab.CurrentPath;
                        if(currentPath.IndexOf("???") != -1) {
                            currentPath = currentPath.Substring(0, currentPath.IndexOf("???"));
                        }
                        SetStringClipboard(currentPath);
                        return;
                    }
                case 7:
                    ShellMethods.ShowProperties(clickedTab.CurrentIDL);
                    break;

                default:
                    return;
            }
        }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:59,代碼來源:QTTabBarClass.cs

示例10: AddStartUpTabs

 private void AddStartUpTabs(string openingGRP, string openingPath) {
     if(ModifierKeys == Keys.Shift || QTUtility.InstancesCount != 1) return;
     if(QTUtility.StartUpGroupList.Count > 0) {
         bool flag = QTUtility.CheckConfig(Settings.DontOpenSame);
         foreach(string str in QTUtility.StartUpGroupList) {
             string str2;
             if((openingGRP != str) && QTUtility.GroupPathsDic.TryGetValue(str, out str2)) {
                 if(QTUtility.StartUpGroupNameNowOpening == str) {
                     QTUtility.StartUpGroupNameNowOpening = string.Empty;
                 }
                 else {
                     foreach(string str3 in str2.Split(QTUtility.SEPARATOR_CHAR)) {
                         if(flag) {
                             if(str3.PathEquals(openingPath)) {
                                 tabControl1.TabPages.Relocate(0, tabControl1.TabCount - 1);
                                 continue;
                             }
                             if(tabControl1.TabPages.Cast<QTabItem>().Any(item => str3.PathEquals(item.CurrentPath))) {
                                 continue;
                             }
                         }
                         using(IDLWrapper wrapper = new IDLWrapper(str3)) {
                             if(wrapper.Available) {
                                 QTabItem tabPage = new QTabItem(QTUtility2.MakePathDisplayText(str3, false), str3, tabControl1);
                                 tabPage.NavigatedTo(str3, wrapper.IDL, -1);
                                 tabPage.ToolTipText = QTUtility2.MakePathDisplayText(str3, true);
                                 tabPage.UnderLine = true;
                                 tabControl1.TabPages.Add(tabPage);
                             }
                         }
                     }
                 }
             }
         }
     }
     if(QTUtility.CheckConfig(Settings.RestoreLockedTabs)) {
         RestoreTabsOnInitialize(1, openingPath);
     }
     else if(QTUtility.CheckConfig(Settings.RestoreTabs) || fIsFirstLoad) {
         RestoreTabsOnInitialize(0, openingPath);
     }
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:42,代碼來源:QTTabBarClass.cs

示例11: AddToHistory

 private static void AddToHistory(QTabItem closingTab) {
     string currentPath = closingTab.CurrentPath;
     if((!QTUtility.CheckConfig(Settings.NoHistory) && !string.IsNullOrEmpty(currentPath)) && !IsSearchResultFolder(currentPath)) {
         if(QTUtility2.IsShellPathButNotFileSystem(currentPath) && (currentPath.IndexOf("???") == -1)) {
             currentPath = currentPath + "???" + closingTab.GetLogHash(true, 0);
         }
         QTUtility.ClosedTabHistoryList.Add(currentPath);
         SyncButtonBarBroadCast(2);
     }
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:10,代碼來源:QTTabBarClass.cs

示例12: Explorer_NavigateComplete2

        private void Explorer_NavigateComplete2(object pDisp, ref object URL) {
            string path = (string)URL;
            lastCompletedBrowseObjectIDL = lastAttemptedBrowseObjectIDL;
            if(!IsShown) {
                DoFirstNavigation(false, path);
            }            

            if(fNowQuitting) {
                Explorer.Quit();
            }
            else {
                int hash = -1;
                bool flag = IsSpecialFolderNeedsToTravel(path);
                bool flag2 = QTUtility2.IsShellPathButNotFileSystem(path);
                bool flag3 = QTUtility2.IsShellPathButNotFileSystem(CurrentTab.CurrentPath);

                // If we're navigating on a locked tab, we simulate opening the target folder
                // in a new tab.  First we clone the tab at the old address and lock it.  Then
                // we move the current tab to the "new tab" position and unlock it.
                if(!flag2 && !flag3 && !NavigatedByCode && CurrentTab.TabLocked) {
                    int pos = tabControl1.SelectedIndex;
                    tabControl1.SetRedraw(false);
                    QTabItem item = CloneTabButton(CurrentTab, null, false, pos);
                    item.TabLocked = true;
                    CurrentTab.TabLocked = false;
                    pos++;
                    int max = tabControl1.TabPages.Count - 1;

                    switch(QTUtility.ConfigValues[1]) {
                        case 0:
                            if(pos != max) {
                                tabControl1.TabPages.Relocate(pos, max);
                            }
                            break;
                        case 1:
                            tabControl1.TabPages.Relocate(pos, 0);
                            break;
                        case 3:
                            tabControl1.TabPages.Relocate(pos, pos - 1);
                            break;
                    }
                    tabControl1.SetRedraw(true);

                    lstActivatedTabs.Remove(CurrentTab);
                    lstActivatedTabs.Add(item);
                    lstActivatedTabs.Add(CurrentTab);
                    if(lstActivatedTabs.Count > 15) {
                        lstActivatedTabs.RemoveAt(0);
                    }
                }

                if(!NavigatedByCode && flag) {
                    hash = DateTime.Now.GetHashCode();
                    LogEntryDic[hash] = GetCurrentLogEntry();
                }
                ClearTravelLogs();
                try {
                    tabControl1.SetRedraw(false);
                    if(fNowTravelByTree) {
                        using(IDLWrapper wrapper = GetCurrentPIDL()) {
                            QTabItem tabPage = CreateNewTab(wrapper);
                            tabControl1.SelectTabDirectly(tabPage);
                            CurrentTab = tabPage;
                        }
                    }
                    if(tabControl1.AutoSubText && !fNavigatedByTabSelection) {
                        CurrentTab.Comment = string.Empty;
                    }
                    CurrentAddress = path;
                    CurrentTab.Text = Explorer.LocationName;
                    CurrentTab.CurrentIDL = null;
                    CurrentTab.TooltipText2 = null;
                    byte[] idl;
                    using(IDLWrapper wrapper2 = GetCurrentPIDL()) {
                        CurrentTab.CurrentIDL = idl = wrapper2.IDL;
                        if(flag) {
                            if((!NavigatedByCode && (idl != null)) && (idl.Length > 0)) {
                                path = path + "*?*?*" + hash;
                                QTUtility.ITEMIDLIST_Dic_Session[path] = idl;
                                CurrentTab.CurrentPath = CurrentAddress = path;
                            }
                        }
                        else if((flag2 && wrapper2.Available) && !CurrentTab.CurrentPath.Contains("???")) {
                            string str2;
                            int num2;
                            if(IDLWrapper.GetIDLHash(wrapper2.PIDL, out num2, out str2)) {
                                hash = num2;
                                CurrentTab.CurrentPath = CurrentAddress = path = str2;
                            }
                            else if((idl != null) && (idl.Length > 0)) {
                                hash = num2;
                                path = path + "???" + hash;
                                IDLWrapper.AddCache(path, idl);
                                CurrentTab.CurrentPath = CurrentAddress = path;
                            }
                        }
                        if(!NavigatedByCode) {
                            CurrentTab.NavigatedTo(CurrentAddress, idl, hash);
                        }
                    }
//.........這裏部分代碼省略.........
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:101,代碼來源:QTTabBarClass.cs

示例13: AddInsertTab

        private void AddInsertTab(QTabItem tab) {
            switch(QTUtility.ConfigValues[1]) {
                case 1:
                    tabControl1.TabPages.Insert(0, tab);
                    return;

                case 2:
                case 3: {
                        int index = tabControl1.TabPages.IndexOf(CurrentTab);
                        if(index == -1) {
                            tabControl1.TabPages.Add(tab);
                            return;
                        }
                        tabControl1.TabPages.Insert((QTUtility.ConfigValues[1] == 2) ? (index + 1) : index, tab);
                        return;
                    }
            }
            tabControl1.TabPages.Add(tab);
        }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:19,代碼來源:QTTabBarClass.cs

示例14: CreateNewTab

 private QTabItem CreateNewTab(IDLWrapper idlw) {
     string path = idlw.Path;
     QTabItem tab = new QTabItem(QTUtility2.MakePathDisplayText(path, false), path, tabControl1);
     tab.NavigatedTo(path, idlw.IDL, -1);
     tab.ToolTipText = QTUtility2.MakePathDisplayText(path, true);
     AddInsertTab(tab);
     return tab;
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:8,代碼來源:QTTabBarClass.cs

示例15: tabControl1_MouseDown

 private void tabControl1_MouseDown(object sender, MouseEventArgs e) {
     QTabItem tabMouseOn = (QTabItem)tabControl1.GetTabMouseOn();
     DraggingTab = null;
     if(tabMouseOn != null) {
         if(e.Button == MouseButtons.Left) {
             NowTabDragging = true;
             DraggingTab = tabMouseOn;
         }
         else if(e.Button == MouseButtons.Right) {
             ContextMenuedTab = tabMouseOn;
         }
     }
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:13,代碼來源:QTTabBarClass.cs


注:本文中的QTTabBarLib.QTabItem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。