public void Save(DocumentWriter writer) { writer.Write(items.Count); foreach (var pair in items) { writer.Write(pair.Key); if (pair.Value is bool) { writer.Write("bool"); writer.Write((bool)pair.Value); } else if (pair.Value is int || pair.Value is System.Enum) { writer.Write("int"); writer.Write((int)pair.Value); } else if (pair.Value is Color) { writer.Write("color"); writer.Write((Color)pair.Value); } } }
public void Save(DocumentWriter writer) { writer.Write(Name); Style.Save(writer); writer.Write(Visible); }
public void Save(DocumentWriter writer) { writer.Write(Name); writer.Write(FontFamily); writer.Write((int)FontStyle); }