private List <string> BuildListOfAllExternalDomains() { List <string> files = new List <string>(System.IO.Directory.GetFiles(Globals.Dirs.DomainReferences, "*.xml")); for (int index = 0; index < files.Count; index++) { files[index] = DomainModel.ConvertDomainFileToDomainName(files[index]); } return(files); }
public void AddDomainReference(string domainFile) { //make sure the name has no extra directory info, is lowercase and without spaces, //and doesn't have an file extension domainFile = DomainModel.ConvertDomainFileToDomainName(domainFile); this.Include.AddDomainReference(domainFile, domainFile); //this.DomainFileReferences.Add(new DomainReference(domainFile)); //as much as I hate using messageboxes in the model, I really need to display this without //making the domain file parser stop it's loop try { this.DomainFileReferences.Add(this.ParseXmlFileReferences(domainFile)); } catch (DomainModelException exception) { System.Windows.Forms.MessageBox.Show(exception.Message); } //gotta open up the xml file and see it's guts. Then import all of those items //into this domain's lists. return; }