Get the XML file extension from the preliminary configuration

This commit is contained in:
Michael Becker 2015-09-08 09:13:37 -04:00
parent 90dccc9578
commit 1388d953dc
2 changed files with 4 additions and 2 deletions

View File

@ -162,9 +162,10 @@ namespace UniversalEditor.UserInterface.WindowsForms
"Configuration"
});
// FIXME: refactor this into a single XML configuration file loader at the beginning of engine launch
if (System.IO.Directory.Exists(configurationPath))
{
string[] fileNames = System.IO.Directory.GetFiles(configurationPath, "*.uexml");
string[] fileNames = System.IO.Directory.GetFiles(configurationPath, System.Configuration.ConfigurationManager.AppSettings["UniversalEditor.Configuration.ConfigurationFileNameFilter"]);
XMLPropertyListDataFormat xmpl = new XMLPropertyListDataFormat();
foreach (string fileName in fileNames)

View File

@ -175,6 +175,7 @@ namespace UniversalEditor.Common
return dfr2.Priority.CompareTo(dfr1.Priority);
}
// FIXME: refactor this into a single XML configuration file loader at the beginning of engine launch
private static void InitializeFromXML(ref List<ObjectModelReference> listObjectModels, ref List<DataFormatReference> listDataFormats, ref List<ProjectType> listProjectTypes, ref List<DocumentTemplate> listDocumentTemplates, ref List<ProjectTemplate> listProjectTemplates)
{
System.Collections.Specialized.StringCollection paths = new System.Collections.Specialized.StringCollection();
@ -183,7 +184,7 @@ namespace UniversalEditor.Common
foreach (string path in paths)
{
string[] XMLFileNames = null;
XMLFileNames = System.IO.Directory.GetFiles(path, "*.uexml", System.IO.SearchOption.AllDirectories);
XMLFileNames = System.IO.Directory.GetFiles(path, System.Configuration.ConfigurationManager.AppSettings["UniversalEditor.Configuration.ConfigurationFileNameFilter"], System.IO.SearchOption.AllDirectories);
foreach (string fileName in XMLFileNames)
{
try