-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathConfigurationWindow.xaml
More file actions
177 lines (177 loc) · 10.3 KB
/
ConfigurationWindow.xaml
File metadata and controls
177 lines (177 loc) · 10.3 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<UserControl x:Class="CommanderMonitor.ConfigurationWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:resx="clr-namespace:EddiCommanderMonitor.Properties"
xmlns:eddiCore="clr-namespace:EddiCore;assembly=EddiCore"
xmlns:utility="clr-namespace:Utilities;assembly=Utilities"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800">
<DockPanel LastChildFill="True" Background="{DynamicResource WindowBackgroundBrush}" Margin="0,0">
<Grid Margin="20, 10, 20, 10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<RichTextBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="6" DockPanel.Dock="Top" Margin="0, 0, 0, 25" IsReadOnly="True" IsDocumentEnabled="True" BorderThickness="0">
<FlowDocument>
<Paragraph >
<Run Text="{x:Static resx:Resources.tab_commander_Ipa1}" />
<Hyperlink Click="ipaClicked" >
<Run Text="{x:Static resx:Resources.link_ipa}" />
</Hyperlink>
<Run Text="{x:Static resx:Resources.tab_commander_Ipa2}" />
</Paragraph>
</FlowDocument>
</RichTextBox>
<Label Grid.Row="1" Grid.Column="0" VerticalContentAlignment="Bottom" Content="{x:Static resx:Resources.tab_commander_phonetic_name}" VerticalAlignment="Center" />
<TextBox
x:Name ="phoneticNameTextBox"
VerticalAlignment="Bottom"
VerticalContentAlignment="Bottom"
TextChanged="PhoneticName_TextChanged"
Loaded="PhoneticNameTextBox_Loaded"
Margin="0, 5"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan ="3"
Height="20" >
<TextBox.Text>
<Binding Path="PhoneticName"
Mode="TwoWay"
NotifyOnTargetUpdated="True"
UpdateSourceTrigger="PropertyChanged"
TargetNullValue="" >
<Binding.ValidationRules>
<utility:ValidIPARule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
<TextBox.Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTipService.ToolTip"
Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button Margin="10, 5" Grid.Row="1" Grid.Column="4" Content="{x:Static resx:Resources.tab_commander_test_phonetic_name}" Click="phoneticNameTestButtonClicked" />
<Label Grid.Row="2" Grid.Column="0" VerticalContentAlignment="Bottom" Content="{x:Static resx:Resources.tab_commander_home_system}" VerticalAlignment="Center" />
<eddiCore:StarSystemComboBox
x:Name="HomeSystemComboBox"
SelectedItem="{Binding Path=HomeSystemName, Mode=TwoWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True"
IsReadOnly="False"
IsTextSearchEnabled="False"
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan ="3"
Margin="0, 5"
VerticalContentAlignment="Center"/>
<Label Grid.Row="3" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_home_station}"/>
<ComboBox
x:Name="HomeStationComboBox"
ItemsSource="{Binding Path=HomeStationOptions, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Path=HomeStation, Mode=TwoWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="name"
Grid.Row="3"
Grid.Column="1" Grid.ColumnSpan ="2"
Margin="0, 5"
VerticalContentAlignment="Center" />
<Label Grid.Row="6" Grid.Column="0" Grid.ColumnSpan ="2" Margin="0, 5" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{x:Static resx:Resources.tab_commander_gender}"/>
<ComboBox
ItemsSource="{Binding GenderOptions, Mode=OneWay}"
SelectedValue="{Binding SelectedGender, Mode=TwoWay}"
SelectedValuePath="Gender"
DisplayMemberPath="DisplayName"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Grid.Row="6"
Grid.Column="2"
Margin="0, 5"/>
<Label Grid.Row="9" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_name}" VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Cmdr.squadronname, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged, TargetNullValue=''}"
IsReadOnly="True"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Margin="0,5"
Grid.Row="9"
Grid.Column="1" Grid.ColumnSpan ="3" />
<Label Grid.Row="10" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_tag}" VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Cmdr.squadrontag, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged, TargetNullValue=''}"
IsReadOnly="True"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Margin="0,5"
Grid.Row="10"
Grid.Column="1" />
<Label Grid.Row="11" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_rank}" VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Cmdr.squadronrank.localizedName, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged, TargetNullValue=''}"
IsReadOnly="True"
Grid.Row="11"
Grid.Column="1"
Grid.ColumnSpan="3"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Margin="0,5" />
<Label Grid.Row="12" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_system}" VerticalAlignment="Center" />
<eddiCore:StarSystemComboBox
x:Name="SquadronSystemComboBox"
SelectedItem="{Binding Path=SquadronSystemName, Mode=TwoWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True"
IsTextSearchEnabled="False"
Grid.Row="12"
Grid.Column="1" Grid.ColumnSpan ="3"
Margin="0, 5"
VerticalContentAlignment="Center" />
<Label Grid.Row="13" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_faction}" />
<ComboBox
x:Name="SquadronFactionComboBox"
ItemsSource="{Binding Path=SquadronFactions, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Path=SelectedSquadronFaction, Mode=TwoWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="name"
Grid.Row="13"
Grid.Column="1" Grid.ColumnSpan ="2"
Margin="0, 5"
VerticalContentAlignment="Center" />
<Label Grid.Row="14" Grid.Column="0" VerticalContentAlignment="Center" Content="{x:Static resx:Resources.tab_commander_squadron_power}" />
<ComboBox
ItemsSource="{Binding Path=SquadronPowers, Mode=OneWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Path=SelectedSquadronPower, Mode=TwoWay, NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="localizedName"
Grid.Row="14"
Grid.Column="1" Grid.ColumnSpan ="2"
Margin="0, 5"
VerticalContentAlignment="Center" />
</Grid>
</DockPanel>
</UserControl>