private void mdiManager_TabDisplaying(object sender, MdiTabEventArgs e) { if (e.Tab.Key.Equals(MdiTabKeys.Search)) { var p = (SearchPresenter)e.Tab.Tag; p.SetCurrentDatabase(); } }
protected override void OnTabActivated(MdiTabEventArgs e) { base.OnTabActivated(e); Control smartPart = this.GetSmartPart(e.Tab); if (null != smartPart) { this.Activate(smartPart); } }
void OnTabDisplaying(object sender, MdiTabEventArgs e) { // unhook the event this.mdiManager.TabDisplaying -= new MdiTabEventHandler(this.OnTabDisplaying); MdiTabGroup tabGroup = this.GetTabGroup(this.mdiManager.TabGroups); // if there is no tab group with that name and this tab is in a // new tabgroup, name the tabgroup with the specified key if (tabGroup == null && e.Tab.TabGroup.Tabs.Count == 1) { e.Tab.TabGroup.Key = this.groupKey; } else if (tabGroup != null) { // if a tabgroup was specified, move it to that group e.Tab.MoveToGroup(tabGroup); } }
protected override void OnTabClosed(MdiTabEventArgs e) { base.OnTabClosed(e); // TODO handle - this could happen because they closed us or the programmer did // when the tab/form is closed then remove our // references to it. if the tab was just hidden // then we don't want to fire the closed event if (e.Tab.Form == null || e.Tab.Form.IsDisposed) { Control ctrl = this.GetSmartPart(e.Tab); if (null != ctrl) { this.RemoveSmartPart(ctrl); } } }
void PanelManager_MdiTabDoubleClick(object sender, MdiTabEventArgs e) { if(PropertyLib._AppProperties.TabDoubleClick2Close) e.Tab.Form.Close(); }
private void PanelManager_MdiTabCreated(object sender, MdiTabEventArgs e) { PropertyLib._AppProperties.CurrentOpenning = Utility.sDbnull(e.Tab.Form.Tag, "-1"); if (!lstTab.Contains(e.Tab.Form.Tag.ToString())) lstTab.Add(e.Tab.Form.Tag.ToString()); if (!dic.ContainsKey(e.Tab.Form.Tag.ToString())) dic.Add(e.Tab.Form.Tag.ToString(), e.Tab); }
private void PanelManager_MdiTabClick(object sender, MdiTabEventArgs e) { try { PropertyLib._AppProperties.CurrentOpenning = Utility.sDbnull(e.Tab.Form.Tag, "-1"); } catch { } }
// // Event Handlers // private void mdiManager_InitializeTab(object sender, MdiTabEventArgs e) { e.Tab.Key = e.Tab.Form.Text; e.Tab.Tag = e.Tab.Form.Tag; }
private void ImmasTabbedMdiManager1_TabSelected(object sender, MdiTabEventArgs e) { this.ExplorerUpdate((sender as ImmasTabbedMdiManager).Tag, e.Tab.TextResolved); }
private void tabbedMdiManager_TabDisplayed(object sender, MdiTabEventArgs e) { _childForms.Add(e.Tab.Form); //将子窗体添加到缓存中 }