private void _initialTab() { _knavTab.ToolTips.AllowButtonSpecToolTips = true; _knavTab.ToolTips.AllowPageToolTips = true; _knavTab.Paint += _knavTab_Paint; _knavTab.MouseWheel += _knavTab_MouseWheel; btnspecRightSplit.Enabled = ButtonEnabled.False; btnspecAdd.Click += BtnspecAdd_Click; TabOperator.setTabItemContextMenu(_kctxmenuTabItem); _handleTabItemContextMenuClick(); }
private void MainForm_Resize(object sender, EventArgs e) { TabOperator.adjustTab(_knavTab); }
private void BtnspecAdd_Click(object sender, EventArgs e) { KryptonPage page = TabOperator.insert(newModel(), _knavTab); _knavTab.SelectedPage = page; }
private void Cm_Click(object sender, EventArgs e) { var page = _kctxmenuTabItem.Tag as KryptonPage; _kctxmenuTabItem.Tag = null; if (page == null) { return; } var index = TabOperator.getPageIndex(page, _knavTab); if (index == -1) { return; } var model = TabOperator.getTabItemModel(page); var cm = sender as KryptonContextMenuItem; var tag = cm.Tag + ""; switch (tag) { case "reload": break; case "collection": break; case "insertBefore": TabOperator.insert(newModel(), _knavTab, index); break; case "insertAfter": index = index + 1 >= _knavTab.Pages.Count ? -1 : index + 1; TabOperator.insert(newModel(), _knavTab, index); break; case "close": TabOperator.remove(model, _knavTab); break; case "closeOther": TabOperator.removeOther(page.UniqueName, _knavTab); break; case "closeLeft": TabOperator.removeLeft(page.UniqueName, _knavTab); break; case "closeRight": TabOperator.removeRight(page.UniqueName, _knavTab); break; case "closeAll": TabOperator.removeAll(_knavTab); break; case "exit": Application.Exit(); break; } }
private void _knavTab_Paint(object sender, PaintEventArgs e) { TabOperator.adjustTab(_knavTab); }