yavsc/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml

121 lines
5.8 KiB
Text
Raw Normal View History

2016-09-25 00:44:30 +02:00
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
2017-01-26 13:00:31 +01:00
xmlns:local="clr-namespace:ZicMoove;assembly=ZicMoove"
xmlns:converters="clr-namespace:ZicMoove.Converters;assembly=ZicMoove"
xmlns:views="clr-namespace:ZicMoove.Views;assembly=ZicMoove"
xmlns:behaviors="clr-namespace:ZicMoove.Behaviors;assembly=ZicMoove"
xmlns:extensions="clr-namespace:ZicMoove.Extensions;assembly=ZicMoove"
x:Class="ZicMoove.Pages.EditBillingLinePage"
2016-09-25 00:44:30 +02:00
Style="{StaticResource PageStyle}">
2016-09-29 04:54:14 +02:00
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
</Style>
<Style TargetType="Button">
<Setter Property="Style" Value="{StaticResource ButtonStyle}" />
</Style>
2016-10-11 15:19:51 +02:00
<converters:EnumConverter x:Key="enumToInt" />
2016-10-07 18:14:28 +02:00
<converters:BooleanToObjectConverter x:Key="boolToStyleImage" x:TypeArguments="Style">
2016-10-14 16:21:03 +02:00
2016-10-07 18:14:28 +02:00
<converters:BooleanToObjectConverter.FalseObject>
2016-10-07 15:24:00 +02:00
<Style TargetType="Image">
<Setter Property="HeightRequest" Value="20" />
2016-10-14 16:21:03 +02:00
<Setter Property="Source"
2017-01-26 13:00:31 +01:00
Value="{extensions:ImageResource ZicMoove.Images.Validation.error.png}" />
2016-10-07 15:24:00 +02:00
</Style>
2016-10-07 18:14:28 +02:00
</converters:BooleanToObjectConverter.FalseObject>
2016-10-07 15:24:00 +02:00
2016-10-07 18:14:28 +02:00
<converters:BooleanToObjectConverter.TrueObject>
2016-10-07 15:24:00 +02:00
<Style TargetType="Image">
<Setter Property="HeightRequest" Value="20" />
2016-10-14 16:21:03 +02:00
<Setter Property="Source"
2017-01-26 13:00:31 +01:00
Value="{extensions:ImageResource ZicMoove.Images.Validation.success.png}" />
2016-10-07 15:24:00 +02:00
</Style>
2016-10-07 18:14:28 +02:00
</converters:BooleanToObjectConverter.TrueObject>
2016-10-14 16:21:03 +02:00
2016-10-07 18:14:28 +02:00
</converters:BooleanToObjectConverter>
2016-10-14 16:21:03 +02:00
2016-10-09 16:11:48 +02:00
</ResourceDictionary>
2016-09-29 04:54:14 +02:00
</ContentPage.Resources>
2016-11-06 21:40:24 +01:00
<ScrollView>
2016-10-14 16:21:03 +02:00
2016-11-06 21:40:24 +01:00
<StackLayout x:Name="mainStackLayout">
2016-10-14 16:21:03 +02:00
<Label Text="Description de la ligne de facture"
Style="{StaticResource InputLabelStyle}"></Label>
<Editor HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Text="{Binding Description, Mode=TwoWay}">
2016-10-14 16:21:03 +02:00
<Editor.Behaviors>
<behaviors:EditorMaxLengthValidator x:Name="descriptionLenValidator" MaxLength="12" MinLength="3" />
2016-10-14 16:21:03 +02:00
</Editor.Behaviors>
</Editor>
<StackLayout Orientation="Horizontal">
<Image x:Name="descriptionSuccessErrorImage"
Style="{Binding Source={x:Reference descriptionLenValidator}, Path=IsValid, Converter={StaticResource boolToStyleImage}}" />
<Label Text="{Binding Source={x:Reference descriptionLenValidator}, Path=Error}"
Style="{StaticResource ErrorLabelStyle}"></Label>
2016-10-14 16:21:03 +02:00
</StackLayout>
<Label Text="Durée de la prestation"
Style="{StaticResource InputLabelStyle}">
</Label>
<StackLayout Orientation="Horizontal">
<Entry Placeholder="Durée" Keyboard="Numeric" Style="{StaticResource BigEntry}"
Text="{Binding DurationValue, Mode=TwoWay, StringFormat='{0}'}" >
<Entry.Behaviors>
<behaviors:DecimalValidatorBehavior x:Name="durationValidator" />
</Entry.Behaviors>
</Entry>
<views:EnumPicker x:Name="picker" Style="{StaticResource PickerStyle}"
EnumSource="{Binding DurationUnit}"
Title="Unité de temps"
SelectedItem="{Binding DurationUnit, Mode=TwoWay}">
</views:EnumPicker>
<Image x:Name="durationSuccessErrorImage"
Style="{Binding Source={x:Reference durationValidator},
2016-10-07 15:24:00 +02:00
Path=IsValid,
Converter={StaticResource boolToStyleImage}}" />
2016-10-14 16:21:03 +02:00
</StackLayout>
<Label Text="Quantité facturée" Style="{StaticResource InputLabelStyle}"></Label>
2016-10-14 16:21:03 +02:00
<Entry Text="{Binding Count, Mode=TwoWay}" Placeholder="Quantité" Keyboard="Numeric"
2016-11-25 14:48:11 +01:00
Style="{StaticResource BigEntry}">
<Entry.Behaviors>
<behaviors:IntegerEntryBehavior x:Name="countValidator" Min="0" Max="10" />
</Entry.Behaviors>
</Entry>
<StackLayout Orientation="Horizontal">
<Image x:Name="countSuccessErrorImage"
2016-11-25 14:48:11 +01:00
Style="{Binding Source={x:Reference countValidator},
Path=IsValid,
Converter={StaticResource boolToStyleImage}}" />
<Label Text="{Binding Source={x:Reference countValidator}, Path=Error}"
Style="{StaticResource ErrorLabelStyle}"></Label>
</StackLayout>
2016-11-25 14:48:11 +01:00
2016-10-14 16:21:03 +02:00
<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>
</Entry>
<Label Text="€" Style="{StaticResource BigLabelStyle}" />
2016-10-14 16:21:03 +02:00
<Image x:Name="unitaryCostSuccessErrorImage"
Style="{Binding Source={x:Reference unitCostValidator},
Path=IsValid,
Converter={StaticResource boolToStyleImage}}" />
</StackLayout>
2016-11-06 21:40:24 +01:00
<StackLayout Orientation="Horizontal">
2016-10-22 18:49:22 +02:00
<Button Text="Términé"
2016-10-14 16:21:03 +02:00
Command="{Binding ValidateCommand}"
Clicked="OnValidateClicked"></Button>
2016-11-25 17:57:49 +01:00
<Button Text="Supprimer"
Command="{Binding RemoveCommand}"
2016-11-25 17:57:49 +01:00
Clicked="OnDeleteClicked"></Button>
2016-11-06 21:40:24 +01:00
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage>