Beispiel #1
0
        private void processStartupConfigFile()
        {
            string startupConfigDir = $"{ directoryHelper.GetRootProjectDirectory() }\\iCreator\\Configuration\\StartupConfig.json";

            if (!File.Exists(startupConfigDir))
            {
                createStartupConfigFile(startupConfigDir);
            }
            else
            {
                startupConfig = JsonConvert.DeserializeObject <StartupConfig>(
                    File.ReadAllText(startupConfigDir));
            }
        }
Beispiel #2
0
        public void ProcessDirectories()
        {
            enqueueDirectories();

            createDirectoriesWithinDirectory(directoryHelper.GetRootProjectDirectory());

            createDirectoriesWithinDirectory(Directory.GetCurrentDirectory());
        }
Beispiel #3
0
        public static void ChangeScene(string sceneName)
        {
            ILogger          logger          = ContainerProvider.Scope.Resolve <ILogger>();
            IDirectoryHelper directoryHelper = ContainerProvider.Scope.Resolve <IDirectoryHelper>();

            string viewFilePath       = $"{ Directory.GetCurrentDirectory() }\\iCreator\\Views\\{ sceneName }.json";
            string controllerFilePath = $"{ directoryHelper.GetRootProjectDirectory() }iCreator\\Controllers\\{ sceneName }Controller.cs";

            if (viewExists(viewFilePath, controllerFilePath))
            {
                switchScene(viewFilePath);
            }
            else
            {
                logger.Info($"{ sceneName } does not exist.");
            }
        }