} // SetValue public void AppendFromData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode) { if (parentEntry == null) { return; } if (appendMode == XINI.AppendModes.Read) { if (parentEntry.Children.Count > 0) { foreach (XINI.EntryItem childEntry in parentEntry.Children) { PropertyItem newItem = new PropertyItem(); newItem.AppendFromData(childEntry, appendMode); base.Add(newItem); } //childEntry } } else if (appendMode == XINI.AppendModes.Save) { if (base.Count > 0) { for (int index = 0; index < base.Count; index++) { XINI.EntryItem childEntry = parentEntry.AppendChildEntry("Property", appendMode); base[index].AppendFromData(childEntry, appendMode); } // index } } } // AppendFromData
} //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
} //Move function public override void AppendFromData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode) { if (parentEntry == null) { return; } if (appendMode == XINI.AppendModes.Read) { if (parentEntry.Children.Count > 0) { foreach (XINI.EntryItem childEntry in parentEntry.Children) { this.Add(childEntry.Name, childEntry.Value); } //for childEntry } } else if (appendMode == XINI.AppendModes.Save) { if (base.Count > 0) { for (int index = 0; index < base.Count; index++) { parentEntry.AddChild(base[index].Name, base[index].Value); } //for index } } } //AppendFromData function
} //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
public override void AppendFromData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode) { if (appendMode == XINI.AppendModes.Read) { this.Name = parentEntry.Name; this.Value = parentEntry.Value; } else if (appendMode == XINI.AppendModes.Save) { parentEntry.Name = this.Name; parentEntry.Value = this.Value; } } // AppendFromData
} //GetValue function public override void AppendFromData(XINI.EntryItem parentEntry, XINI.AppendModes appendMode) { this.mLines.AppendFromData(parentEntry, appendMode); } //AppendFromData function
} //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