dicNameForm为一个Form的Name和Form对应的字典
Dictionary<string, Form> _dicNameForm;
private void ShowForm(string formName)
{
foreach (string key in this._dicNameForm.Keys)
{
this._dicNameForm[key].Hide();
}
this._dicNameForm[formName].TopLevel = false;
this._dicNameForm[formName].Parent = this.pnlContent;
int xPosition = (this.pnlContent.Width - this._dicNameForm[formName].Size.Width) / 2;
int yPosition = (this.pnlContent.Height - this._dicNameForm[formName].Size.Height) / 2;
this._dicNameForm[formName].Location = new Point(xPosition, yPosition);
this._dicNameForm[formName].Show();
}