public void AddXmlDoc(string path) { string newFile = Path.Combine(DataFolder, DocumentsFolder, Path.GetFileName(path)); if (!File.Exists(newFile)) { File.Copy(path, newFile); } XmlDocuments.Add(new XMLDoc(newFile, this)); }
public void AddXmlDoc(IXMLDocument doc) { string newFile = Path.Combine(DataFolder, DocumentsFolder, Path.GetFileName(doc.FullPath)); if (!File.Exists(newFile)) { File.Copy(doc.FullPath, newFile); } doc.FullPath = newFile; XmlDocuments.Add(doc); }