Пример #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
        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());
        }