private void AddWaterClickImpl() { if (CurrentAmountOfWater < TotalWaterAmount) { CurrentAmountOfWater += CapacityOfWater; SaveWaterToFile.SaveWaterToFileMethod(CurrentAmountOfWater.ToString(), DaysDifference); } }
private void SubWaterClickImpl() { if (CurrentAmountOfWater > CapacityOfWater) { CurrentAmountOfWater -= CapacityOfWater; } else { CurrentAmountOfWater = 0; } SaveWaterToFile.SaveWaterToFileMethod(CurrentAmountOfWater.ToString(), DaysDifference); }
public float CalculateCurrentWaterState() { float calculation = float.Parse(CurrentAmountOfWater.ToString()) / float.Parse(TotalWaterAmount.ToString()); if (calculation >= 1.0) { return(1.0F); } else { return(calculation); } }