/// <summary> /// 选择计划类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void PlanComb_SelectedIndexChanged(object sender, EventArgs e) { if (this.splitContainer1.Panel1.Controls.Count != 0) { this.splitContainer1.Panel1.Controls.RemoveAt(0); } this.PlanDGV.DataSource = null; this.ProjectComb.SelectedIndex = -1; TypeNme = this.PlanComb.SelectedItem.ToString(); switch (TypeNme) { case "分段施工计划": blockcontrol = new BlockContructionControl(); blockcontrol.Dock = DockStyle.Fill; this.splitContainer1.Panel1.Controls.Add(blockcontrol); break; case "托盘材料纳期计划": traymaterialcontrol = new TRAY_MATERIAL_DELIVERYTIMEControl(); traymaterialcontrol.Dock = DockStyle.Fill; this.splitContainer1.Panel1.Controls.Add(traymaterialcontrol); break; case "托盘预制计划": traypreplancontrol = new TRAY_PREPLANControl(); traypreplancontrol.Dock = DockStyle.Fill; this.splitContainer1.Panel1.Controls.Add(traypreplancontrol); break; case "托盘安装计划": trayinstallcontrol = new TRAY_INSTALLATIONControl(); trayinstallcontrol.Dock = DockStyle.Fill; this.splitContainer1.Panel1.Controls.Add(trayinstallcontrol); break; default: break; } }