/// <summary> /// Shows the correct new criteria screen when the uesr selects which type. /// </summary> private void NewCriteria_Closing(object sender, FormClosingEventArgs e) { ConditionForm C = Child.GetConditionForm(); if (C == null) { return; } // Hide closing New Criteria form, because setting "Child" to a new window // will still display the old window below it until the new child closes. Child.Visible = false; Child = C; Child.FormClosing += new FormClosingEventHandler(AddNewCriteria); Child.ShowDialog(); }