Giter Site home page Giter Site logo

kingforms's Introduction

KingForms

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.

Quickstart

Get it on NuGet:

PM> Install-Package KingForms

Improved application lifecycle / application context

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:

An app that is restricted to a single instance:

ApplicationContextBuilder.Create()
    .WithMainForm<MainForm>()
    .RestrictToSingleInstance("unique-mutex-name-for-your-app")
    .Run();

An app that has some async initialization and a splash form:

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.

An app with a splash form, dependency injection, and multiple forms:

ApplicationContextBuilder.Create()
    .WithSplashForm(() => new SplashForm(ProgressBarStyle.Continuous), new DemoInitializer())
    .WithMainForms<IServiceProvider>(services => new Form[] {
        services.GetService<MainForm1>(),
        services.GetService<MainForm2>(),
        services.GetService<MainForm3>(),
    })
    .Run();

License and copyright

Copyright Matthew King. Distributed under the MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.