Ejemplo n.º 1
0
        private void LoadData()
        {
            //Games
            DataManagers.GameManager.TryLoad();
            //Reloads list of variables used to format paths
            Utils.TryReloadPathFormatterVars();

            //Load application list
            if (!DataManagers.AppManager.TryLoad())
            {
                AppUtils.CreateApplications();
            }

            //Try to load data settings
            if (!Config.TryReadInt("LoadDataAtStartup", out var loadAtStartup))
            {
                loadAtStartup = 0;
                Config.AddVariable("LoadDataAtStartup", 0);
            }

            //Load less important data on startup
            if (loadAtStartup == 1)
            {
                DataManagers.TemplateManager.Load();
                DataManagers.TutorialManager.Load();
                ContentManager.LoadContentGroups();
            }

            if (!Config.HasVariable("LauncherType"))
            {
                Config.AddVariable("LauncherType", 2);
            }
        }
Ejemplo n.º 2
0
        private void LoadData()
        {
            int LoadAtStartup, useNewLauncher;

            //Game profiles
            DataManagers.ProfileManager.TryLoad();
            //Reloads list of variables used to format paths
            Utils.TryReloadPathFormatterVars();

            //Load application list
            if (!DataManagers.AppManager.TryLoad())
            {
                AppUtils.CreateApplications();
            }

            //Try to load data settings
            if (!Config.TryReadInt("LoadDataAtStartup", out LoadAtStartup))
            {
                LoadAtStartup = 0;
                Config.AddVariable("LoadDataAtStartup", 0);
            }

            //Load less important data on startup
            if (LoadAtStartup == 1)
            {
                DataManagers.TemplateManager.Load();
                DataManagers.TutorialManager.Load();
                ContentManager.LoadContentGroups();
            }

            if (!Config.TryReadInt("UseNewLauncher", out useNewLauncher))
            {
                useNewLauncher = 0;
                Config.AddVariable("UseNewLauncher", 1);
            }
        }