Exemple #1
0
        /*
         * Copies decimal format symbols from text object to ICU one.
         *
         * @param icu the object which receives the new values. @param dfs the
         * object which contains the new values.
         */
        private void CopySymbols(IBM.ICU.Text.DecimalFormatSymbols icu,
                                 DecimalFormatSymbols dfs)
        {
            Currency currency = dfs.GetCurrency();

            if (currency == null)
            {
                icu.SetCurrency(IBM.ICU.Util.Currency.GetInstance("XXX"));
            }
            else
            {
                icu.SetCurrency(IBM.ICU.Util.Currency.GetInstance(dfs
                                                                  .GetCurrency().GetCurrencyCode()));
            }

            icu.SetCurrencySymbol(dfs.GetCurrencySymbol());
            //icu.SetDecimalSeparator(dfs.NumberDecimalSeparator[0]);
            icu.SetDigit(dfs.GetDigit());
            //icu.SetGroupingSeparator(dfs.NumberGroupSeparator[0]);
            icu.SetInfinity(dfs.GetInfinity());
            icu.SetInternationalCurrencySymbol(dfs.GetInternationalCurrencySymbol());
            icu.SetMinusSign(dfs.GetMinusSign());
            icu.SetMonetaryDecimalSeparator(dfs.GetMonetaryDecimalSeparator());
            icu.SetNaN(dfs.GetNaN());
            icu.SetPatternSeparator(dfs.GetPatternSeparator());
            icu.SetPercent(dfs.GetPercent());
            icu.SetPerMill(dfs.GetPerMill());
            icu.SetZeroDigit(dfs.GetZeroDigit());
        }