-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
518 lines (474 loc) · 36.8 KB
/
Copy pathMainWindow.xaml
File metadata and controls
518 lines (474 loc) · 36.8 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<Window x:Class="File_Renamer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="File Renamer"
Width="1050"
MinWidth="950"
SizeToContent="Height"
MaxHeight="{Binding Source={x:Static SystemParameters.WorkArea}, Path=Height}"
WindowStartupLocation="CenterScreen"
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
ResizeMode="NoResize"
MouseDown="Window_MouseDown" FontFamily="Segoe UI"
Icon="/assets/icon.ico">
<Window.Resources>
<SolidColorBrush x:Key="AppBgBrush" Color="#F0F2F5"/>
<SolidColorBrush x:Key="CardBgBrush" Color="#FFFFFF"/>
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#212529"/>
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#495057"/>
<SolidColorBrush x:Key="BorderDefaultBrush" Color="#DEE2E6"/>
<SolidColorBrush x:Key="ControlBgBrush" Color="#E9ECEF"/>
<Style x:Key="CenterAlignStyle" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="Border" x:Key="CardContainer">
<Setter Property="Background" Value="{DynamicResource CardBgBrush}"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="20"/>
<Setter Property="Margin" Value="0,0,0,15"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderDefaultBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style TargetType="Button" x:Key="ModernButton">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="15,0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Height" Value="34"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6"/>
<Border x:Name="hoverOverlay" Background="White" Opacity="0" CornerRadius="6" IsHitTestVisible="False"/>
<Border x:Name="pressedOverlay" Background="Black" Opacity="0" CornerRadius="6" IsHitTestVisible="False"/>
<ContentPresenter Focusable="False" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="hoverOverlay" Property="Opacity" Value="0.15"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="pressedOverlay" Property="Opacity" Value="0.15"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ControlBgBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button" x:Key="IconButton">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Width" Value="34"/>
<Setter Property="Height" Value="34"/>
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="{DynamicResource ControlBgBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ControlBgBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
<Setter Property="Padding" Value="10,12"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderDefaultBrush}"/>
</Style>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="10,8"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThemeToggleSwitchStyle" TargetType="ToggleButton">
<Setter Property="Width" Value="52"/>
<Setter Property="Height" Value="28"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid>
<Border x:Name="Track" Background="{DynamicResource ControlBgBrush}" CornerRadius="14" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1.5"/>
<Border x:Name="Knob" Background="#2D2D2D" Width="22" Height="22" CornerRadius="11" HorizontalAlignment="Left" Margin="3">
<Grid>
<Grid>
<Path x:Name="SunIcon" Data="M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5S14.76,7,12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1S11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L18.36,16.95z M7.05,18.36c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41l-1.06-1.06c-0.39-0.39-1.03-0.39-1.41,0L7.05,18.36z M16.95,5.99c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41l-1.06-1.06c-0.39-0.39-1.03-0.39-1.41,0s-0.39,1.03,0,1.41L16.95,5.99z"
Fill="#FFB900" Stretch="Uniform" Width="14" Height="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Path x:Name="MoonIcon" Data="M9.37,5.51C9.19,6.13,9.1,6.79,9.1,7.47c0,3.76,3.05,6.81,6.81,6.81c0.68,0,1.34-0.09,1.96-0.27c-1.12,1.71-3.04,2.84-5.23,2.84c-3.48,0-6.31-2.83-6.31-6.31C6.34,8.35,7.56,6.51,9.37,5.51z"
Fill="#546E7A" Stretch="Uniform" Width="13" Height="13" Opacity="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Knob" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="Knob" Property="Background" Value="White"/>
<Setter TargetName="SunIcon" Property="Opacity" Value="0"/>
<Setter TargetName="MoonIcon" Property="Opacity" Value="1"/>
<Setter TargetName="Track" Property="BorderBrush" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="6"
Background="{DynamicResource ControlBgBrush}"
BorderBrush="{DynamicResource BorderDefaultBrush}"
BorderThickness="1" />
<Path x:Name="Arrow" Grid.Column="1" Fill="{DynamicResource TextSecondaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Data="M0,0 L0,2 L4,6 L8,2 L8,0 L4,4 z" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource BorderDefaultBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="ComboBox" x:Key="ModernComboBox">
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
<Setter Property="Background" Value="{DynamicResource ControlBgBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Focusable="false"
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" />
<ContentPresenter Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}"
Margin="12,0,30,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
<Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="200">
<Border x:Name="DropDownBorder" Background="{DynamicResource CardBgBrush}" BorderThickness="1"
BorderBrush="{DynamicResource BorderDefaultBrush}" CornerRadius="6" Margin="0,4,0,0">
<Border.Effect>
<DropShadowEffect ShadowDepth="2" BlurRadius="6" Opacity="0.15" Direction="270"/>
</Border.Effect>
<ScrollViewer Margin="0,4" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Border>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBoxItem" x:Key="ModernComboBoxItem">
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Padding" Value="12,8" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border Name="Border" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlBgBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="Border" Property="Background" Value="#0D6EFD" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ModernThumbStyle" TargetType="Thumb">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border Background="DarkGray" CornerRadius="6" MaxWidth="10" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ScrollBar">
<Setter Property="Width" Value="5"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Track x:Name="PART_Track" IsDirectionReversed="True">
<Track.Thumb>
<Thumb Style="{StaticResource ModernThumbStyle}"/>
</Track.Thumb>
</Track>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border Background="{DynamicResource AppBgBrush}" CornerRadius="10" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="Transparent" MouseDown="Window_MouseDown" KeyboardNavigation.TabNavigation="None">
<StackPanel Orientation="Horizontal" Margin="20,0,0,0" VerticalAlignment="Center">
<Image Source="/assets/icon.ico" Width="18" Height="18" Margin="0,0,10,0" RenderOptions.BitmapScalingMode="HighQuality"/>
<TextBlock Text="File Renamer" Foreground="{DynamicResource TextPrimaryBrush}" FontWeight="Bold" FontSize="14"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
<ToggleButton x:Name="tglTheme" Style="{StaticResource ThemeToggleSwitchStyle}" VerticalAlignment="Center" Margin="0,0,10,0" Checked="tglTheme_Checked" Unchecked="tglTheme_Unchecked"/>
<Button x:Name="BtnAbout" Style="{StaticResource IconButton}" Click="BtnAbout_Click" ToolTip="About App" Margin="0,0,5,0">
<Image Source="/assets/info.png" Width="23" Height="23" RenderOptions.BitmapScalingMode="HighQuality"/>
</Button>
<Button Style="{StaticResource IconButton}" Content="✕" FontSize="18" Click="BtnClose_Click"/>
</StackPanel>
</Grid>
<Grid Grid.Row="1" Margin="15,0,15,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="380"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid x:Name="LeftCardPanel" Grid.Column="0" Margin="0,0,15,0" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto" Margin="0,0,-5,0" Padding="0,0,5,0">
<StackPanel>
<Border Style="{StaticResource CardContainer}" KeyboardNavigation.TabNavigation="None">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
<Path Data="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" Fill="#0D6EFD" Width="18" Height="18" Stretch="Uniform" VerticalAlignment="Center"/>
<TextBlock Text="Directory" FontWeight="Bold" FontSize="15" Foreground="#0D6EFD" Margin="10,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
<TextBlock Text="Source Folder:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<Grid Margin="0,0,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ControlBgBrush}">
<TextBox x:Name="TxtSourceFolder" IsReadOnly="True" Height="32" Padding="10,0" VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent" Foreground="{DynamicResource TextPrimaryBrush}"/>
</Border>
<Button x:Name="BtnBrowseSource" Content="Browse" Grid.Column="1" Click="BtnBrowseSource_Click" Style="{StaticResource ModernButton}" Background="#6C757D" Margin="10,0,0,0"/>
</Grid>
<StackPanel x:Name="OutputFolderSection" IsEnabled="False">
<TextBlock Text="Output Folder:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1" CornerRadius="4" Background="{DynamicResource ControlBgBrush}">
<TextBox x:Name="TxtOutputFolder" IsReadOnly="True" Height="32" Padding="10,0" VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"/>
</Border>
<Button x:Name="BtnBrowseOutput" Content="Browse" Grid.Column="1" Click="BtnBrowseOutput_Click" Style="{StaticResource ModernButton}" Background="#6C757D" Margin="10,0,0,0"/>
</Grid>
</StackPanel>
</StackPanel>
</Border>
<Border Grid.Column="1" Style="{StaticResource CardContainer}" Margin="10,0,0,0">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,15" VerticalAlignment="Center">
<Path Data="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.06-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.73,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.06,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.43-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.49-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" Fill="#0D6EFD" Width="16" Height="16" Stretch="Uniform" VerticalAlignment="Center"/>
<TextBlock Text="Settings" FontWeight="Bold" FontSize="15" Foreground="#0D6EFD" Margin="10,0,0,0"/>
</StackPanel>
<Grid Margin="0,0,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="170"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<RadioButton x:Name="RbInPlace" Foreground="{DynamicResource TextPrimaryBrush}" Content="Rename in-place"
Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" IsChecked="True"/>
<RadioButton x:Name="RbCopy" Foreground="{DynamicResource TextPrimaryBrush}" Content="Copy to new folder"
Grid.Row="0" Grid.Column="1" Margin="0,0,0,10" Checked="ModeSelection_Changed" Unchecked="ModeSelection_Changed"/>
<CheckBox x:Name="ChkCreateRestoreLog" Foreground="{DynamicResource TextPrimaryBrush}" Content="Create restore log"
Grid.Row="1" Grid.Column="0" IsChecked="True"/>
<CheckBox x:Name="ChkSoundNotif" Foreground="{DynamicResource TextPrimaryBrush}" Content="Play sound notification"
Grid.Row="1" Grid.Column="1" IsChecked="False"/>
</Grid>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="0,0,5,0">
<TextBlock Text="Find:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<TextBox x:Name="TxtFind" Height="32" Padding="8,0" VerticalContentAlignment="Center" TextChanged="TxtFind_TextChanged"/>
</StackPanel>
<StackPanel Grid.Column="1" Margin="5,0,0,0">
<TextBlock Text="Replace with:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<TextBox x:Name="TxtReplace" Height="32" Padding="8,0" VerticalContentAlignment="Center" TextChanged="TxtReplace_TextChanged"/>
</StackPanel>
</Grid>
<Grid Margin="0,0,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="0,0,5,0">
<TextBlock Text="Extension Filter:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<TextBox x:Name="TxtExtension" Height="32" Padding="8,0" VerticalContentAlignment="Center"/>
</StackPanel>
<Button x:Name="BtnToggleAdvanced" Grid.Column="1" Content="Advanced Setting ▼" VerticalAlignment="Bottom" Height="32" Margin="5,0,0,0" Click="BtnToggleAdvanced_Click" Style="{StaticResource ModernButton}" Background="#E9ECEF" Foreground="#495057"/>
</Grid>
<StackPanel x:Name="AdvancedPanel" Visibility="Collapsed">
<TextBlock Text="Presets Rule:" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="12" Margin="0,0,0,5"/>
<ComboBox x:Name="CmbPresets" Style="{StaticResource ModernComboBox}" Height="32" Margin="0,0,0,10" SelectionChanged="CmbPresets_SelectionChanged">
<ComboBoxItem Content="Standard Replace"/>
<ComboBoxItem Content="Remove Brackets"/>
<ComboBoxItem Content="Remove Numbers"/>
<ComboBoxItem Content="Remove Symbols"/>
<ComboBoxItem Content="Remove Extra Spaces"/>
<ComboBoxItem Content="Trim Leading/Trailing Spaces"/>
<ComboBoxItem Content="Spaces to Underscores"/>
<ComboBoxItem Content="Spaces to Dashes"/>
<ComboBoxItem Content="Remove Leading Track Numbers"/>
<ComboBoxItem Content="Custom Regex"/>
</ComboBox>
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="0,0,5,0">
<TextBlock Text="Example Input:" FontSize="11" Margin="0,0,0,3" Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBox x:Name="TxtExInput" Text="sample(@123#)★" Height="28" IsReadOnly="True" Background="#F8F9FA" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="11"/>
</StackPanel>
<StackPanel Grid.Column="1" Margin="5,0,0,0">
<TextBlock Text="Example Output:" FontSize="11" Margin="0,0,0,3" Foreground="{DynamicResource TextPrimaryBrush}"/>
<TextBox x:Name="TxtExOutput" Height="28" IsReadOnly="True" Background="#F8F9FA" Foreground="#0056B3" FontWeight="Bold" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="11"/>
</StackPanel>
</Grid>
<StackPanel x:Name="CheatSheetPanel" Visibility="Collapsed" Margin="0,10,0,0">
<TextBlock Text="Regex Cheat Sheet:" FontWeight="SemiBold" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}" Margin="0,0,0,4"/>
<UniformGrid Columns="2" Margin="0,0,0,6">
<TextBlock Text="• \d+ = Match all numbers" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}" Margin="0,0,4,2"/>
<TextBlock Text="• [abc] = Match a, b, or c" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}" Margin="0,0,0,2"/>
<TextBlock Text="• \s = Match space" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}" Margin="0,0,4,0"/>
<TextBlock Text="• .* = Match everything" FontSize="11" Foreground="{DynamicResource TextPrimaryBrush}" Margin="0,0,0,0"/>
</UniformGrid>
<TextBlock Text="Capture Groups: Use ( ) in Find, and $1 in Replace." FontSize="11" Foreground="#0078D4" FontWeight="SemiBold"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
<Grid Grid.Row="1" Margin="0,15,0,0" KeyboardNavigation.TabNavigation="None">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.2*"/>
</Grid.ColumnDefinitions>
<Button x:Name="BtnRestore" Content="Restore" Grid.Column="0" Margin="0,0,5,0" Click="BtnRestore_Click" Style="{StaticResource ModernButton}" Background="#FFC107" Foreground="#212529" IsEnabled="False"/>
<Button x:Name="BtnCancel" Content="Cancel" Grid.Column="1" Margin="5,0,5,0" Click="BtnCancel_Click" Style="{StaticResource ModernButton}" Background="#DC3545" IsEnabled="False"/>
<Button x:Name="BtnRename" Content="Rename" Grid.Column="2" Margin="5,0,0,0" Click="BtnRename_Click" Style="{StaticResource ModernButton}" Background="#0D6EFD" Foreground="White"/>
</Grid>
</Grid>
<Border Grid.Column="1" Background="{DynamicResource CardBgBrush}" CornerRadius="8" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1" ClipToBounds="True" KeyboardNavigation.TabNavigation="None">
<DataGrid Name="DgLog"
MaxHeight="{Binding ElementName=LeftCardPanel, Path=ActualHeight}"
ScrollViewer.VerticalScrollBarVisibility="Auto"
AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True"
HeadersVisibility="Column" Background="Transparent" Foreground="{DynamicResource TextPrimaryBrush}"
RowBackground="Transparent" BorderBrush="{DynamicResource BorderDefaultBrush}" BorderThickness="1"
RowHeight="32" GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="{DynamicResource BorderDefaultBrush}"
EnableRowVirtualization="True" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling">
<DataGrid.Resources>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="5,0"/>
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{DynamicResource ControlBgBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="10,8"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderDefaultBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="SOURCE FILE" Binding="{Binding OriginalName}" Width="*" ElementStyle="{StaticResource CenterAlignStyle}"/>
<DataGridTextColumn Header="DESTINATION" Binding="{Binding NewName}" Width="*" ElementStyle="{StaticResource CenterAlignStyle}"/>
<DataGridTextColumn Header="STATUS" Binding="{Binding Status}" Width="120">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock" BasedOn="{StaticResource CenterAlignStyle}">
<Setter Property="FontWeight" Value="Bold"/>
<Style.Triggers>
<!-- Success states -->
<DataTrigger Binding="{Binding Status}" Value="COMPLETE">
<Setter Property="Foreground" Value="#198754"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="Renamed">
<Setter Property="Foreground" Value="#198754"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="Copied">
<Setter Property="Foreground" Value="#198754"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="Restored">
<Setter Property="Foreground" Value="#198754"/>
</DataTrigger>
<!-- Error/destructive states -->
<DataTrigger Binding="{Binding Status}" Value="Failed">
<Setter Property="Foreground" Value="#DC3545"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="Deleted">
<Setter Property="Foreground" Value="#DC3545"/>
</DataTrigger>
<!-- Neutral state -->
<DataTrigger Binding="{Binding Status}" Value="Missing">
<Setter Property="Foreground" Value="#6C757D"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Grid>
</Border>
</Window>