示例#1
0
        private void Test(
            string result,
            AbbreviatedNumberForm form,
            double value)
        {
            var str = AbbreviatedNumber.Format(form, value, Precision);

            str = str.Replace((char)160, ' ');
            Assert.IsTrue(result == str);
        }
示例#2
0
文件: Form1.cs 项目: soluling/I18N
        private void Process(double value, Label abbreviated, Label original)
        {
            string template;

            if (Form == AbbreviatedNumberForm.Currency)
            {
                template = Properties.Resources.CurrencySample;
            }
            else
            {
                template = Properties.Resources.NumberSample;
            }

            abbreviated.Text = String.Format(template, AbbreviatedNumber.Format(Form, value, Precision));
            original.Text    = String.Format(template, Convert.ToUInt64(value).ToString());
        }