Ejemplo n.º 1
0
 /// <summary>
 /// Loads the project and all of its associated data objects.
 /// </summary>
 public void Load()
 {
     using (DatabaseTransaction <QuartzContext> transaction = new DatabaseTransaction <QuartzContext>(this.Connection))
     {
         this.Elements.AddOrUpdate(transaction.GetAll <Element>());
         this.ElementMatchups.AddOrUpdate(transaction.GetAll <ElementMatchup>());
     }
     Directory.CreateDirectory(Path.Combine(this.FilePath, "Images"));
     App.Preferences.RecentlyOpenedProjects.AddOrUpdate(new RecentItem(this.Name ?? "", this.FilePath, DateTime.Now));
     App.Preferences.Save();
     this.IsSaved = true;
 }