internal override void Serialize(FRWriter writer, string prefix, FormatBase format) { base.Serialize(writer, prefix, format); NumberFormat c = format as NumberFormat; if (c == null || UseLocale != c.UseLocale) { writer.WriteBool(prefix + "UseLocale", UseLocale); } if (c == null || DecimalDigits != c.DecimalDigits) { writer.WriteInt(prefix + "DecimalDigits", DecimalDigits); } if (!UseLocale) { if (c == null || DecimalSeparator != c.DecimalSeparator) { writer.WriteStr(prefix + "DecimalSeparator", DecimalSeparator); } if (c == null || GroupSeparator != c.GroupSeparator) { writer.WriteStr(prefix + "GroupSeparator", GroupSeparator); } if (c == null || NegativePattern != c.NegativePattern) { writer.WriteInt(prefix + "NegativePattern", NegativePattern); } } }
internal virtual void Serialize(FRWriter writer, string prefix, FormatBase format) { if (format.GetType() != GetType()) { writer.WriteStr("Format", Name); } }
/// <summary> /// Removes the specified object from the collection. /// </summary> /// <param name="value">Object to remove.</param> public void Remove(FormatBase value) { if (Contains(value)) { List.Remove(value); } }
/// <summary> /// Inserts an object into this collection at the specified index. /// </summary> /// <param name="index">The zero-based index at which value should be inserted.</param> /// <param name="value">The object to insert.</param> public void Insert(int index, FormatBase value) { if (value != null) { List.Insert(index, value); } }
/// <summary> /// Adds an object to the end of this collection. /// </summary> /// <param name="value">Object to add.</param> /// <returns>Index of the added object.</returns> public int Add(FormatBase value) { if (value == null) { return(-1); } return(List.Add(value)); }
/// <inheritdoc/> public void Deserialize(FRReader reader) { Clear(); while (reader.NextItem()) { FormatBase format = reader.Read() as FormatBase; Add(format); } }
internal override void Serialize(FRWriter writer, string prefix, FormatBase format) { base.Serialize(writer, prefix, format); CustomFormat c = format as CustomFormat; if (c == null || Format != c.Format) { writer.WriteStr(prefix + "Format", Format); } }
internal override void Serialize(FRWriter writer, string prefix, FormatBase format) { base.Serialize(writer, prefix, format); BooleanFormat c = format as BooleanFormat; if (c == null || TrueText != c.TrueText) { writer.WriteStr(prefix + "TrueText", TrueText); } if (c == null || FalseText != c.FalseText) { writer.WriteStr(prefix + "FalseText", FalseText); } }
/// <summary> /// Determines whether an element is in the collection. /// </summary> /// <param name="value">The object to locate in the collection.</param> /// <returns><b>true</b> if object is found in the collection; otherwise, <b>false</b>.</returns> public bool Contains(FormatBase value) { return(List.Contains(value)); }
/// <summary> /// Returns the zero-based index of the first occurrence of an object. /// </summary> /// <param name="value">The object to locate in the collection.</param> /// <returns>The zero-based index of the first occurrence of value within the entire collection, if found; /// otherwise, -1.</returns> public int IndexOf(FormatBase value) { return(List.IndexOf(value)); }