/// <inheritdoc/> public override FormatBase Clone() { CurrencyFormat result = new CurrencyFormat(); result.UseLocale = UseLocale; result.DecimalDigits = DecimalDigits; result.DecimalSeparator = DecimalSeparator; result.GroupSeparator = GroupSeparator; result.CurrencySymbol = CurrencySymbol; result.PositivePattern = PositivePattern; result.NegativePattern = NegativePattern; return(result); }
/// <inheritdoc/> public override bool Equals(object obj) { CurrencyFormat f = obj as CurrencyFormat; return(f != null && UseLocale == f.UseLocale && DecimalDigits == f.DecimalDigits && DecimalSeparator == f.DecimalSeparator && GroupSeparator == f.GroupSeparator && CurrencySymbol == f.CurrencySymbol && PositivePattern == f.PositivePattern && NegativePattern == f.NegativePattern); }
internal override void Serialize(FRWriter writer, string prefix, FormatBase format) { base.Serialize(writer, prefix, format); CurrencyFormat c = format as CurrencyFormat; 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 || CurrencySymbol != c.CurrencySymbol) { writer.WriteStr(prefix + "CurrencySymbol", CurrencySymbol); } if (c == null || PositivePattern != c.PositivePattern) { writer.WriteInt(prefix + "PositivePattern", PositivePattern); } if (c == null || NegativePattern != c.NegativePattern) { writer.WriteInt(prefix + "NegativePattern", NegativePattern); } } }