Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente | |||
|
tp1_initiation [2017/09/28 13:21] ngagniarre [Exo 2] |
tp1_initiation [2017/09/28 13:22] (Version actuelle) ngagniarre [Exo 2] |
||
|---|---|---|---|
| Ligne 14: | Ligne 14: | ||
| * Pour afficher une valeur de type entier ou float dans une texte box, on utilise : <code> Convert.ToString(PrixTTC);</code> | * Pour afficher une valeur de type entier ou float dans une texte box, on utilise : <code> Convert.ToString(PrixTTC);</code> | ||
| * Attention, dans le code source un nombre à virgule est noté avec un . (1.2) alors qu'à la saisie de l'utilisateur dans les textboxs, c'est une virgule. | * Attention, dans le code source un nombre à virgule est noté avec un . (1.2) alors qu'à la saisie de l'utilisateur dans les textboxs, c'est une virgule. | ||
| + | * Code XAML : <code> <Grid> | ||
| + | <TextBox x:Name="txtPrixHT" HorizontalAlignment="Left" Height="35" Margin="33,137,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="123" /> | ||
| + | <TextBox x:Name="txtPrixTTC" HorizontalAlignment="Left" Height="35" Margin="327,137,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="94" /> | ||
| + | <Button x:Name="btnVersTTC" Content="-->" HorizontalAlignment="Left" Height="47" Margin="187,103,0,0" VerticalAlignment="Top" Width="111" Click="btnVersTTC_Click"/> | ||
| + | <Button x:Name="btnVersHT_" Content="<--" HorizontalAlignment="Left" Height="59" Margin="187,172,0,0" VerticalAlignment="Top" Width="111" Click="btnVersHT__Click"/> | ||
| + | <Label x:Name="label" Content="Prix HT:
" HorizontalAlignment="Left" Height="42" Margin="33,108,0,0" VerticalAlignment="Top" Width="113"/> | ||
| + | <Label x:Name="label_Copy" Content="Prix TTC:

" HorizontalAlignment="Left" Height="42" Margin="327,108,0,0" VerticalAlignment="Top" Width="113"/> | ||
| + | <Label x:Name="label1" Content="Taux:" HorizontalAlignment="Left" Height="23" Margin="45,231,0,0" VerticalAlignment="Top" Width="90"/> | ||
| + | <TextBox x:Name="txtTaux" HorizontalAlignment="Left" Height="23" Margin="45,254,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/> | ||
| + | |||
| + | |||
| + | </Grid></code> | ||
| ===== Exo 3 ===== | ===== Exo 3 ===== | ||