picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.53k stars 318 forks source link

WinForms: Handle MainForm changes #2598

Closed cyanfish closed 7 months ago

cyanfish commented 7 months ago

This allows the former MainForm to be closed without the application shutting down.

Running with a swf.ApplicationContext with a form is equivalent to just running with the form (reference source), and allows that form to be changed later.

I'm pretty sure the MainForm.Loaded check is unnecessary as the form should always be loaded when it gets to this point of the Eto.Application.Run flow.

cwensley commented 7 months ago

Awesome! Thanks for the contribution.