|
@@ -1,24 +1,27 @@
|
|
|
-<Window x:Class="Kusach.TestRouteEditWindow"
|
|
|
+<Window x:Class="Kusach.Windows.RouteEditWindow"
|
|
|
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"
|
|
|
- xmlns:local="clr-namespace:Kusach"
|
|
|
+ xmlns:local="clr-namespace:Kusach.Windows"
|
|
|
mc:Ignorable="d"
|
|
|
- Title="TestRouteEditWindow" Height="450" Width="800">
|
|
|
+ Title="Управление маршрутом"
|
|
|
+ Height="450"
|
|
|
+ Width="800"
|
|
|
+ WindowStartupLocation="CenterScreen">
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="65*"/>
|
|
|
<RowDefinition Height="354*"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<Button
|
|
|
- Content="Назад"
|
|
|
+ Content="Выход"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Top"
|
|
|
Margin="10,10,0,0"
|
|
|
Width="90"
|
|
|
Height="50"
|
|
|
- Click="Button_Click"/>
|
|
|
+ Click="ExitButton_Click"/>
|
|
|
<TextBox
|
|
|
Name="RouteNameBox"
|
|
|
Margin="105,10,10,5"
|
|
@@ -61,12 +64,13 @@
|
|
|
VerticalAlignment="Stretch"
|
|
|
HorizontalAlignment="Stretch"
|
|
|
Margin="-3,-3,-3,0"
|
|
|
- Grid.Row="0">
|
|
|
+ Grid.Row="0"
|
|
|
+ CanUserAddRows="False">
|
|
|
<DataGrid.ItemContainerStyle>
|
|
|
<Style TargetType="DataGridRow">
|
|
|
<EventSetter
|
|
|
Event="MouseDoubleClick"
|
|
|
- Handler="DataGridRow_MouseDoubleClick"/>
|
|
|
+ Handler="PointsDataGridRow_MouseDoubleClick"/>
|
|
|
</Style>
|
|
|
</DataGrid.ItemContainerStyle>
|
|
|
<DataGrid.Columns>
|
|
@@ -91,16 +95,17 @@
|
|
|
Orientation="Horizontal"
|
|
|
Grid.Row="1">
|
|
|
<Button
|
|
|
- Content="Добавить"
|
|
|
- Width="90"
|
|
|
- Height="30"
|
|
|
- Margin="0,0,10,0">
|
|
|
+ Content="Добавить"
|
|
|
+ Width="90"
|
|
|
+ Height="30"
|
|
|
+ Margin="0,0,10,0"
|
|
|
+ Click="AddPoint_Click">
|
|
|
</Button>
|
|
|
<Button
|
|
|
- Content="Удалить"
|
|
|
- Grid.Row="1"
|
|
|
- Width="90"
|
|
|
- Height="30">
|
|
|
+ Content="Удалить"
|
|
|
+ Grid.Row="1"
|
|
|
+ Width="90"
|
|
|
+ Height="30">
|
|
|
</Button>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
@@ -125,12 +130,13 @@
|
|
|
VerticalAlignment="Stretch"
|
|
|
HorizontalAlignment="Stretch"
|
|
|
Margin="-3,-3,-3,0"
|
|
|
- Grid.Row="0">
|
|
|
+ Grid.Row="0"
|
|
|
+ CanUserAddRows="False">
|
|
|
<DataGrid.ItemContainerStyle>
|
|
|
<Style TargetType="DataGridRow">
|
|
|
<EventSetter
|
|
|
Event="MouseDoubleClick"
|
|
|
- Handler="DataGridRow_MouseDoubleClick"/>
|
|
|
+ Handler="DriversDataGridRow_MouseDoubleClick"/>
|
|
|
</Style>
|
|
|
</DataGrid.ItemContainerStyle>
|
|
|
<DataGrid.Columns>
|
|
@@ -142,12 +148,18 @@
|
|
|
<DataGridTextColumn
|
|
|
Binding="{Binding Drivers.IdTransport}"
|
|
|
Header="Name"
|
|
|
- Width="100"
|
|
|
IsReadOnly="True"/>
|
|
|
<DataGridTextColumn
|
|
|
- Binding="{Binding Points.location}"
|
|
|
- Header="location"
|
|
|
- Width="100"
|
|
|
+ Binding="{Binding Drivers.Surname}"
|
|
|
+ Header="Surname"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <DataGridTextColumn
|
|
|
+ Binding="{Binding Drivers.Name}"
|
|
|
+ Header="Name"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <DataGridTextColumn
|
|
|
+ Binding="{Binding Drivers.Patronymic}"
|
|
|
+ Header="Patronymic"
|
|
|
IsReadOnly="True"/>
|
|
|
</DataGrid.Columns>
|
|
|
</DataGrid>
|
|
@@ -171,8 +183,5 @@
|
|
|
</TabItem>
|
|
|
</TabControl>
|
|
|
</Grid>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</Grid>
|
|
|
-</Window>
|
|
|
+</Window>
|