I recognize this may be a duplicate post, but I want to make sure I ask this question clearly and get an answer based on my wording.
I have a collection of forms which inherit from a common visual element: MainVisualForm. This element provides me a way to know when the form is advancing of stepping backwards. What form comes next in the sequence is dependent on user action.
I currently have this code for one such event as I am testing:
form.OnNextForm += (f, ev) =>
{
Parameters.Vehicle = ((VehicleForm)f).SelectedVehicle;
//FormStack.Push(Parameters.Vehicle == Vehicle.SUV
// ? new KeyValuePair<Type, IFormActionBehvaior>(typeof(EntertainmentForm), null)
// : new KeyValuePair<Type, IFormActionBehvaior>(typeof(ColorForm), null));
};
This assignment is followed immediately by ShowDialog() which blocks the user until the Dialog form is closed.
The question is: After the form closes does .NET wait for the EventHandler to complete before running the code which directly follows ShowDialog() or is the handler handled by a different thread?
Thanks very much in advance