Exemple #1
0
 public void AutoSave()
 {
     try {
         if (!string.IsNullOrEmpty(this.File) && this.HasChanges && this.autoSavedVersion != this.CircuitProject.Version)
         {
             string file = Mainframe.AutoSaveFile(this.File);
             if (!string.IsNullOrEmpty(file))
             {
                 Mainframe.DeleteFile(file);
                 this.CircuitProject.SaveSnapshot(file);
                 Mainframe.Hide(file);
             }
             this.autoSavedVersion = this.CircuitProject.Version;
         }
     } catch (Exception exception) {
         Tracer.Report("Editor.AutoSave", exception);
     }
 }