private void frmMDIMain_MdiChildActivate(object sender, EventArgs e) { try { ToolStripManager.RevertMerge(this.toolStripMDIMain); IMergeToolStrip mdiChildMergeToolStrip = ActiveMdiChild as IMergeToolStrip; if (mdiChildMergeToolStrip != null) { ToolStripManager.Merge(mdiChildMergeToolStrip.ChildToolStrip, toolStripMDIMain); } ICallToolStrip mdiChildCallToolStrip = ActiveMdiChild as ICallToolStrip; if (mdiChildCallToolStrip != null) { mdiChildCallToolStrip.PropertyChanged -= new PropertyChangedEventHandler(mdiChildCallToolStrip_PropertyChanged); mdiChildCallToolStrip.PropertyChanged += new PropertyChangedEventHandler(mdiChildCallToolStrip_PropertyChanged); mdiChildCallToolStrip_PropertyChanged(mdiChildCallToolStrip, new PropertyChangedEventArgs("IsDirty")); } } catch (Exception exception) { GlobalExceptionHandler.ShowExceptionMessageBox(this, exception); } }
private void frmMDIMain_MdiChildActivate(object sender, EventArgs e) { ToolStripManager.RevertMerge(this.toolStripMDIMain); IMergeToolStrip mergeToolStrip = ActiveMdiChild as IMergeToolStrip; if (mergeToolStrip != null) { ToolStripManager.Merge(mergeToolStrip.ChildToolStrip, toolStripMDIMain); } }