private void ShowStepOne() { panelMaster.Controls.Clear(); PlanAppointListControl control = new PlanAppointListControl(Database); control.Dock = DockStyle.Fill; panelMaster.Controls.Add(control); }
private void ShowStepOne() { panelMaster.Controls.Clear(); PlanAppointListControl control = new PlanAppointListControl(Database); control.Dock = DockStyle.Fill; control.ItemSelected += planAppointSelected; btnNext.Click += control.BtnNextPressed; panelMaster.Controls.Add(control); }
void planAppointSelected(object sender, ItemEventArgs e) { Text = ((PlanAppoint)e.Item).ToString(); PlanAppointListControl control = (PlanAppointListControl)sender; control.ItemSelected -= planAppointSelected; btnNext.Click -= control.BtnNextPressed; panelMaster.Controls.Clear(); PlanAppointControl control1 = new PlanAppointControl(Database, (PlanAppoint)e.Item); control1.Dock = DockStyle.Fill; btnNext.Click += control1.BtnNextClick; panelMaster.Controls.Add(control1); }