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

VerifyTemplatesDirectoryExists() публичный Метод

public VerifyTemplatesDirectoryExists ( ) : bool
Результат bool
        public bool VerifyTemplatesDirectoryExists()
        {
            if (!Directory.Exists(_agsEditor.TemplatesDirectory))
            {
                try
                {
                    Directory.CreateDirectory(_agsEditor.TemplatesDirectory);
                }
                catch (UnauthorizedAccessException ex)
                {
                    this.ShowMessage("The Templates directory was missing and could not be created. AGS may not be installed properly or you may not have the appropriate permissions to run it." + Environment.NewLine + ex.Message, MessageBoxIcon.Error);
                    return false;
                }
            }
            return true;
        }
GUIController