-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
73 lines (66 loc) · 3.89 KB
/
MainWindow.xaml
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
<Window x:Class="Weather_Images_Downloader.MainWindow"
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"
mc:Ignorable="d"
Name="window" Title="Weather Images Downloader" SizeToContent="Height" Width="525" Closed="window_Closed" ResizeMode="CanMinimize">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Lade Bilder von:" Margin="2" Padding="0"/>
<CheckBox Grid.Column="1" Grid.Row="0" Content="Heute" Margin="2" IsChecked="{Binding Path=Today}"/>
<CheckBox Grid.Column="2" Grid.Row="0" Content="Gestern" Margin="2" IsChecked="{Binding Path=Yesterday}"/>
<CheckBox Grid.Column="3" Grid.Row="0" Content="Vorgestern" Margin="2" IsChecked="{Binding Path=YesterYesterday}"/>
<Label Grid.Column="0" Grid.Row="1" Content="Typ:" Margin="2" Padding="0" />
<CheckBox Grid.Column="1" Grid.Row="1" Content="Regen" Margin="2" IsChecked="{Binding Path=Rain}"/>
<CheckBox Grid.Column="2" Grid.Row="1" Content="Wetter" Margin="2" IsChecked="{Binding Path=Weather}"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Content="Ort(e): " Padding="0" Margin="2"/>
<TextBox Name="areaTextBox" Grid.Column="1" Text="{Binding Path=Areas}" VerticalAlignment="Center" Margin="2"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Name="downloadButton" Grid.Column="1" Content="Download" Margin="5" Click="downloadButton_Click"/>
<CheckBox Grid.Column="2" Grid.Row="0" Content="Live View" VerticalAlignment="Center" Margin="2" IsChecked="{Binding ElementName=window, Path=LiveView}"/>
</Grid>
<Grid Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Name="progressLabel" Content="{Binding Path=ProgressString, ElementName=window}" Padding="0" Margin="2,0,2,-2"/>
<ProgressBar Grid.Row="1" Name="progressBar" Value="{Binding Progress, ElementName=window, Mode=OneWay}" Height="10" Maximum="1" Margin="2,0,2,0"/>
<Label Grid.Row="2" Content="{Binding Error, ElementName=window, Mode=OneWay}" Margin="0,15,0,0"/>
<Image Grid.Row="3" Source="{Binding ElementName=window, Path=WeatherImage}" Height="Auto" Visibility="{Binding ElementName=window, Path=LiveView}"/>
</Grid>
</Grid>
</Window>