a chat page

This commit is contained in:
Paul Schneider 2016-10-10 19:35:09 +02:00
commit ea5e36ec7b
4 changed files with 27 additions and 10 deletions

View file

@ -58,6 +58,7 @@ namespace BookAStar.ViewModels
{
SetProperty<decimal>(ref unitaryCost, value, "UnitaryCost");
data.UnitaryCost = value;
UnitaryCostText = value.ToString(unitCostFormat, CultureInfo.InvariantCulture);
}
}
protected int durationValue;
@ -106,9 +107,20 @@ namespace BookAStar.ViewModels
set
{
if (unitaryCostText != value)
{
try
{
data.UnitaryCost = decimal.Parse(value, CultureInfo.InvariantCulture);
}
catch (Exception)
{
// TODO Error model
// UI should shoud entry as wearing a wrong value
// thanks to its `Behaviors`
}
}
SetProperty<string>(ref unitaryCostText, value, "UnitaryCostText");
// TODO update behavior
}
}
bool invalidCost;