Exemplo n.º 1
0
 public virtual void Save()
 {
     if (document.File != null)
     {
         document.Save();
     }
     else
     {
         SaveAs();
     }
 }
Exemplo n.º 2
0
        public static ISinapseDocument Create(string name, string fullName, Type type)
        {
            // Creates a new instance, then save it to the disk.
            ISinapseDocument doc = Activator.CreateInstance(type, new object[] { name, new FileInfo(fullName) }) as ISinapseDocument;

            doc.Save(fullName);
            return(doc);
        }
Exemplo n.º 3
0
 /// <summary>
 ///   Saves the SinapseDocument referenced by this SinapseDocumentInfo to the disk.
 ///   If type is null, only creates an empty file.
 /// </summary>
 public void Create()
 {
     if (type == null)
     {
         File.Create(FullName);
     }
     else
     {
         // Creates a new instance, then save it to the disk.
         ISinapseDocument doc = Activator.CreateInstance(type, new object[] { Name, new FileInfo(FullName) }) as ISinapseDocument;
         doc.Save(FullName);
     }
 }