public bool NegativeEffect(IObject otherStat) { if (otherStat is BottlePrice) { Price.NegativeEffect(otherStat); if (Price.Count < Settings_.minPriceForBottle) { Price.Count = Settings_.minPriceForBottle; } else if (Price.Count > Settings_.maxPriceForBottle) { Price.Count = Settings_.maxPriceForBottle; } change = "-" + (otherStat as BottlePrice).Price.Count.ToString(); return(true); } else if (otherStat is IValuta) { Price = new UAH(Price.Count - (otherStat as IValuta).Count); if (Price.Count < Settings_.minPriceForBottle) { Price.Count = Settings_.minPriceForBottle; } else if (Price.Count > Settings_.maxPriceForBottle) { Price.Count = Settings_.maxPriceForBottle; } change = "-" + (otherStat as IValuta).Count.ToString(); return(true); } return(false); }
public UAH_Account() { currency = new UAH("Ukrainian hryvna", 1); }