a chat page
This commit is contained in:
@ -47,6 +47,7 @@
|
||||
<Compile Include="Behaviors\StarBehavior.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Converters\BooleanToObjectConverter.cs" />
|
||||
<Compile Include="Converters\EnumConverter.cs" />
|
||||
<Compile Include="Converters\GenderConverter.cs" />
|
||||
<Compile Include="Converters\RatingText.cs" />
|
||||
<Compile Include="Extensions\ImageResourceExtension.cs" />
|
||||
@ -143,7 +144,7 @@
|
||||
<Compile Include="ViewModels\BillingLineViewModel.cs" />
|
||||
<Compile Include="ViewModels\ChatViewModel.cs" />
|
||||
<Compile Include="ViewModels\DashboardViewModel.cs" />
|
||||
<Compile Include="ViewModels\EstimateViewModel.cs" />
|
||||
<Compile Include="ViewModels\EditEstimateViewModel.cs" />
|
||||
<Compile Include="ViewModels\UserLoginViewModel.cs" />
|
||||
<Compile Include="ViewModels\ViewModelBase.cs" />
|
||||
<Compile Include="Views\MarkdownView.cs" />
|
||||
|
@ -63,12 +63,12 @@
|
||||
<Entry.Behaviors>
|
||||
<behaviors:DecimalValidatorBehavior x:Name="unitCostValidator" />
|
||||
</Entry.Behaviors>
|
||||
</Entry>
|
||||
<Label Text="€" Style="{StaticResource BigLabel}" />
|
||||
<Image x:Name="unitaryCostSuccessErrorImage"
|
||||
Style="{Binding Source={x:Reference unitCostValidator},
|
||||
<Image x:Name="unitaryCostSuccessErrorImage"
|
||||
Style="{Binding Source={x:Reference unitCostValidator},
|
||||
Path=IsValid,
|
||||
Converter={StaticResource boolToStyleImage}}" />
|
||||
</Entry>
|
||||
<Label Text="€" Style="{StaticResource BigLabel}" HorizontalTextAlignment="Start"/>
|
||||
</StackLayout>
|
||||
<Button Text="Valider cette ligne de facture" Command="{Binding ValidateCommand}"
|
||||
Clicked="OnValidateClicked"></Button>
|
||||
|
@ -1,5 +1,10 @@
|
||||
using BookAStar.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace BookAStar.Pages
|
||||
@ -10,11 +15,10 @@ namespace BookAStar.Pages
|
||||
{
|
||||
BindingContext = model;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
public void OnValidateClicked (object sender, EventArgs e)
|
||||
{
|
||||
this.Navigation.PopAsync();
|
||||
OnBackButtonPressed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user