149 lines
11 KiB
XML
149 lines
11 KiB
XML
<Window x:Class="Hermes.CitoyenModal"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:Hermes"
|
|
mc:Ignorable="d"
|
|
Title="Informations" Height="390" Width="750"
|
|
Icon="hermes.png"
|
|
ResizeMode="NoResize"
|
|
xmlns:Validation="clr-namespace:Hermes.Validation"
|
|
xmlns:Converter="clr-namespace:Hermes.Converter"
|
|
Loaded="Window_Loaded"
|
|
WindowStartupLocation="CenterOwner"
|
|
Closing="Window_Closing">
|
|
|
|
<Window.Resources>
|
|
<Converter:NegateBoolean x:Key="NegateBoolean"/>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<StackPanel>
|
|
<WrapPanel>
|
|
<StackPanel Margin="10,10,0,0" VerticalAlignment="Top">
|
|
<Label>Civilité:</Label>
|
|
<ComboBox Name="civiliteComboBox" SelectedItem="{Binding Civilite}" Height="23" Width="150"/>
|
|
<Label>Nom :</Label>
|
|
<TextBox Name="nomTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150">
|
|
<TextBox.Text>
|
|
<Binding Path="Nom" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:MandatoryString/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Nom de naissance :</Label>
|
|
<TextBox Name="nomNaissanceTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150">
|
|
<TextBox.Text>
|
|
<Binding Path="NomNaissance" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:MandatoryString/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Prénom :</Label>
|
|
<TextBox Name="prenomTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150">
|
|
<TextBox.Text>
|
|
<Binding Path="Prenom" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:MandatoryString/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Age :</Label>
|
|
<TextBox Name="ageTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="30">
|
|
<TextBox.Text>
|
|
<Binding Path="Age" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:Age/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Profession :</Label>
|
|
<TextBox Name="professionTextBox" Text="{Binding Path=Profession}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<GroupBox Header="Résidence" Margin="10,10,0,0" VerticalAlignment="Top">
|
|
<StackPanel>
|
|
<RadioButton Name="principaleResCheckBox" IsChecked="{Binding Path=TypeResidence, Converter={StaticResource NegateBoolean}}" Margin="5,5,5,0">Principale</RadioButton>
|
|
<RadioButton Name="secondResCheckBox" IsChecked="{Binding Path=TypeResidence}" Margin="5,5,5,5">Secondaire</RadioButton>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<GroupBox Header="Adresse Locale" Margin="10,10,0,0" VerticalAlignment="Top">
|
|
<StackPanel>
|
|
<Label>Numéro :</Label>
|
|
<TextBox Name="adresseNumeroTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="50">
|
|
<TextBox.Text>
|
|
<Binding Path="AdresseNumero" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:MandatoryString/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Rue:</Label>
|
|
<TextBox Name="adresseRueTextBox" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" Validation.Error="ValidationError" Binding.TargetUpdated="BindingTargetUpdated" Binding.SourceUpdated="BindingSourceUpdated" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150">
|
|
<TextBox.Text>
|
|
<Binding Path="AdresseRue" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="true" NotifyOnValidationError="true">
|
|
<Binding.ValidationRules>
|
|
<Validation:MandatoryString/>
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label>Bâtiment :</Label>
|
|
<TextBox Name="adresseBatimentTextBox" Text="{Binding Path=AdresseBatiment}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
<Label>Quartier :</Label>
|
|
<TextBox Name="quartierTextBox" Text="{Binding Path=Quartier}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<GroupBox IsEnabled="{Binding IsChecked, ElementName=secondResCheckBox}" x:Name="mainAddrGroupBox" Header="Adresse" Margin="10,10,0,0" VerticalAlignment="Top" >
|
|
<GroupBox.Style>
|
|
<Style>
|
|
<Style.Triggers>
|
|
<Trigger Property="Control.IsEnabled" Value="False">
|
|
<Setter Property="Control.Foreground" Value ="#FF6D6D6D" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</GroupBox.Style>
|
|
<StackPanel>
|
|
<Label IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}">Numéro :</Label>
|
|
<TextBox Name="adresseExtNumeroTextBox" Text="{Binding Path=AdresseExtNumero}" IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="50"/>
|
|
<Label IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}">Rue :</Label>
|
|
<TextBox Name="adresseExtRueTextBox" Text="{Binding Path=AdresseExtRue}" IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
<Label IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}">Code postal :</Label>
|
|
<TextBox Name="adresseExtCPTextBox" Text="{Binding Path=AdresseExtCP}" IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="80"/>
|
|
<Label IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}">Ville :</Label>
|
|
<TextBox Name="adresseExtVilleTextBox" Text="{Binding Path=AdresseExtVille}" IsEnabled="{Binding IsEnabled, ElementName=mainAddrGroupBox}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<GroupBox Header="Contact" Margin="10,10,0,0" VerticalAlignment="Top">
|
|
<StackPanel>
|
|
<Label>E-Mail :</Label>
|
|
<TextBox Name="mailTextBox" Text="{Binding Path=Mail}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="200"/>
|
|
<Label>Téléphone :</Label>
|
|
<TextBox Name="telTextBox" Text="{Binding Path=Tel}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
<Label>Mobile :</Label>
|
|
<TextBox Name="telPortTextBox" Text="{Binding Path=TelPort}" HorizontalAlignment="Left" VerticalContentAlignment="Center" Height="23" Width="150"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</WrapPanel>
|
|
<WrapPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10,10,10,10">
|
|
<Button Height="25" Margin="0,0,10,0" Width="100" Click="Save_Click">Enregister</Button>
|
|
<Button Height="25" Width="100" Click="Cancel_Click">Annuler</Button>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|