Ejemplo n.º 1
0
    static void Main()
    {
        // Old .net versions
        //Application.SetHighDpiMode(HighDpiMode.SystemAware);
        //Application.EnableVisualStyles();
        //Application.SetCompatibleTextRenderingDefault(false);

        // new in .net 6
        ApplicationConfiguration.Initialize();

        ApplicationContext applicationContext = new ApplicationContext();

        Store appStore = new Store(new FactoryViewsWinForms());

        #region Splash

        SplashForm splashForm = new SplashForm(appStore);
        splashForm.Show();
        Application.DoEvents();

        #endregion

        LoadAppStore(appStore);

        #region Demo & lab

        // applicationContext.MainForm = new LabForm(appStore);

        #endregion

        #region Normal start

        var knoteManagment = new KNoteManagmentComponent(appStore);
        knoteManagment.Run();
        applicationContext.MainForm = (Form)knoteManagment.View;

        #endregion

        splashForm.Close();

        Application.Run(applicationContext);
    }