示例#1
0
        private void dockPanel_ActiveContentChanged(object sender, EventArgs e)
        {
            DockForm content = this.dockPanel.ActiveContent as DockForm;

            if (content != null)
            {
                this.ActiveView = content.View;
            }
        }
示例#2
0
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     foreach (KeyValuePair <IView, Form> pair in this.views)
     {
         DockForm dockForm = pair.Value as DockForm;
         View     view     = pair.Key as View;
         if (view != null && dockForm != null && dockForm.DockState != DockState.Document)
         {
             view.CloseReason = CloseReason.ApplicationExitCall;
             view.OnClosingHelper(dockForm, e);
         }
     }
     base.OnFormClosing(e);
 }