-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocalLibrarySettingsView.xaml
181 lines (176 loc) · 12.3 KB
/
LocalLibrarySettingsView.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="LocalLibrary.LocalLibrarySettingsView"
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"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="600">
<ScrollViewer>
<TabControl>
<TabItem BorderThickness="0.5">
<TabItem.Header>
Source and Platform
</TabItem.Header>
<Grid Margin="0,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Source" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="0" Margin="10" VerticalAlignment="Center"/>
<ComboBox x:Name="SourceList" ItemsSource="{Binding Settings.PluginSources}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding Settings.SelectedSource}" MinWidth="150" Grid.Column="1" Grid.Row="0" Margin="10"/>
<TextBlock Text="Platform" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="0" Margin="10" VerticalAlignment="Center"/>
<ComboBox x:Name="PlatformList" ItemsSource="{Binding Settings.Platforms}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding Settings.SelectedPlatform}" MinWidth="150" Grid.Column="1" Grid.Row="1" Margin="10"/>
<CheckBox IsChecked="{Binding Settings.AutoUpdate}" Content="Apply to games in the selected Source automatically" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"/>
<Button x:Name="ApplyPluginId" Content="Apply PluginId" Margin="10" Click="Button_ApplyPluginId_Click" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="3"/>
</Grid>
</TabItem>
<TabItem BorderThickness="0.5">
<TabItem.Header>
Installer Path(s)
</TabItem.Header>
<Grid Margin="0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.6*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<CheckBox x:Name="cbActions" IsChecked="{Binding Settings.UseActions}" Content="Use Actions instead of ROMS for storing Installer path." Margin="10,0,0,10" Grid.Row="0" Grid.ColumnSpan="3"/>
<CheckBox x:Name="cbPaths" IsChecked="{Binding Settings.UsePaths}" Content="On Library Update, import new game installers added to the paths below." Margin="10,0,0,10" Grid.Row="1" Grid.ColumnSpan="3"/>
<!--<CheckBox IsChecked="{Binding Settings.RemovePlay}" Content="Remove Play Action after uninstalling game." Margin="0,10,0,0"/>-->
<ListBox x:Name="PathsBox" ItemsSource="{Binding Settings.InstallPaths}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
Margin="10,0,20,0" MinHeight="25" MinWidth="200" VerticalAlignment="Center" SelectionMode="Extended"/>
<Button x:Name="AddPath" Content="Add Path" Margin="10,15,10,10" Command="{Binding AddPathCommand}"
Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" MinHeight="25"/>
<Button x:Name="RemovePath" Content="Remove Path" Margin="10,15,10,10" Command="{Binding RemovePathCommand}"
Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" MinHeight="25" HorizontalAlignment="Right"
CommandParameter="{Binding SelectedItems, ElementName=PathsBox}"/>
<TextBlock Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Center" Margin="10" TextWrapping="Wrap" Text="Select the number to represent the % match you want in order to consider a path excluded. For example, if you select 94, any path found where you already have a game with an installer path that matches by 94% or higher would be excluded as long as it is the only path that meets those requirements. This is only comparing the 1st subfolder names, so keep that in mind. Between 90 and 95 will probably work for most people." />
<StackPanel Orientation="Horizontal" Margin="10" Grid.Row="5">
<TextBlock VerticalAlignment="Center"
Text="Percentage"
Margin="0,0,10,0" />
<TextBox VerticalAlignment="Center"
IsReadOnly="True" MinWidth="35"
Margin="0,0,10,0"
Text="{Binding Settings.Levenshtein}" />
<Slider IsSnapToTickEnabled="True" Minimum="81"
x:Name="LevenSlider"
Width="200"
VerticalAlignment="Center"
TickFrequency="1"
Value="{Binding Settings.Levenshtein}"
Maximum="100" />
</StackPanel>
<Button x:Name="AddGames" Content="Add Games" Margin="0,10,10,5" Click="Button_AddGames_Click" Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" MinHeight="25" MinWidth="100" HorizontalAlignment="Left"/>
</Grid>
</TabItem>
<TabItem BorderThickness="0.5">
<TabItem.Header>
Ignore List
</TabItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Instruction Text -->
<TextBlock Margin="15,10,0,10" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" TextWrapping="Wrap">
Lists to automatically remove from folder name when setting the Name for a new Game
</TextBlock>
<!-- Regex Patterns GroupBox -->
<GroupBox Grid.Column="0" Grid.Row="1" Margin="10">
<GroupBox.Header>
Regex Patterns
</GroupBox.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox x:Name="RegexList" ItemsSource="{Binding Settings.RegexList}" MinHeight="100" Margin="10" SelectionMode="Extended"/>
<Grid Grid.Row="1" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="RegexBox" Text="{Binding NewRegexText, UpdateSourceTrigger=PropertyChanged}" MinWidth="100" Margin="5" Grid.Column="0" />
<Button x:Name="AddRegex" Content="Add" Margin="5" Command="{Binding AddRegexCommand}" Grid.Column="1"/>
<Button x:Name="RemoveRegex" Content="Remove" Margin="5" Command="{Binding RemoveRegexCommand}" Grid.Column="2"
CommandParameter="{Binding SelectedItems, ElementName=RegexList}"/>
</Grid>
</Grid>
</GroupBox>
<!-- Strings GroupBox -->
<GroupBox Grid.Column="1" Grid.Row="1" Margin="10">
<GroupBox.Header>
Strings
</GroupBox.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox x:Name="StringList" ItemsSource="{Binding Settings.StringList}" MinHeight="100" Margin="10" SelectionMode="Extended"/>
<Grid Grid.Row="1" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="StringBox" Text="{Binding NewStringText, UpdateSourceTrigger=PropertyChanged}" MinWidth="100" Margin="5" Grid.Column="0"/>
<Button x:Name="AddString" Content="Add" Margin="5" Command="{Binding AddStringCommand}" Grid.Column="1"/>
<Button x:Name="RemoveString" Content="Remove" Margin="5" Command="{Binding RemoveStringCommand}" Grid.Column="2"/>
</Grid>
</Grid>
</GroupBox>
</Grid>
</TabItem>
<TabItem BorderThickness="0.5">
<TabItem.Header>
Unarchiver
</TabItem.Header>
<StackPanel>
<GroupBox Margin="0,10,0,10" BorderThickness="0.5" VerticalAlignment="Bottom">
<GroupBox.Header>
Tool Selection
</GroupBox.Header>
<DockPanel>
<RadioButton x:Name="RB7z" IsChecked="{Binding Settings.RB7z}" Margin="10"/>
<Label Margin="0,0,5,0" VerticalAlignment="Center">7zip</Label>
<RadioButton x:Name="RBRar" IsChecked="{Binding Settings.RBRar}" Margin="10"/>
<Label Margin="0,0,5,0" VerticalAlignment="Center">WinRar</Label>
</DockPanel>
</GroupBox>
<DockPanel Margin="10,0,0,20" VerticalAlignment="Bottom">
<TextBlock Text="Path" Margin="0,0,5,0" VerticalAlignment="Center"/>
<TextBox x:Name="ArchivePath" MinWidth="300" MaxWidth="450" VerticalAlignment="Center" Height="25" Margin="10">
<TextBox.Text>
<Binding Path="Settings.ArchivePath" UpdateSourceTrigger="PropertyChanged"/>
</TextBox.Text>
</TextBox>
<Button x:Name="ArchiveBrowse" Content="Browse" Margin="10" Click="Button_ArchiveBrowse_Click" VerticalAlignment="Center" HorizontalAlignment="Left"/>
</DockPanel>
</StackPanel>
</TabItem>
</TabControl>
</ScrollViewer>
</UserControl>