internal static EM_AppContext Create_EM_AppContext(EM_UI_MainForm countryMainForm)
        {
            singleton  = new EM_AppContext(countryMainForm);
            _emptyForm = countryMainForm;

            //show the dialog where the user can set the default pathes, if the folder to the country-xml-files does not exist
            if (!Directory.Exists(EMPath.Folder_Countries(EM_AppContext.FolderEuromodFiles)))
            {
                ConfigurePathsForm configurePathsForm = new ConfigurePathsForm();
                configurePathsForm.ShowDialog();
            }
            singleton.SetBrand();   // allow UI to show another look, i.e. present a brand alternative to EUROMOD

            DefinitionAdmin.Init(); // initialise the common-lib's description of functions and parametes (once for the life-time of the lib)
            return(singleton);
        }
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            EM_UI_MainForm mainForm = null;

            if (args.Length == 1)
            {
                mainForm = new EM_UI_MainForm(args[0]);
            }
            else
            {
                mainForm = new EM_UI_MainForm();
            }

            EM_AppContext appContext = EM_AppContext.Create_EM_AppContext(mainForm);

            Application.Run(appContext);
        }