-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathPluginOptionsWindow.xaml
49 lines (47 loc) · 2.73 KB
/
PluginOptionsWindow.xaml
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
<Window x:Class="FSClient.PluginOptionsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FSClient" Title="PluginOptionsWindow" Height="500" Width="600">
<Window.Resources>
<local:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="110" />
<RowDefinition Height="20" />
<RowDefinition />
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="Contact Plugin" TextAlignment="Center" FontWeight="Bold" />
<TextBlock Text="Headset Plugins" Grid.Column="1" TextAlignment="Center" FontWeight="Bold" />
<ComboBox HorizontalAlignment="Center" Name="comboContact" VerticalAlignment="Top" Width="220" Grid.Row="1" AutomationProperties.Name="Contact Plugin Enabled" />
<ListBox Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Height="100" HorizontalAlignment="Center" Name="listHeadset" VerticalAlignment="Top" Width="220" SelectionMode="Multiple" AutomationProperties.Name="Headset Plugins" />
<TextBlock Text="Enabled Plugins" Grid.Row="2" Grid.ColumnSpan="2" FontWeight="Bold" TextAlignment="Center" />
<ItemsControl Grid.Row="3" Grid.ColumnSpan="2" Name="itemscontrolEnabledPlugins" AutomationProperties.Name="Plugin Options">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="1" Margin="0,3" Width="500">
<StackPanel Orientation="Horizontal" Margin="5">
<Button Content="Options" Visibility="{Binding has_options_button, Converter={StaticResource BoolToVisibilityConverter}}" Click="btn_PluginOptions_Click">
<AutomationProperties.Name>
<MultiBinding StringFormat="Plugin {0} Options - {1}">
<Binding Path="name" />
<Binding Path="error_msg" />
</MultiBinding>
</AutomationProperties.Name>
</Button>
<Image Source="warning.png" Margin="10,0" Visibility="{Binding error_exists, Converter={StaticResource BoolToVisibilityConverter}}" ToolTip="{Binding error_msg}" Height="20" />
<TextBlock Text="{Binding name}" VerticalAlignment="Center" />
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Content="Save" Grid.Row="4" Height="22" Width="50" Name="btnSave" Click="btnSave_Click" IsDefault="True" />
<Button Content="Cancel" Grid.Row="4" Height="22" Width="50" Grid.Column="1" Name="btnCancel" Click="btnCancel_Click" IsCancel="True" />
</Grid>
</Window>