Пример #1
0
 private void ChangeLayout(bool MdiActive)
 {
     if (MdiActive)
     {
         this.Controls.Clear();
         this.Controls.Add(ContentPanel);
     }
     else
     {
         this.Controls.Clear();
         Border.ContentControls.Clear();
         Border.ContentControls.Add(TopPanel);
         TopPanel.SetReferenceParent(this);
         TopPanel.MinimiseVisible = false;
         Border.ContentControls.Add(ContentPanel);
         this.Controls.Add(Border);
         ContentPanel.BringToFront();
         if (this.DockHandler.Pane != null)
         {
             Border.SetReferenceParent(this.DockHandler.Pane.FloatWindow);
             this.DockHandler.Pane.FloatWindow.MaximumSize   = this.MaximumSize;
             this.DockHandler.Pane.FloatWindow.MinimumSize   = this.MinimumSize;
             this.DockHandler.Pane.FloatWindow.Size          = this.Size;
             this.DockHandler.Pane.FloatWindow.Resize       += new EventHandler(ResizeCall);
             this.DockHandler.Pane.FloatWindow.StartPosition = FormStartPosition.CenterScreen;
         }
         else
         {
             Border.SetReferenceParent(this);
         }
     }
 }