Beispiel #1
0
        public void Load(string projectFilePath = null)
        {
            // heuristic behavior: always try to go up and search for a citproj file
            // if found, ignore the one saved in app data, since we're opening citrus directory
            // related to found game project as a submodule
            var config = WorkspaceConfig.Load();

            if (projectFilePath != null)
            {
                Open(projectFilePath);
            }
            else if (Toolbox.TryFindCitrusProjectForExecutingAssembly(out projectFilePath))
            {
                Open(projectFilePath);
            }
            var projectConfig = config.GetProjectConfig(projectFilePath);

            The.UI.LoadFromWorkspaceConfig(config, projectConfig);
            var citrusVersion = CitrusVersion.Load();

            if (citrusVersion.IsStandalone)
            {
                Console.WriteLine($"Welcome to Citrus. Version {citrusVersion.Version}, build number: {citrusVersion.BuildNumber}");
            }
            BenchmarkEnabled = config.BenchmarkEnabled;
            if (projectConfig != null)
            {
                BundlePickerVisible = projectConfig.BundlePickerVisible;
            }
#pragma warning disable CS4014
            Orange.Updater.CheckForUpdates();
#pragma warning restore CS4014
            LoadCacheSettings();
        }