This is an experimental project where I iterate on some ideas that will improve the WinForms developer experience.
This is not necessarily the final project name, and some ideas may get spun off to become their own project/package.
The best way to see the functionality is to have a look at the samples directory.
Get it on NuGet:
PM> Install-Package KingForms
One thing I'm trying to work on is the aesthetics of application lifecycle management and the ApplicationContext class.
I've added an ApplicationContextBuilder
that allows some fancy application bootstrapping.
Here are some examples:
ApplicationContextBuilder.Create()
.WithMainForm<MainForm>()
.RestrictToSingleInstance("unique-mutex-name-for-your-app")
.Run();
ApplicationContextBuilder.Create()
.WithSplashForm<SplashForm, DemoInitializer>()
.WithMainForm<MainForm>()
.Run();
Note: SplashForm and DemoInitializer need to be implemented to suit your needs - have a look at the samples for examples.
ApplicationContextBuilder.Create()
.WithSplashForm(() => new SplashForm(ProgressBarStyle.Continuous), new DemoInitializer())
.WithMainForms<IServiceProvider>(services => new Form[] {
services.GetService<MainForm1>(),
services.GetService<MainForm2>(),
services.GetService<MainForm3>(),
})
.Run();
Copyright Matthew King. Distributed under the MIT License