Beispiel #1
0
        public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender)
        {
            toWordBuilder.Append(this._name);

            if (numberOfUnits == 0)
            {
            }
            //
            else
            {
                toWordBuilder.Append(FormulationOfNumber(numberOfUnits, gender));
            }
        }
        public StringBuilder Formulation(uint number, IMeasure measure, StringBuilder result)
        {
            ToWordBuilder builder = new ToWordBuilder(result);

            if (number == 0)
            {
                builder.Append("ноль");
                builder.Append(measure.GenderPlural);
            }
            else
            {
                uint div1000 = number / 1000;
                FormulationOfParentGrades(div1000, 0, builder);
                FormulationOfGrade(number - div1000 * 1000, measure, builder);
            }

            return(result);
        }
        public void FormulationOfGrade(uint subnumber, IMeasure grade, ToWordBuilder builder)
        {
            if (this.FormulationOfGradeOvr != null)
            {
                this.FormulationOfGradeOvr(subnumber, grade, builder);
                return;
            }

            uint nUnit  = subnumber % 10;
            uint nTens  = (subnumber / 10) % 10;
            uint nHunds = (subnumber / 100) % 10;

            builder.Append(Hundreds[nHunds]);

            if ((subnumber % 100) != 0)
            {
                TenNumbers[nTens].Formulation(builder, nUnit, grade.GenderNCount);
            }

            builder.Append(Reconcile(grade, subnumber));
        }
Beispiel #4
0
 public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender)
 {
     toWordBuilder.Append(FormulationOfNumber(numberOfUnits, gender));
 }
Beispiel #5
0
 public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender)
 {
     toWordBuilder.Append(_tens[numberOfUnits], " ");
 }