/// <summary> /// 创建顶部 /// </summary> protected void CreateTop() { int nIndex = 0; foreach (ProgramInfo mInfo in m_ProgramList) { ServerControl mControl = new ServerControl(); mControl.SetServerInfo(mInfo, StartServer); mControl.SetServerState(false); mControl.Top = nIndex * (mControl.Bottom - mControl.Top); mControl.Left = (this.mServerList.Width - mControl.Width) / 2; this.mServerList.Controls.Add(mControl); m_ControlList.Add(mControl); ++nIndex; } }