|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
4 | 4 | xmlns:l="clr-namespace:VSPC.UI.WPF"
|
5 | 5 | xmlns:prop="clr-namespace:VSPC.UI.WPF.Properties"
|
6 |
| - Title="VSPC Options" Width="600" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="474" WindowStyle="ToolWindow" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" > |
| 6 | + xmlns:c="clr-namespace:VSPC.Common;assembly=VSPC.Common" |
| 7 | + Title="VSPC Options" Width="600" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Common="clr-namespace:VSPC.Common;assembly=VSPC.Common" Height="496" WindowStyle="ToolWindow" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" > |
7 | 8 | <Window.Resources>
|
8 | 9 | <ObjectDataProvider x:Key="settings" ObjectType="{x:Type l:Properties.Settings}"></ObjectDataProvider>
|
9 | 10 | <Style TargetType="Label">
|
|
14 | 15 | <Setter Property="Height" Value="20"/>
|
15 | 16 | </Style>
|
16 | 17 | </Window.Resources>
|
| 18 | + <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> |
| 19 | + <Grid.ColumnDefinitions> |
| 20 | + <ColumnDefinition Width="*"/> |
| 21 | + <ColumnDefinition Width="Auto" SharedSizeGroup="OkCancel"/> |
| 22 | + <ColumnDefinition Width="Auto" SharedSizeGroup="OkCancel"/> |
| 23 | + </Grid.ColumnDefinitions> |
| 24 | + <Grid.RowDefinitions> |
| 25 | + <RowDefinition Height="*"/> |
| 26 | + <RowDefinition Height="Auto"/> |
| 27 | + </Grid.RowDefinitions> |
| 28 | + <TabControl Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Name="tabControlConnection" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| 29 | + <TabItem Header="{x:Static prop:Resources.Options_Conn_Header}" Name="tabItemConnection"> |
| 30 | + <Grid Margin="5,20,5,5"> |
| 31 | + <Grid.ColumnDefinitions> |
| 32 | + <ColumnDefinition Width="100"/> |
| 33 | + <ColumnDefinition Width="200"/> |
| 34 | + <ColumnDefinition Width="100"/> |
| 35 | + <ColumnDefinition Width="200"/> |
| 36 | + </Grid.ColumnDefinitions> |
| 37 | + <Grid.RowDefinitions> |
| 38 | + <RowDefinition Height="40"/> |
| 39 | + <RowDefinition Height="40"/> |
| 40 | + <RowDefinition Height="40"/> |
| 41 | + <RowDefinition Height="40"/> |
| 42 | + <RowDefinition Height="*"/> |
| 43 | + </Grid.RowDefinitions> |
| 44 | + <Label Content="{x:Static prop:Resources.Options_Conn_Realname}" Grid.Column="0" Grid.Row="0"></Label> |
| 45 | + <TextBox Grid.Row="0" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Realname}"></TextBox> |
17 | 46 |
|
18 |
| - <TabControl HorizontalAlignment="Stretch" Name="tabControlConnection" VerticalAlignment="Stretch"> |
19 |
| - <TabItem Header="{x:Static prop:Resources.Options_Conn_Header}" Name="tabItemConnection"> |
20 |
| - <Grid Margin="5,20,5,5"> |
21 |
| - <Grid.ColumnDefinitions> |
22 |
| - <ColumnDefinition Width="100"/> |
23 |
| - <ColumnDefinition Width="200"/> |
24 |
| - <ColumnDefinition Width="100"/> |
25 |
| - <ColumnDefinition Width="200"/> |
26 |
| - </Grid.ColumnDefinitions> |
27 |
| - <Grid.RowDefinitions> |
28 |
| - <RowDefinition Height="40"/> |
29 |
| - <RowDefinition Height="40"/> |
30 |
| - <RowDefinition Height="40"/> |
31 |
| - <RowDefinition Height="40"/> |
32 |
| - <RowDefinition Height="*"/> |
33 |
| - </Grid.RowDefinitions> |
34 |
| - <Label Content="{x:Static prop:Resources.Options_Conn_Realname}" Grid.Column="0" Grid.Row="0"></Label> |
35 |
| - <TextBox Grid.Row="0" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Realname}"></TextBox> |
36 |
| - |
37 |
| - <Label Content="{x:Static prop:Resources.Options_Conn_CID}" Grid.Column="0" Grid.Row="1"></Label> |
38 |
| - <TextBox Grid.Row="1" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.CID}"></TextBox> |
| 47 | + <Label Content="{x:Static prop:Resources.Options_Conn_CID}" Grid.Column="0" Grid.Row="1"></Label> |
| 48 | + <TextBox Grid.Row="1" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.CID}"></TextBox> |
39 | 49 |
|
40 |
| - <Label Content="{x:Static prop:Resources.Options_Conn_Password}" Grid.Column="0" Grid.Row="2"></Label> |
41 |
| - <TextBox Grid.Row="2" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Password}"></TextBox> |
| 50 | + <Label Content="{x:Static prop:Resources.Options_Conn_Password}" Grid.Column="0" Grid.Row="2"></Label> |
| 51 | + <TextBox Grid.Row="2" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Password}"></TextBox> |
42 | 52 |
|
43 |
| - <Label Content="{x:Static prop:Resources.Options_Conn_Server}" Grid.Column="0" Grid.Row="3"></Label> |
44 |
| - <TextBox Grid.Row="3" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Server}"></TextBox> |
| 53 | + <Label Content="{x:Static prop:Resources.Options_Conn_Server}" Grid.Column="0" Grid.Row="3"></Label> |
| 54 | + <TextBox Grid.Row="3" HorizontalAlignment="Stretch" Grid.Column="1" Text="{Binding Source={StaticResource settings}, Path=Default.Server}"></TextBox> |
45 | 55 |
|
46 |
| - <Button Content="{x:Static prop:Resources.Buttons_Ok}" Grid.Row="4" Grid.Column="1" Height="23" Name="buttonOk" Width="75" IsDefault="True" Click="buttonOk_Click" /> |
47 |
| - <Button Content="{x:Static prop:Resources.Buttons_Cancel}" Grid.Row="4" Grid.Column="2" Height="23" Name="buttonCancel" Width="75" Click="buttonCancel_Click" /> |
48 |
| - </Grid> |
49 |
| - </TabItem> |
50 |
| - <TabItem Name="tabAIModel" Header="{x:Static prop:Resources.Options_AI_Header}"> |
51 |
| - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
52 |
| - <Grid.RowDefinitions> |
53 |
| - <RowDefinition Height="Auto"></RowDefinition> |
54 |
| - <RowDefinition Height="*"></RowDefinition> |
55 |
| - <RowDefinition Height="Auto"></RowDefinition> |
56 |
| - <RowDefinition Height="Auto"></RowDefinition> |
57 |
| - <RowDefinition Height="Auto"></RowDefinition> |
58 |
| - <RowDefinition Height="Auto"></RowDefinition> |
59 |
| - </Grid.RowDefinitions> |
60 |
| - <Grid.ColumnDefinitions> |
61 |
| - <ColumnDefinition Width="*"></ColumnDefinition> |
62 |
| - <ColumnDefinition Width="*"></ColumnDefinition> |
63 |
| - <ColumnDefinition Width="Auto"></ColumnDefinition> |
64 |
| - </Grid.ColumnDefinitions> |
65 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_Listheader}" Margin="5,5,0,0" Grid.Row="0"/> |
66 |
| - <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,5,5"> |
67 |
| - </DataGrid> |
68 |
| - <Grid Grid.Row="1" Grid.Column="2"> |
69 |
| - <Grid.ColumnDefinitions> |
70 |
| - <ColumnDefinition Width="*"></ColumnDefinition> |
71 |
| - </Grid.ColumnDefinitions> |
| 56 | + </Grid> |
| 57 | + </TabItem> |
| 58 | + <TabItem Name="tabAIModel" Header="{x:Static prop:Resources.Options_AI_Header}"> |
| 59 | + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
72 | 60 | <Grid.RowDefinitions>
|
73 |
| - <RowDefinition></RowDefinition> |
74 |
| - <RowDefinition></RowDefinition> |
| 61 | + <RowDefinition Height="Auto"></RowDefinition> |
| 62 | + <RowDefinition Height="*"></RowDefinition> |
| 63 | + <RowDefinition Height="Auto"></RowDefinition> |
| 64 | + <RowDefinition Height="Auto"></RowDefinition> |
| 65 | + <RowDefinition Height="Auto"></RowDefinition> |
| 66 | + <RowDefinition Height="Auto"></RowDefinition> |
75 | 67 | </Grid.RowDefinitions>
|
76 |
| - <Button Grid.Column="1" Grid.Row="0" VerticalAlignment="Bottom" Margin="0,0,0,10" Height="Auto" > |
77 |
| - <Image Width="16" Height="16" Source="Images/112_UpArrowShort_Blue_16x16_72.png"/> |
78 |
| - </Button> |
79 |
| - |
80 |
| - <Button Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Height="Auto" Margin="0,10,0,0"> |
81 |
| - <Button.Content> |
82 |
| - <Image Width="16" Height="16" Source="Images/112_DownArrowShort_Blue_16x16_72.png" /> |
83 |
| - </Button.Content> |
84 |
| - </Button> |
85 |
| - </Grid> |
86 |
| - <Button HorizontalAlignment="Right" Width="100" Grid.Row="2" Grid.Column="0" Margin="0,0,10,0" Content="{x:Static prop:Resources.Buttons_New}" /> |
87 |
| - <Button HorizontalAlignment="Left" Width="100" Content="{x:Static prop:Resources.Buttons_Cancel}" Grid.Row="2" Grid.Column="1" Margin="10,0,0,0"/> |
88 |
| - <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,5,0,0"> |
89 | 68 | <Grid.ColumnDefinitions>
|
90 |
| - <ColumnDefinition Width="150" /> |
91 |
| - <ColumnDefinition Width="*"/> |
92 |
| - <ColumnDefinition Width="Auto"/> |
| 69 | + <ColumnDefinition Width="*"></ColumnDefinition> |
| 70 | + <ColumnDefinition Width="*"></ColumnDefinition> |
| 71 | + <ColumnDefinition Width="Auto"></ColumnDefinition> |
93 | 72 | </Grid.ColumnDefinitions>
|
94 |
| - <Grid.RowDefinitions> |
95 |
| - <RowDefinition/> |
96 |
| - <RowDefinition/> |
97 |
| - <RowDefinition/> |
98 |
| - <RowDefinition/> |
99 |
| - </Grid.RowDefinitions> |
100 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_Airline}" Grid.Row="0" Grid.Column="0" Margin="5,5,0,0"></TextBlock> |
101 |
| - <TextBox Name="textboxAirline" Margin="5,5,5,5" Grid.Row="0" Grid.Column="1"/> |
102 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_AirlineExample}" Margin="5,5,5,5" Grid.Row="0" Grid.Column="2" /> |
103 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_Planetype}" Grid.Row="1" Grid.Column="0" Margin="5,5,0,0"/> |
104 |
| - <TextBox Name="textboxPlaneType" Margin="5,5,5,5" Grid.Row="1" Grid.Column="1"/> |
105 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_PlanetypeExample}" Margin="5,5,5,5" Grid.Row="1" Grid.Column="2"/> |
106 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_Model}" Grid.Row="2" Grid.Column="0" Margin="5,5,0,0"/> |
107 |
| - <TextBox Name="textboxModel" Grid.Row="2" Grid.Column="1" Margin="5,5,5,5"/> |
108 |
| - <TextBlock Text="{x:Static prop:Resources.Options_AI_ModelExample}" Margin="5,5,5,10" Grid.Row="2" Grid.Column="2"/> |
109 |
| - <TextBlock x:Name="tbRuleDescription" Margin="5,5,5,5" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3"/> |
| 73 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_Listheader}" Margin="5,5,0,0" Grid.Row="0"/> |
| 74 | + <DataGrid ItemsSource="{Binding Source={x:Static c:AIModelRuleRepository.AllRules}}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,5,5" AutoGenerateColumns="False"> |
| 75 | + <DataGrid.Columns> |
| 76 | + <DataGridTextColumn Header="Airline" Binding="{Binding Airline}" MinWidth="100" /> |
| 77 | + <DataGridTextColumn Header="Plane type" Binding="{Binding PlaneType}" MinWidth="100" /> |
| 78 | + <DataGridTextColumn Header="Model" Binding="{Binding Model}" Width="*" /> |
| 79 | + </DataGrid.Columns> |
| 80 | + </DataGrid> |
| 81 | + <Grid Grid.Row="1" Grid.Column="2"> |
| 82 | + <Grid.ColumnDefinitions> |
| 83 | + <ColumnDefinition Width="*"></ColumnDefinition> |
| 84 | + </Grid.ColumnDefinitions> |
| 85 | + <Grid.RowDefinitions> |
| 86 | + <RowDefinition></RowDefinition> |
| 87 | + <RowDefinition></RowDefinition> |
| 88 | + </Grid.RowDefinitions> |
| 89 | + <Button Click="ButtonUp_Click" Grid.Column="1" Grid.Row="0" VerticalAlignment="Bottom" Margin="0,0,0,10" Height="Auto" > |
| 90 | + <Image Width="16" Height="16" Source="Images/112_UpArrowShort_Blue_16x16_72.png"/> |
| 91 | + </Button> |
| 92 | + |
| 93 | + <Button Click="ButtonDown_Click" Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Height="Auto" Margin="0,10,0,0"> |
| 94 | + <Button.Content> |
| 95 | + <Image Width="16" Height="16" Source="Images/112_DownArrowShort_Blue_16x16_72.png" /> |
| 96 | + </Button.Content> |
| 97 | + </Button> |
| 98 | + </Grid> |
| 99 | + <Button HorizontalAlignment="Right" Width="100" Grid.Row="2" Grid.Column="0" Margin="0,0,10,0" Content="{x:Static prop:Resources.Buttons_New}" Click="ButtonNewAIRule_Click" /> |
| 100 | + <Button HorizontalAlignment="Left" Width="100" Content="{x:Static prop:Resources.Buttons_Delete}" Grid.Row="2" Grid.Column="1" Margin="10,0,0,0" Click="Button_DeleteAIRuleClick" /> |
| 101 | + <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,5,0,0"> |
| 102 | + <Grid.ColumnDefinitions> |
| 103 | + <ColumnDefinition Width="150" /> |
| 104 | + <ColumnDefinition Width="*"/> |
| 105 | + <ColumnDefinition Width="Auto"/> |
| 106 | + </Grid.ColumnDefinitions> |
| 107 | + <Grid.RowDefinitions> |
| 108 | + <RowDefinition/> |
| 109 | + <RowDefinition/> |
| 110 | + <RowDefinition/> |
| 111 | + <RowDefinition/> |
| 112 | + </Grid.RowDefinitions> |
| 113 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_Airline}" Grid.Row="0" Grid.Column="0" Margin="5,5,0,0"></TextBlock> |
| 114 | + <TextBox Name="textboxAirline" Margin="5,5,5,5" Grid.Row="0" Grid.Column="1"/> |
| 115 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_AirlineExample}" Margin="5,5,5,5" Grid.Row="0" Grid.Column="2" /> |
| 116 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_Planetype}" Grid.Row="1" Grid.Column="0" Margin="5,5,0,0"/> |
| 117 | + <TextBox Name="textboxPlaneType" Margin="5,5,5,5" Grid.Row="1" Grid.Column="1"/> |
| 118 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_PlanetypeExample}" Margin="5,5,5,5" Grid.Row="1" Grid.Column="2"/> |
| 119 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_Model}" Grid.Row="2" Grid.Column="0" Margin="5,5,0,0"/> |
| 120 | + <TextBox Name="textboxModel" Grid.Row="2" Grid.Column="1" Margin="5,5,5,5"/> |
| 121 | + <TextBlock Text="{x:Static prop:Resources.Options_AI_ModelExample}" Margin="5,5,5,10" Grid.Row="2" Grid.Column="2"/> |
| 122 | + <TextBlock x:Name="tbRuleDescription" Margin="5,5,5,5" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3"/> |
| 123 | + </Grid> |
110 | 124 | </Grid>
|
111 |
| - </Grid> |
112 |
| - </TabItem> |
113 |
| - </TabControl> |
| 125 | + </TabItem> |
| 126 | + </TabControl> |
| 127 | + <Button Content="{x:Static prop:Resources.Buttons_Ok}" Margin="0,20,10,5" Grid.Row="1" Grid.Column="1" VerticalAlignment="Bottom" Name="buttonOk" MinWidth="75" IsDefault="True" Click="buttonOk_Click" /> |
| 128 | + <Button Content="{x:Static prop:Resources.Buttons_Cancel}" Margin="0,20,10,5" Grid.Row="1" Grid.Column="2" VerticalAlignment="Bottom" Name="buttonCancel" MinWidth="75" Click="buttonCancel_Click" /> |
| 129 | + </Grid> |
114 | 130 | </Window>
|
0 commit comments