|
@@ -38,52 +38,106 @@
|
|
|
Text="{Binding VIN}"/>
|
|
|
</StackPanel>
|
|
|
|
|
|
- <!--Владелец-->
|
|
|
- <StackPanel Margin="4">
|
|
|
- <!--Надпись-->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Владелец"/>
|
|
|
- <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
+ <!--Основное о ТС-->
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <!--Тип ТС-->
|
|
|
+ <StackPanel Grid.Column="0" Grid.Row="0" Margin="4">
|
|
|
+ <!--Надпись-->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Тип транспортного средства"/>
|
|
|
+ <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+ <!--Выпадающий список-->
|
|
|
+ <ComboBox
|
|
|
+ SelectedItem="{Binding SelectedTransportType}"
|
|
|
+ ItemsSource="{Binding AllTransportTypes}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Name}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ </ComboBox>
|
|
|
</StackPanel>
|
|
|
- <!--Поле ввода и автодополнение-->
|
|
|
- <StackPanel>
|
|
|
- <TextBox
|
|
|
- x:Name="tbOwner"
|
|
|
- GotFocus="tbOwner_GotFocus"
|
|
|
- LostFocus="tbOwner_LostFocus"
|
|
|
- Text="{Binding OwnerSearch,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
- <Popup
|
|
|
- IsOpen="{Binding OwnerSuggestionsVisible}"
|
|
|
- Placement="Bottom"
|
|
|
- Width="{Binding RelativeSource={RelativeSource Self},Path=PlacementTarget.ActualWidth}"
|
|
|
- PlacementTarget="{Binding ElementName=tbOwner}">
|
|
|
- <ListBox
|
|
|
- x:Name="lbOwners"
|
|
|
- ItemsSource="{Binding SuggestedOwners}"
|
|
|
- SelectionChanged="lbOwners_SelectionChanged">
|
|
|
- <ListBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock Text="{Binding NameAndBirthdate}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ListBox.ItemTemplate>
|
|
|
- </ListBox>
|
|
|
- </Popup>
|
|
|
- <TextBlock
|
|
|
- Text="{Binding OwnerIsSelected,Converter={StaticResource btff}}"
|
|
|
- Foreground="{Binding OwnerIsSelected,Converter={StaticResource btfc}}"/>
|
|
|
+
|
|
|
+ <!--Владелец-->
|
|
|
+ <StackPanel Grid.Column="1" Grid.Row="0" Margin="4">
|
|
|
+ <!--Надпись-->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Владелец"/>
|
|
|
+ </StackPanel>
|
|
|
+ <!--Поле ввода и автодополнение-->
|
|
|
+ <StackPanel>
|
|
|
+ <TextBox
|
|
|
+ x:Name="tbOwner"
|
|
|
+ GotFocus="tbOwner_GotFocus"
|
|
|
+ LostFocus="tbOwner_LostFocus"
|
|
|
+ Text="{Binding OwnerSearch,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
+ <Popup
|
|
|
+ IsOpen="{Binding OwnerSuggestionsVisible}"
|
|
|
+ Placement="Bottom"
|
|
|
+ Width="{Binding RelativeSource={RelativeSource Self},Path=PlacementTarget.ActualWidth}"
|
|
|
+ PlacementTarget="{Binding ElementName=tbOwner}">
|
|
|
+ <ListBox
|
|
|
+ x:Name="lbOwners"
|
|
|
+ ItemsSource="{Binding SuggestedOwners}"
|
|
|
+ SelectionChanged="lbOwners_SelectionChanged">
|
|
|
+ <ListBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding NameAndBirthdate}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ListBox.ItemTemplate>
|
|
|
+ </ListBox>
|
|
|
+ </Popup>
|
|
|
+ <TextBlock
|
|
|
+ Text="{Binding OwnerIsSelected,Converter={StaticResource btff}}"
|
|
|
+ Foreground="{Binding OwnerIsSelected,Converter={StaticResource btfc}}"/>
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
- </StackPanel>
|
|
|
|
|
|
- <!--Основное-->
|
|
|
+ <!--Категория-->
|
|
|
+ <StackPanel Grid.Column="2" Grid.Row="0" Margin="4">
|
|
|
+ <!--Надпись-->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Категория"/>
|
|
|
+ <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
+ </StackPanel>
|
|
|
+ <!--Выпадающий список-->
|
|
|
+ <ComboBox
|
|
|
+ SelectedItem="{Binding SelectedCategory}"
|
|
|
+ ItemsSource="{Binding AllCategories}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Name}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ </ComboBox>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <!--Детали производства-->
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
|
<!--Производитель-->
|
|
|
- <StackPanel Grid.Column="0" Margin="4">
|
|
|
+ <StackPanel Grid.Column="0" Grid.Row="0" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
<TextBlock Style="{StaticResource H5}" Text="Производитель"/>
|
|
@@ -118,7 +172,7 @@
|
|
|
</StackPanel>
|
|
|
|
|
|
<!--Модель-->
|
|
|
- <StackPanel Grid.Column="1" Margin="4">
|
|
|
+ <StackPanel Grid.Column="1" Grid.Row="0" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
<TextBlock Style="{StaticResource H5}" Text="Модель"/>
|
|
@@ -154,7 +208,7 @@
|
|
|
</StackPanel>
|
|
|
|
|
|
<!--Цвет-->
|
|
|
- <StackPanel Grid.Column="2" Margin="4">
|
|
|
+ <StackPanel Grid.Column="2" Grid.Row="0" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
<TextBlock Style="{StaticResource H5}" Text="Цвет"/>
|
|
@@ -188,42 +242,31 @@
|
|
|
Foreground="{Binding ColorIsSelected,Converter={StaticResource btfc}}"/>
|
|
|
</StackPanel>
|
|
|
</StackPanel>
|
|
|
- </Grid>
|
|
|
|
|
|
- <!--Привод и категория-->
|
|
|
- <Grid>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <!--Привод-->
|
|
|
- <StackPanel Grid.Column="0" Margin="4">
|
|
|
+ <!--Год выпуска-->
|
|
|
+ <StackPanel Grid.Column="0" Grid.Row="1" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Тип привода"/>
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Год выпуска"/>
|
|
|
+ <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
</StackPanel>
|
|
|
- <!--Выпадающий список-->
|
|
|
- <ComboBox
|
|
|
- SelectedItem="{Binding SelectedDrive}"
|
|
|
- ItemsSource="{Binding AllDriveTypes}">
|
|
|
- <ComboBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock Text="{Binding Name}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ComboBox.ItemTemplate>
|
|
|
- </ComboBox>
|
|
|
+ <!--Поле ввода-->
|
|
|
+ <TextBox
|
|
|
+ Margin="0,4"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Text="{Binding ReleaseYear}"/>
|
|
|
</StackPanel>
|
|
|
- <!--Категория-->
|
|
|
- <StackPanel Grid.Column="1" Margin="4">
|
|
|
+
|
|
|
+ <!--Привод-->
|
|
|
+ <StackPanel Grid.Column="1" Grid.Row="1" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Категория"/>
|
|
|
- <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Тип привода"/>
|
|
|
</StackPanel>
|
|
|
<!--Выпадающий список-->
|
|
|
<ComboBox
|
|
|
- SelectedItem="{Binding SelectedCategory}"
|
|
|
- ItemsSource="{Binding AllCategories}">
|
|
|
+ SelectedItem="{Binding SelectedDrive}"
|
|
|
+ ItemsSource="{Binding AllDriveTypes}">
|
|
|
<ComboBox.ItemTemplate>
|
|
|
<DataTemplate>
|
|
|
<TextBlock Text="{Binding Name}"/>
|
|
@@ -231,26 +274,18 @@
|
|
|
</ComboBox.ItemTemplate>
|
|
|
</ComboBox>
|
|
|
</StackPanel>
|
|
|
- </Grid>
|
|
|
|
|
|
- <!--Год выпуска и что то-->
|
|
|
- <Grid>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <!--Год выпуска-->
|
|
|
- <StackPanel Grid.Column="0" Margin="4">
|
|
|
+ <!--Максимальная нагрузка-->
|
|
|
+ <StackPanel Grid.Column="2" Grid.Row="1" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Год выпуска"/>
|
|
|
- <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Максимальная нагрузка (в кг.)"/>
|
|
|
</StackPanel>
|
|
|
<!--Поле ввода-->
|
|
|
<TextBox
|
|
|
Margin="0,4"
|
|
|
VerticalContentAlignment="Center"
|
|
|
- Text="{Binding ReleaseYear}"/>
|
|
|
+ Text="{Binding MaxLoad}"/>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
|
|
@@ -259,10 +294,9 @@
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <!--Номер-->
|
|
|
+
|
|
|
+ <!--Номер двигателя-->
|
|
|
<StackPanel Grid.Column="0" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
@@ -274,6 +308,7 @@
|
|
|
VerticalContentAlignment="Center"
|
|
|
Text="{Binding EngineNumber}"/>
|
|
|
</StackPanel>
|
|
|
+
|
|
|
<!--Модель-->
|
|
|
<StackPanel Grid.Column="1" Margin="4">
|
|
|
<!--Надпись-->
|
|
@@ -285,48 +320,22 @@
|
|
|
Margin="0,4"
|
|
|
VerticalContentAlignment="Center"/>
|
|
|
</StackPanel>
|
|
|
- <!--Год-->
|
|
|
- <StackPanel Grid.Column="2" Margin="4">
|
|
|
- <!--Надпись-->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Год двигателя"/>
|
|
|
- </StackPanel>
|
|
|
- <!--Поле ввода-->
|
|
|
- <TextBox
|
|
|
- Margin="0,4"
|
|
|
- VerticalContentAlignment="Center"/>
|
|
|
- </StackPanel>
|
|
|
- <!--Тип-->
|
|
|
- <StackPanel Grid.Column="3" Margin="4">
|
|
|
- <!--Надпись-->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Тип двигателя"/>
|
|
|
- <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
- </StackPanel>
|
|
|
- <!--Выпадающий список-->
|
|
|
- <ComboBox
|
|
|
- SelectedItem="{Binding SelectedEngineType}"
|
|
|
- ItemsSource="{Binding AllEngineTypes}">
|
|
|
- <ComboBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock Text="{Binding Name}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ComboBox.ItemTemplate>
|
|
|
- </ComboBox>
|
|
|
- </StackPanel>
|
|
|
+
|
|
|
</Grid>
|
|
|
|
|
|
- <!--Вес и цвет-->
|
|
|
+ <!--Вес-->
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<!--Вес-->
|
|
|
<StackPanel Grid.Column="0" Margin="4">
|
|
|
<!--Надпись-->
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
<TextBlock Style="{StaticResource H5}" Text="Вес (в кг.)"/>
|
|
|
+ <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
|
|
|
</StackPanel>
|
|
|
<!--Поле ввода-->
|
|
|
<TextBox
|
|
@@ -334,19 +343,22 @@
|
|
|
VerticalContentAlignment="Center"
|
|
|
Text="{Binding Weight}"/>
|
|
|
</StackPanel>
|
|
|
- <!--Макс. нагрузка-->
|
|
|
- <StackPanel Grid.Column="1" Margin="4">
|
|
|
- <!--Надпись-->
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Style="{StaticResource H5}" Text="Максимальная нагрузка (в кг.)"/>
|
|
|
- </StackPanel>
|
|
|
- <!--Поле ввода-->
|
|
|
- <TextBox
|
|
|
- Margin="0,4"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Text="{Binding MaxLoad}"/>
|
|
|
- </StackPanel>
|
|
|
</Grid>
|
|
|
+
|
|
|
+ <!--Комментарий-->
|
|
|
+ <StackPanel Margin="4">
|
|
|
+ <!--Надпись-->
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock Style="{StaticResource H5}" Text="Комментарий"/>
|
|
|
+ </StackPanel>
|
|
|
+ <!--Поле ввода-->
|
|
|
+ <TextBox
|
|
|
+ Margin="0,4"
|
|
|
+ Height="230"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Text="{Binding Comment}"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
</StackPanel>
|
|
|
|
|
|
<!--Сохранить/отмена-->
|