public static StatTemplate Load(string filename) { var template = new StatTemplate(filename); if (!template._isValid) { return(null); } return(template); }
private TemplateManager() { _templates = Directory.GetFiles(s_templatePath) .OrderBy(f => Path.GetFileName(f)) .ToDictionary(f => TemplateManager.NormalizeTemplateFilename(f), f => StatTemplate.Load(f)); _templates.RemoveWhere(i => i.Value == null); if (!_templates.ContainsKey(s_defaultTemplateFileName)) { DialogManager.Instance.ShowMessageAsync( this.L("stat_inspector", "missing_default_template_message_title"), this.L("stat_inspector", "missing_default_template_message")); } }