-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
HtmlExporterPluginSettingsView.xaml
181 lines (169 loc) · 14.5 KB
/
HtmlExporterPluginSettingsView.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
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
178
179
180
181
<UserControl x:Class="HtmlExporterPlugin.HtmlExporterPluginSettingsView"
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:local="clr-namespace:HtmlExporterPlugin"
mc:Ignorable="d" d:DesignWidth="688" d:DesignHeight="526.333">
<UserControl.Resources>
<local:BooleanConverter x:Key="BooleanConverter" />
<local:FieldToFieldTextConverter x:Key="FieldToFieldTextConverter" />
<local:RowNumberConverter x:Key="RowNumberConverter" />
<ContextMenu x:Key="cmRevert">
<MenuItem Name="MnuDefaultGrid" Header="{DynamicResource LOC_HTMLEXPORTER_MnuDefaultGrid}" Click="MnuDefaultGrid_Click" />
<MenuItem Name="MnuDefaultList" Header="{DynamicResource LOC_HTMLEXPORTER_MnuDefaultList}" Click="MnuDefaultList_Click" />
<MenuItem Name="MnuDefaultTable" Header="{DynamicResource LOC_HTMLEXPORTER_MnuDefaultTable}" Click="MnuDefaultTable_Click"/>
<MenuItem Name="MnuDefaultListText" Header="{DynamicResource LOC_HTMLEXPORTER_MnuDefaultListText}" Click="MnuDefaultListText_Click" />
<MenuItem Name="MnuDefaultTableText" Header="{DynamicResource LOC_HTMLEXPORTER_MnuDefaultTableText}" Click="MnuDefaultTableText_Click"/>
</ContextMenu>
<Style x:Key="NoSpaceItems" TargetType="ComboBoxItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
</Style>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="DarkGray"/>
</UserControl.Resources>
<ScrollViewer Name="ScrollViewer" VerticalScrollBarVisibility="Auto" Margin="0,10,0,0">
<StackPanel Margin="5">
<GroupBox Margin="0,0,0,0">
<GroupBox.Header>
<Label FontWeight="Bold" Content="{DynamicResource LOC_HTMLEXPORTER_GenericSettings}"/>
</GroupBox.Header>
<StackPanel>
<Label Content="{DynamicResource LOC_HTMLEXPORTER_OutPutFolder}"/>
<Grid>
<TextBox Height="23"
Text="{Binding Settings.OutputFolder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Name="TbOutputFolder" HorizontalContentAlignment="Stretch" Margin="0,0,110,0">
</TextBox>
<Button x:Name="ButSelectFolder" DockPanel.Dock="Right" Content="{DynamicResource LOC_HTMLEXPORTER_Select}" Width="105" HorizontalContentAlignment="Center" HorizontalAlignment="Right" Click="ButSelectFolder_Click"/>
</Grid>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<CheckBox Name="ChkEraseOutputFolder" Margin="0,0,5,0" IsChecked="{Binding Settings.EraseOutputFolder}" Content="{DynamicResource LOC_HTMLEXPORTER_EraseOutPutFolder}" VerticalAlignment="Center" HorizontalAlignment="Left" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<CheckBox Name="ChkCopyImages" Margin="0,0,5,0" IsChecked="{Binding Settings.CopyImages}" Content="{DynamicResource LOC_HTMLEXPORTER_CopyImages}" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Button Name="ButImageOptions" Margin="0,0,5,0" Content="{DynamicResource LOC_HTMLEXPORTER_Options}" Click="ButImageOptions_Click" Width="85" />
<CheckBox Grid.Column="2" Name="ChkHiddenGames" Margin="0,5,0,0" IsChecked="{Binding Settings.ExcludeHiddenGames}" Content="{DynamicResource LOC_HTMLEXPORTER_ExcludeHiddenGames}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
<Label Grid.Column="0" Content="{DynamicResource LOC_HTMLEXPORTER_ExcludedPlatforms}"/>
<ComboBox Grid.Column="1" x:Name="PlatformsComboBox" ItemContainerStyle="{StaticResource NoSpaceItems}" StaysOpenOnEdit="True" IsSynchronizedWithCurrentItem="False" IsEditable="True" PreviewKeyUp="PlatformsComboBox_PreviewKeyUp" IsTextSearchEnabled="False" DropDownClosed="PlatformsComboBox_DropDownClosed" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="5,0,0,0" Width="100"/>
<Label Grid.Column="2" Margin="5,0,0,0" Content="{DynamicResource LOC_HTMLEXPORTER_ExcludedSources}"/>
<ComboBox Grid.Column="3" x:Name="SourceComboBox" ItemContainerStyle="{StaticResource NoSpaceItems}" StaysOpenOnEdit="True" IsSynchronizedWithCurrentItem="False" IsEditable="True" PreviewKeyUp="SourceComboBox_PreviewKeyUp" IsTextSearchEnabled="False" Margin="5,0,0,0" DropDownClosed="SourceComboBox_DropDownClosed" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Width="100"/>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Margin="0,5,0,0">
<GroupBox.Header>
<Label FontWeight="Bold" Content="{DynamicResource LOC_HTMLEXPORTER_PageSettings}"/>
</GroupBox.Header>
<StackPanel>
<DataGrid Margin="0,0,0,0" SelectionMode="Single" x:Name="PagesDataGrid" Height="164" AutoGenerateColumns="False"
CanUserSortColumns="False" Loaded="PagesDataGrid_Loaded" EnableRowVirtualization="False" HeadersVisibility="Column">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridRow}, Converter={StaticResource RowNumberConverter}}" />
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColPageTitle}" Binding="{Binding Pagetitle}" Width="6*" IsReadOnly="True"/>
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColTemplate}" Binding="{Binding Templatefoldername}" Width="5*" IsReadOnly="True"/>
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColGroupField}" Binding="{Binding Groupfield, Converter={StaticResource FieldToFieldTextConverter}}" Width="4*" IsReadOnly="True"/>
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColAsc}" Binding="{Binding GroupAscending, Converter={StaticResource BooleanConverter}}" Width="60" IsReadOnly="True"/>
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColSortField}" Binding="{Binding Sortfield, Converter={StaticResource FieldToFieldTextConverter}}" Width="4*" IsReadOnly="True"/>
<DataGridTextColumn Header="{DynamicResource LOC_HTMLEXPORTER_ColAsc}" Binding="{Binding SortAscending, Converter={StaticResource BooleanConverter}}" Width="60" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
<StackPanel Margin="0,5,0,0">
<Grid x:Name="GridPanel" Margin="0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="190"/>
<ColumnDefinition Width="8*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource LOC_HTMLEXPORTER_ColPageTitle}"/>
<TextBox Grid.Row="0" Grid.Column="1" Name="PageTitle" Height="23" DataContext="{Binding Path=SelectedItem, ElementName=PagesDataGrid}"
Text="{Binding Pagetitle}" VerticalAlignment="Center" HorizontalAlignment="Stretch" />
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource LOC_HTMLEXPORTER_ColTemplate}"/>
<Grid Grid.Row="1" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width= "*"/>
<ColumnDefinition Width= "*"/>
</Grid.ColumnDefinitions>
<ComboBox Grid.Row="0" Grid.Column="0" Name="TemplateFolder"
SelectedValue="{Binding Path=SelectedItem.Templatefoldername, ElementName=PagesDataGrid}"
Height="23" ItemsSource="{Binding AvailableTemplateFolders}" VerticalAlignment="Center"
HorizontalAlignment="Stretch" Margin="0,5,0,0" />
</Grid>
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource LOC_HTMLEXPORTER_ColGroupField}" />
<Grid Grid.Row="2" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width= "43*"/>
<ColumnDefinition Width="81*"/>
<ColumnDefinition Width="126*"/>
<ColumnDefinition Width= "250*"/>
</Grid.ColumnDefinitions>
<ComboBox Grid.Row="0" Grid.Column="0" Name="GroupField" Height="23" ItemsSource="{Binding AvailableGroupFields}"
SelectedValue="{Binding Path=SelectedItem.Groupfield, ElementName=PagesDataGrid}" VerticalAlignment="Center"
HorizontalAlignment="Stretch" Margin="0,5,0,0" Grid.ColumnSpan="3">
<ComboBox.ItemTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding Converter={StaticResource FieldToFieldTextConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<CheckBox Grid.Row="0" Grid.Column="3" Name="GroupAsc" DataContext="{Binding Path=SelectedItem, ElementName=PagesDataGrid}"
IsChecked="{Binding GroupAscending}" HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="5,8,0,5" Content="{DynamicResource LOC_HTMLEXPORTER_Ascending}"/>
</Grid>
<Label Grid.Row="4" Grid.Column="0" Content="{DynamicResource LOC_HTMLEXPORTER_ColSortField}" />
<Grid Grid.Row="4" Grid.Column="1" >
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width= "*"/>
<ColumnDefinition Width= "*"/>
</Grid.ColumnDefinitions>
<ComboBox Grid.Row="0" Grid.Column="0" Name="SortField" Height="23" ItemsSource="{Binding AvailableSortFields}"
SelectedValue="{Binding Path=SelectedItem.Sortfield, ElementName=PagesDataGrid}" VerticalAlignment="Center"
HorizontalAlignment="Stretch" Margin="0,5,0,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding Converter={StaticResource FieldToFieldTextConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<CheckBox Grid.Row="0" Grid.Column="1" Name="SortAsc" DataContext="{Binding Path=SelectedItem, ElementName=PagesDataGrid}"
IsChecked="{Binding SortAscending}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,5,0,0" Content="{DynamicResource LOC_HTMLEXPORTER_Ascending}"/>
</Grid>
</Grid>
</StackPanel>
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Name="BtnAdd" Grid.Column="0" Margin="4,0,4,0" Click="BtnAdd_Click" Content="{DynamicResource LOC_HTMLEXPORTER_ButAddPage}"></Button>
<Button Name="BtnDel" Grid.Column="1" Margin="4,0,4,0" Click="BtnDel_Click" Content="{DynamicResource LOC_HTMLEXPORTER_ButDelPage}"></Button>
<Button Name="BtnMoveUp" Grid.Column="2" Margin="4,0,4,0" Click="BtnMoveUp_Click" Content="{DynamicResource LOC_HTMLEXPORTER_ButPageUp}"></Button>
<Button Name="BtnMoveDown" Grid.Column="3" Margin="4,0,4,0" Click="BtnMoveDown_Click" Content="{DynamicResource LOC_HTMLEXPORTER_ButPageDown}"></Button>
<Button Name="BtnReset" Grid.Column="4" Margin="4,0,4,0" Click="BtnReset_Click" VerticalAlignment="Bottom" Content="{DynamicResource LOC_HTMLEXPORTER_ButRevertTo}"></Button>
</Grid>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</UserControl>