76 lines
3.8 KiB
XML
76 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:local="clr-namespace:BookAStar;assembly=BookAStar"
|
|
xmlns:converters="clr-namespace:BookAStar.Converters;assembly=BookAStar"
|
|
xmlns:views="clr-namespace:BookAStar.Views;assembly=BookAStar"
|
|
xmlns:behaviors="clr-namespace:BookAStar.Behaviors;assembly=BookAStar"
|
|
xmlns:extensions="clr-namespace:BookAStar.Extensions;assembly=BookAStar"
|
|
x:Class="BookAStar.Pages.EditBillingLinePage"
|
|
Style="{StaticResource PageStyle}">
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="Label">
|
|
<Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
|
|
</Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Style" Value="{StaticResource ButtonStyle}" />
|
|
</Style>
|
|
<converters:BooleanToObjectConverter x:Key="boolToStyleImage" x:TypeArguments="Style">
|
|
|
|
<converters:BooleanToObjectConverter.FalseObject>
|
|
<Style TargetType="Image">
|
|
<Setter Property="HeightRequest" Value="20" />
|
|
<Setter Property="Source"
|
|
Value="{extensions:ImageResource BookAStar.Images.Validation.error.png}" />
|
|
</Style>
|
|
</converters:BooleanToObjectConverter.FalseObject>
|
|
|
|
<converters:BooleanToObjectConverter.TrueObject>
|
|
<Style TargetType="Image">
|
|
<Setter Property="HeightRequest" Value="20" />
|
|
<Setter Property="Source"
|
|
Value="{extensions:ImageResource BookAStar.Images.Validation.success.png}" />
|
|
</Style>
|
|
</converters:BooleanToObjectConverter.TrueObject>
|
|
</converters:BooleanToObjectConverter>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
<StackLayout x:Name="mainStackLayout">
|
|
<Label Text="Description de la ligne de facture"
|
|
Style="{StaticResource InputLabelStyle}"></Label>
|
|
<Editor VerticalOptions="FillAndExpand"></Editor>
|
|
<Label Text="Durée de la prestation"
|
|
Style="{StaticResource InputLabelStyle}"></Label>
|
|
<StackLayout Orientation="Horizontal">
|
|
<Entry Placeholder="Durée" Keyboard="Numeric" Style="{StaticResource BigEntry}" />
|
|
<Picker x:Name="picker" SelectedIndex="{Binding UnitaryCost, Mode=TwoWay}"
|
|
Style="{StaticResource PickerStyle}" Title="Unité de temps">
|
|
<Picker.Items>
|
|
<x:String>Jours</x:String>
|
|
<x:String>Heures</x:String>
|
|
<x:String>Minutes</x:String>
|
|
</Picker.Items>
|
|
</Picker>
|
|
</StackLayout>
|
|
<Label Text="Quantité facturée" Style="{StaticResource InputLabelStyle}"></Label>
|
|
<Entry Text="{Binding Count, Mode=TwoWay}" Placeholder="Quantité" Keyboard="Numeric"
|
|
Style="{StaticResource BigEntry}"/>
|
|
<Label Text="Prix unitaire" Style="{StaticResource InputLabelStyle}"></Label>
|
|
<StackLayout Orientation="Horizontal">
|
|
<Entry Text="{Binding UnitaryCostText, Mode=TwoWay}" Placeholder="Prix"
|
|
Keyboard="Numeric" Style="{StaticResource BigEntry}">
|
|
<Entry.Behaviors>
|
|
<behaviors:DecimalValidatorBehavior x:Name="unitCostValidator" />
|
|
</Entry.Behaviors>
|
|
<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>
|
|
</StackLayout>
|
|
</ContentPage> |