-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.axaml
243 lines (236 loc) · 14.5 KB
/
MainWindow.axaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<Window xmlns="https://github.com/avaloniaui"
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"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="250"
x:Class="WeatherApp.MainWindow"
Title="WeatherApp">
<TabControl>
<!-- Onglet 1 : Recherche de ville -->
<TabItem Header="Recherche" Background="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch">
<Grid Margin="50" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Section de recherche de ville -->
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,10">
<TextBox x:Name="BarreDeRecherche" Width="200"/>
<Button Content="Rechercher" Click="RechercherMeteo" Width="100" Margin="10,0,0,0"/>
</StackPanel>
<!-- Résultats de la recherche -->
<StackPanel Grid.Row="1">
<TextBlock x:Name="MessageErreur" FontWeight="Bold" FontSize="20" />
<TextBlock x:Name="NomVille" FontWeight="Bold" FontSize="20" />
<TextBlock x:Name="LatLong" Margin="0,5"/>
<TextBlock x:Name="TempVille" Margin="0,5"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock x:Name="Description" Margin="0,5,10,5"/>
<Image x:Name="MeteoImage" Width="30" Height="30"/>
</StackPanel>
<TextBlock x:Name="Humidite" Margin="0,5"/>
</StackPanel>
</Grid>
</TabItem>
<!-- Deuxième onglet -->
<TabItem Header="Prévisions" Background="LightGray" FontWeight="Bold" HorizontalContentAlignment="Center">
<ListBox HorizontalAlignment="Center" Width="1200">
<ListBoxItem>
<Expander Width="500">
<Expander.Header>
<TextBlock x:Name="Date1" FontSize="14"/>
</Expander.Header>
<Expander.Content>
<!-- Contenu principal de l'Expander -->
<StackPanel Spacing="10">
<TextBlock x:Name="NomVille1" FontWeight="Bold" FontSize="14"/>
<!-- Informations principales -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Image x:Name="MeteoImage1" Width="20" Height="20"/>
<TextBlock x:Name="TempVille1" Width="100" FontSize="16"/>
<TextBlock x:Name="Description1" Width="150" FontSize="16" HorizontalAlignment="Stretch"/>
</StackPanel>
<!-- Contenu détaillé (visible lors de l'expansion) -->
<StackPanel Spacing="10">
<TextBlock x:Name="Humidite1" FontSize="14"/>
<TextBlock x:Name="Coords1" FontSize="14"/>
<!-- ... Autres détails ... -->
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</ListBoxItem>
<!-- Répétez ce modèle pour les autres jours -->
<!-- ... -->
<ListBoxItem>
<Expander Width="500">
<Expander.Header>
<TextBlock x:Name="Date2" FontSize="14"/>
</Expander.Header>
<Expander.Content>
<!-- Contenu principal de l'Expander -->
<StackPanel Spacing="10">
<TextBlock x:Name="NomVille2" FontWeight="Bold" FontSize="14"/>
<!-- Informations principales -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Image x:Name="MeteoImage2" Width="20" Height="20"/>
<TextBlock x:Name="TempVille2" Width="100" FontSize="16"/>
<TextBlock x:Name="Description2" Width="150" FontSize="16" HorizontalAlignment="Stretch"/>
</StackPanel>
<!-- Contenu détaillé (visible lors de l'expansion) -->
<StackPanel Spacing="10">
<TextBlock x:Name="Humidite2" FontSize="14"/>
<TextBlock x:Name="Coords2" FontSize="14"/>
<!-- ... Autres détails ... -->
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</ListBoxItem>
<ListBoxItem>
<Expander Width="500">
<Expander.Header>
<TextBlock x:Name="Date3" FontSize="14"/>
</Expander.Header>
<Expander.Content>
<!-- Contenu principal de l'Expander -->
<StackPanel Spacing="10">
<TextBlock x:Name="NomVille3" FontWeight="Bold" FontSize="14"/>
<!-- Informations principales -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Image x:Name="MeteoImage3" Width="20" Height="20"/>
<TextBlock x:Name="TempVille3" Width="100" FontSize="16"/>
<TextBlock x:Name="Description3" Width="150" FontSize="16" HorizontalAlignment="Stretch"/>
</StackPanel>
<!-- Contenu détaillé (visible lors de l'expansion) -->
<StackPanel Spacing="10">
<TextBlock x:Name="Humidite3" FontSize="14"/>
<TextBlock x:Name="Coords3" FontSize="14"/>
<!-- ... Autres détails ... -->
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</ListBoxItem>
<ListBoxItem>
<Expander Width="500">
<Expander.Header>
<TextBlock x:Name="Date4" FontSize="14"/>
</Expander.Header>
<Expander.Content>
<!-- Contenu principal de l'Expander -->
<StackPanel Spacing="10">
<TextBlock x:Name="NomVille4" FontWeight="Bold" FontSize="14"/>
<!-- Informations principales -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Image x:Name="MeteoImage4" Width="20" Height="20"/>
<TextBlock x:Name="TempVille4" Width="100" FontSize="16"/>
<TextBlock x:Name="Description4" Width="150" FontSize="16" HorizontalAlignment="Stretch"/>
</StackPanel>
<!-- Contenu détaillé (visible lors de l'expansion) -->
<StackPanel Spacing="10">
<!-- <TextBlock x:Name="NomVille4" FontSize="14"/> -->
<TextBlock x:Name="Humidite4" FontSize="14"/>
<TextBlock x:Name="Coords4" FontSize="14"/>
<!-- ... Autres détails ... -->
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</ListBoxItem>
<ListBoxItem>
<Expander Width="500">
<Expander.Header>
<TextBlock x:Name="Date5" FontSize="14"/>
</Expander.Header>
<Expander.Content>
<!-- Contenu principal de l'Expander -->
<StackPanel Spacing="10">
<TextBlock x:Name="NomVille5" FontWeight="Bold" FontSize="14"/>
<!-- Informations principales -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Image x:Name="MeteoImage5" Width="20" Height="20"/>
<TextBlock x:Name="TempVille5" Width="100" FontSize="16"/>
<TextBlock x:Name="Description5" Width="150" FontSize="16" HorizontalAlignment="Stretch"/>
</StackPanel>
<!-- Contenu détaillé (visible lors de l'expansion) -->
<StackPanel Spacing="10">
<TextBlock x:Name="Humidite5" FontSize="14"/>
<TextBlock x:Name="Coords5" FontSize="14"/>
<!-- ... Autres détails ... -->
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</ListBoxItem>
</ListBox>
</TabItem>
<!-- Troisième onglet -->
<TabItem Header="Paramètres" Background="LightGray" FontWeight="Bold">
<!-- Onglet 3 : Paramètres -->
<StackPanel Margin="50">
<!-- Ville par défaut -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<TextBlock Text="Ville par défaut:" Width="150" VerticalAlignment="Center"/>
<TextBox x:Name="DefaultCity" Width="200" />
<Button Content="Sauvegarder" Click="SauvegardeVilleDefaut" Width="100" Margin="10,0,0,0"/>
</StackPanel>
<!-- Sélection de la langue -->
<StackPanel Orientation="Horizontal">
<TextBlock Text="Langue:" Width="150" VerticalAlignment="Center"/>
<ComboBox x:Name="LanguageSelector" SelectionChanged="ChangeLangue" Width="200">
<!-- Vous pouvez ajouter ou supprimer des langues selon vos besoins -->
<ComboBoxItem Content="Afrikaans" Tag="af"/>
<ComboBoxItem Content="Albanais" Tag="sq"/>
<ComboBoxItem Content="Arabe" Tag="ar"/>
<ComboBoxItem Content="Azéri" Tag="az"/>
<ComboBoxItem Content="Bulgare" Tag="bg"/>
<ComboBoxItem Content="Catalan" Tag="ca"/>
<ComboBoxItem Content="Tchèque" Tag="cs"/>
<ComboBoxItem Content="Danois" Tag="da"/>
<ComboBoxItem Content="Allemand" Tag="de"/>
<ComboBoxItem Content="Grec" Tag="el"/>
<ComboBoxItem Content="Anglais" Tag="en"/>
<ComboBoxItem Content="Basque" Tag="eu"/>
<ComboBoxItem Content="Persan (Farsi)" Tag="fa"/>
<ComboBoxItem Content="Finnois" Tag="fi"/>
<ComboBoxItem Content="Français" Tag="fr"/>
<ComboBoxItem Content="Galicien" Tag="gl"/>
<ComboBoxItem Content="Hébreu" Tag="he"/>
<ComboBoxItem Content="Hindi" Tag="hi"/>
<ComboBoxItem Content="Croate" Tag="hr"/>
<ComboBoxItem Content="Hongrois" Tag="hu"/>
<ComboBoxItem Content="Indonésien" Tag="id"/>
<ComboBoxItem Content="Italien" Tag="it"/>
<ComboBoxItem Content="Japonais" Tag="ja"/>
<ComboBoxItem Content="Coréen" Tag="ko"/>
<ComboBoxItem Content="Letton" Tag="lv"/>
<ComboBoxItem Content="Lituanien" Tag="lt"/>
<ComboBoxItem Content="Macédonien" Tag="mk"/>
<ComboBoxItem Content="Norvégien" Tag="no"/>
<ComboBoxItem Content="Néerlandais" Tag="nl"/>
<ComboBoxItem Content="Polonais" Tag="pl"/>
<ComboBoxItem Content="Portugais" Tag="pt"/>
<ComboBoxItem Content="Portugais Brésilien" Tag="pt-BR"/>
<ComboBoxItem Content="Roumain" Tag="ro"/>
<ComboBoxItem Content="Russe" Tag="ru"/>
<ComboBoxItem Content="Suédois" Tag="sv"/>
<ComboBoxItem Content="Slovaque" Tag="sk"/>
<ComboBoxItem Content="Slovène" Tag="sl"/>
<ComboBoxItem Content="Espagnol" Tag="es"/>
<ComboBoxItem Content="Serbe" Tag="sr"/>
<ComboBoxItem Content="Thaï" Tag="th"/>
<ComboBoxItem Content="Turc" Tag="tr"/>
<ComboBoxItem Content="Ukrainien" Tag="uk"/>
<ComboBoxItem Content="Vietnamien" Tag="vi"/>
<ComboBoxItem Content="Chinois Simplifié" Tag="zh-CN"/>
<ComboBoxItem Content="Chinois Traditionnel" Tag="zh-TW"/>
<ComboBoxItem Content="Zoulou" Tag="zu"/>
<!-- ... -->
</ComboBox>
</StackPanel>
</StackPanel>
</TabItem>
</TabControl>
</Window>