AGS.Editor.GUIController.ShowNewGameWizard C# (CSharp) Метод

ShowNewGameWizard() приватный Метод

private ShowNewGameWizard ( ) : bool
Результат bool
        private bool ShowNewGameWizard()
        {
            bool createdSuccessfully = false;
            List<GameTemplate> templates = new List<GameTemplate>();
            foreach (string fileName in Utilities.GetDirectoryFileList(_agsEditor.TemplatesDirectory, "*.agt"))
            {
                GameTemplate template = Factory.NativeProxy.LoadTemplateFile(fileName);
                if (template != null)
                {
                    templates.Add(template);
                }
            }

            List<WizardPage> pages = new List<WizardPage>();
            StartNewGameWizardPage templateSelectPage = new StartNewGameWizardPage(templates);
            StartNewGameWizardPage2 gameNameSelectPage = new StartNewGameWizardPage2(_agsEditor.Preferences.NewGamePath);
            pages.Add(templateSelectPage);
            pages.Add(gameNameSelectPage);

            WizardDialog dialog = new WizardDialog("Start New Game", "This wizard will guide you through the process of creating a new game.", pages);
            DialogResult result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                createdSuccessfully = CreateNewGame(gameNameSelectPage.GetFullPath(), gameNameSelectPage.NewGameName, templateSelectPage.SelectedTemplate);
            }

            dialog.Dispose();
            return createdSuccessfully;
        }
GUIController