internal Save(string folder, string name) { Id = Guid.NewGuid(); _file = folder + "/" + Id; File.Create(_file + ".id").Close(); Invalid = false; SaveMetadata = new SaveMetadata(_file, DateTime.Now, name); SaveData = new SaveData(_file); }
internal Save(string folder, Guid id) { Id = id; _file = folder + "/" + Id; if (!File.Exists(_file + ".id")) { Invalid = true; return; } try { SaveMetadata = new SaveMetadata(_file); SaveData = new SaveData(_file); Invalid = false; } catch (Exception e) { ErrorWindow.ShowException(e); Invalid = true; } }