public string Localize(ExemptionItemType exemptionItemType, long quantity)
        {
            if (exemptionItemType == ExemptionItemType.Unknown)
            {
                if (Case1(quantity))
                    return "единица игрового оборудования";
                else if (Case2(quantity))
                    return "единицы игрового оборудования";
                else
                    return "единиц игрового оборудования";
            }
            else if (exemptionItemType == ExemptionItemType.SlotMachine)
            {
                if (Case1(quantity))
                    return "игровой автомат";
                else if (Case2(quantity))
                    return "игровых автомата";
                else
                    return "игровых автоматов";
            }
            else if (exemptionItemType == ExemptionItemType.Pc)
            {
                if (Case1(quantity))
                    return "компьютер";
                else if (Case2(quantity))
                    return "компьютера";
                else
                    return "компьютеров";
            }
            else if (exemptionItemType == ExemptionItemType.Terminal)
            {
                if (Case1(quantity))
                    return "терминал";
                else if (Case2(quantity))
                    return "терминала";
                else
                    return "терминалов";
            }
            else if (exemptionItemType == ExemptionItemType.Table)
            {
                if (Case1(quantity))
                    return "игровой стол";
                else if (Case2(quantity))
                    return "игровых стола";
                else
                    return "игровых столов";
            }

            throw new ArgumentOutOfRangeException(string.Format("Can't localize {0} in quantity of {1}", exemptionItemType, quantity));
        }
Example #2
0
 public Exemption(ExemptionItemType itemType, long quantity)
 {
     ItemType = itemType;
     Quantity = quantity;
 }
 public ExemptionFormViewModel(ExemptionItemType exemptionItemType, long quantity)
 {
     ItemType = exemptionItemType;
     Quantity = quantity;
 }
Example #4
0
		public Exemption(ExemptionItemType itemType, long quantity)
		{
			ItemType = itemType;
			Quantity = quantity;
		}
 public string Localize(ExemptionItemType exemptionItemType)
 {
     return _dictionary[exemptionItemType];
 }