private void FormSubject1_Load(object sender, EventArgs e) { if (SystemConfig._examType == 0) { label1.Text = string.Format("{0}年驾驶员理论考试最新学习资料--{1}", SystemConfig.FitYear, "基础知识理论考试(科目一)"); } else if (SystemConfig._examType == 1) { label1.Text = string.Format("{0}年驾驶员理论考试最新学习资料--{1}", SystemConfig.FitYear, "安全文明驾驶模拟考试(科目四)"); } else if (SystemConfig._examType == 2) { label1.Text = string.Format("{0}年驾驶员理论考试最新学习资料--{1}", SystemConfig.FitYear, "驾驶员驾驶资格恢复考试"); } else if (SystemConfig._examType == 3) { label1.Text = string.Format("{0}年驾驶员理论考试最新学习资料--{1}", SystemConfig.FitYear, "驾驶员消分考试"); } FormSimulationWelcom form = new FormSimulationWelcom(); form.TopLevel = false; form.Parent = panelMain; form.Dock = DockStyle.Fill; form.Show(); }
private void buttonSimulation_Click(object sender, EventArgs e) { if (activeFrom != null) { Type classType = activeFrom.GetType(); if (classType.Name == "FormSimulationWelcom") { return; } activeFrom.Close(); } FormSimulationWelcom simulaForm = new FormSimulationWelcom(); simulaForm.TopLevel = false; simulaForm.BringToFront(); simulaForm.Dock = DockStyle.Fill; simulaForm.Parent = this.panelMain; simulaForm.SetParentControl(panelMain); activeFrom = simulaForm; simulaForm.Show(); }
private void FormSubject4_Load(object sender, EventArgs e) { FormSimulationWelcom form = new FormSimulationWelcom(); form.TopLevel = false; form.Parent = panelMain; form.Dock = DockStyle.Fill; form.Show(); }