Beispiel #1
0
        public void SwitchUserInterfacePiece(FormPiece piece)
        {
            FormPiece currentPiece = this.currentPiece;

            this.currentPiece      = piece;
            this.currentPiece.Dock = DockStyle.Fill;
            this.SuspendLayout();
            this.Controls.Add((Control)this.currentPiece);
            if (currentPiece != null)
            {
                this.Controls.Remove((Control)currentPiece);
                currentPiece.Dispose();
            }
            this.ClientSize = this.currentPiece.ClientSize;
            this.ResumeLayout(false);
            this.PerformLayout();
        }
 public void SwitchUserInterfacePiece(FormPiece piece)
 {
     FormPiece currentPiece = null;
     currentPiece = this.currentPiece;
     this.currentPiece = piece;
     this.currentPiece.Dock = DockStyle.Fill;
     base.SuspendLayout();
     base.Controls.Add(this.currentPiece);
     if (currentPiece != null)
     {
         base.Controls.Remove(currentPiece);
         currentPiece.Dispose();
     }
     base.ClientSize = this.currentPiece.ClientSize;
     base.ResumeLayout(false);
     base.PerformLayout();
 }