136 lines
5.9 KiB
XML
136 lines
5.9 KiB
XML
<Window x:Class="InspectionUI.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:VM="clr-namespace:InspectionUI.ViewModels"
|
|
xmlns:Local="clr-namespace:InspectionUI"
|
|
Icon="MainWindow.png"
|
|
Height="600"
|
|
Width="977">
|
|
<Window.Resources>
|
|
|
|
</Window.Resources>
|
|
<Window.DataContext>
|
|
<VM:MainVM />
|
|
</Window.DataContext>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border BorderBrush="LightGray" BorderThickness="0, 1" Grid.Row="0">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Command="{Binding Reload}"
|
|
Content="Neu laden"
|
|
Cursor="Hand"
|
|
FontFamily="Consolas"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding IsReloadEnabled}"
|
|
Margin="5, 5, 0, 5"
|
|
Padding="10, 5"/>
|
|
<TextBox Grid.Column="1"
|
|
FontFamily="Consolas"
|
|
FontWeight="Bold"
|
|
HorizontalContentAlignment="Left"
|
|
Margin="5, 5, 0, 5"
|
|
Text="{Binding SuchNr}"
|
|
Width="150"
|
|
VerticalContentAlignment="Center"/>
|
|
<ComboBox Background="White"
|
|
BorderBrush="White"
|
|
FontFamily="Consolas"
|
|
FontWeight="Bold"
|
|
Grid.Column="2"
|
|
ItemsSource="{Binding Sizes}"
|
|
Margin="5, 5, 0, 5"
|
|
Padding="5"
|
|
SelectedValue="{Binding Size}"
|
|
Style="{DynamicResource ComboBoxStyle}"
|
|
VerticalContentAlignment="Center">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label Content="{Binding}" Padding="10, 5" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox Background="White"
|
|
BorderBrush="White"
|
|
FontFamily="Consolas"
|
|
FontWeight="Bold"
|
|
Grid.Column="3"
|
|
ItemsSource="{Binding Types}"
|
|
Margin="5, 5, 0, 5"
|
|
Padding="5"
|
|
SelectedValue="{Binding Type}"
|
|
Style="{DynamicResource ComboBoxStyle}"
|
|
VerticalContentAlignment="Center">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Label Content="{Binding}" Padding="10, 5" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<ComboBox Background="White"
|
|
BorderBrush="White"
|
|
FontFamily="Consolas"
|
|
FontWeight="Bold"
|
|
Grid.Column="4"
|
|
Margin="5, 5, 0, 5"
|
|
Padding="5"
|
|
SelectedIndex="{Binding ConnectionType}"
|
|
Style="{DynamicResource ComboBoxStyle}"
|
|
VerticalContentAlignment="Center">
|
|
<ComboBoxItem Content="IRDA" Padding="10, 5" IsSelected="True" />
|
|
<ComboBoxItem Content="UniPro" Padding="10, 5" />
|
|
</ComboBox>
|
|
<Button Command="{Binding StartInspection}"
|
|
Content="Prüfung starten"
|
|
Cursor="Hand"
|
|
FontFamily="Consolas"
|
|
Grid.Column="7"
|
|
IsEnabled="{Binding IsStartInspectionEnabled}"
|
|
Margin="5"
|
|
Padding="10, 5"/>
|
|
<Button Command="{Binding CancelInspection}"
|
|
Content="Abbrechen"
|
|
Cursor="Hand"
|
|
FontFamily="Consolas"
|
|
Grid.Column="8"
|
|
IsEnabled="{Binding IsCancelInspectionEnabled}"
|
|
Margin="5"
|
|
Padding="10, 5" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1" Margin="10">
|
|
<TextBlock FontFamily="Consolas"
|
|
Padding="0"
|
|
Text="{Binding Errors}"
|
|
TextWrapping="Wrap"/>
|
|
</Border>
|
|
|
|
<!-- TODO: Order head -->
|
|
|
|
<ScrollViewer Grid.Row="2"
|
|
CanContentScroll="True"
|
|
IsDeferredScrollingEnabled="True"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto">
|
|
<Local:ItemsGrid ItemsSource="{Binding MetersPool}" Margin="10, 0, 10, 10" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Window>
|