예제 #1
0
        private ProjectCreatorCore.EnvironmentSetting _CollectEnvironments()
        {
            ProjectCreatorCore.EnvironmentSetting readingEnvs = new ProjectCreatorCore.EnvironmentSetting();

            readingEnvs.engineRootPath = txtEnginePath.Text.Trim();
            readingEnvs.templatePath   = txtTemplatePath.Text.Trim();

            return(readingEnvs);
        }
예제 #2
0
        private void _SetInitialValues()
        {
            creatingOptions = new ProjectCreatorCore.CreationOptions();
            creatingOptions.appOrientation = ProjectCreatorCore.CreationOptions.AppOrientationType.kLandscape;
            creatingOptions.creatingScene  = ProjectCreatorCore.CreationOptions.SceneGenerationType.kEmptyScene;

            environment = new ProjectCreatorCore.EnvironmentSetting();
            environment.engineRootPath = "../..";
            environment.templatePath   = "Template";
        }
예제 #3
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (!_CheckOptions(true))
            {
                return;
            }

            ProjectCreatorCore.CreationOptions    options = _CollectOptions();
            ProjectCreatorCore.EnvironmentSetting envs    = _CollectEnvironments();

            lbliStatus.Text = "Creating project ...";

            bool isCreationSucceed = ProjectCreatorCore.ProjectCreator.CreateProject(options, envs);

            if (!isCreationSucceed)
            {
                lbliStatus.Text = "ERROR: Project creation FAILED.";
                MessageBox.Show("Error!\nAn error occured during project creation.", "Creation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            lbliStatus.Text = string.Format("Created a new Leggiero game project [{0}]", options.gameTitle);
            MessageBox.Show(string.Format("Created a new Leggiero game project [{0}]", options.gameTitle), "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }