} //SaveToFile public void AppendData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode, string patternFile) { parentEntry.AppendChildEntryValue("Seed", ref this.Seed, appendMode, 0, 0); parentEntry.AppendChildEntryValue("Subset ID", ref this.SubsetID, appendMode, "", ""); parentEntry.AppendChildEntryValue("Ignore Boundries", ref this.IgnoreBoundries, appendMode, false, false); parentEntry.AppendChildEntryValue("Include Rooms", ref this.IncludeRooms, appendMode, true, true); parentEntry.AppendChildEntryValue("Random Rooms Percentage", ref this.RandomRoomsPercentage, appendMode, 0.1F); if (appendMode == XINI.AppendModes.Read) { this.Pattern = null; if (System.IO.File.Exists(patternFile)) { this.Pattern = new System.Drawing.Bitmap(patternFile); } } else if (appendMode == XINI.AppendModes.Save) { if (System.IO.File.Exists(patternFile)) { System.IO.File.Delete(patternFile); } if (this.Pattern != null) { this.Pattern.Save(patternFile); } } } //AppendData
} //SaveToFile public void AppendData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode, string patternFile) { parentEntry.AppendChildEntryValue("Seed", ref this.Seed, appendMode, 0, 0); parentEntry.AppendChildEntryValue("Subset ID", ref this.SubsetID, appendMode, "", ""); parentEntry.AppendChildEntryValue("Ignore Boundries", ref this.IgnoreBoundries, appendMode, false, false); parentEntry.AppendChildEntryValue("Include Rooms", ref this.IncludeRooms, appendMode, true, true); parentEntry.AppendChildEntryValue("Include Passages", ref this.IncludePassages, appendMode, true, true); parentEntry.AppendChildEntryEnumValue <UnconnectedTilesActions>("Unconnected Tiles Action", ref this.UnconnectedTilesAction, appendMode, UnconnectedTilesActions.ConnectAll.ToString()); if (appendMode == XINI.AppendModes.Read) { this.Pattern = null; if (System.IO.File.Exists(patternFile)) { this.Pattern = new Bitmap(patternFile); } } else if (appendMode == XINI.AppendModes.Save) { if (System.IO.File.Exists(patternFile)) { System.IO.File.Delete(patternFile); } if (this.Pattern != null) { this.Pattern.Save(patternFile); } } } //AppendData
} //Constructor public override void AppendFromData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode) { parentEntry.AppendChildEntryValue("Name", ref this.Name, appendMode); parentEntry.AppendChildEntryValue("Value", ref this.Value, appendMode); } //AppendFromData function