-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
386 lines (359 loc) · 19.5 KB
/
MainWindow.xaml
File metadata and controls
386 lines (359 loc) · 19.5 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
<Window x:Class="zrobts.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:zrobts"
Title="NoTrace - Secure Data Wipe"
Height="650" Width="900"
Icon="Assets/logo_zero_bytes.ico"
WindowStartupLocation="CenterScreen"
Background="#0d1117"
FontFamily="pack://application:,,,/Fonts/#JetBrains Mono">
<Window.Resources>
<!-- Cores do tema -->
<Color x:Key="PrimaryColor">#6366f1</Color>
<Color x:Key="PrimaryDarkColor">#4f46e5</Color>
<Color x:Key="AccentColor">#22d3ee</Color>
<Color x:Key="WarningColor">#f59e0b</Color>
<Color x:Key="DangerColor">#ef4444</Color>
<Color x:Key="SuccessColor">#22c55e</Color>
<Color x:Key="BackgroundColor">#0d1117</Color>
<Color x:Key="CardColor">#161b22</Color>
<Color x:Key="CardHoverColor">#21262d</Color>
<Color x:Key="BorderColor">#30363d</Color>
<Color x:Key="TextPrimaryColor">#f0f6fc</Color>
<Color x:Key="TextSecondaryColor">#8b949e</Color>
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" />
<SolidColorBrush x:Key="PrimaryDarkBrush" Color="{StaticResource PrimaryDarkColor}" />
<SolidColorBrush x:Key="AccentBrush" Color="{StaticResource AccentColor}" />
<SolidColorBrush x:Key="WarningBrush" Color="{StaticResource WarningColor}" />
<SolidColorBrush x:Key="DangerBrush" Color="{StaticResource DangerColor}" />
<SolidColorBrush x:Key="SuccessBrush" Color="{StaticResource SuccessColor}" />
<SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}" />
<SolidColorBrush x:Key="CardBrush" Color="{StaticResource CardColor}" />
<SolidColorBrush x:Key="CardHoverBrush" Color="{StaticResource CardHoverColor}" />
<SolidColorBrush x:Key="BorderBrush" Color="{StaticResource BorderColor}" />
<SolidColorBrush x:Key="TextPrimaryBrush" Color="{StaticResource TextPrimaryColor}" />
<SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource TextSecondaryColor}" />
<!-- Gradient para botão principal -->
<LinearGradientBrush x:Key="ButtonGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#6366f1" Offset="0" />
<GradientStop Color="#8b5cf6" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ButtonHoverGradient" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#4f46e5" Offset="0" />
<GradientStop Color="#7c3aed" Offset="1" />
</LinearGradientBrush>
<!-- Estilo do botão principal -->
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="Background" Value="{StaticResource ButtonGradient}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Padding" Value="24,14" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#JetBrains Mono" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
CornerRadius="8"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background"
Value="{StaticResource ButtonHoverGradient}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Estilo do botão secundário -->
<Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}" />
<Setter Property="Padding" Value="16,10" />
<Setter Property="FontSize" Value="13" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#JetBrains Mono" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="8"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background"
Value="{StaticResource CardHoverBrush}" />
<Setter Property="Foreground"
Value="{StaticResource TextPrimaryBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Estilo de Card de Drive -->
<Style x:Key="DriveCard" TargetType="Border">
<Setter Property="Background" Value="{StaticResource CardBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="12" />
<Setter Property="Padding" Value="16" />
<Setter Property="Cursor" Value="Hand" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource CardHoverBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- Estilo de Badge -->
<Style x:Key="Badge" TargetType="Border">
<Setter Property="CornerRadius" Value="4" />
<Setter Property="Padding" Value="8,4" />
</Style>
<!-- TextBlock padrão -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#JetBrains Mono" />
</Style>
</Window.Resources>
<Grid Margin="24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Header -->
<StackPanel Grid.Row="0" Margin="0,0,0,24">
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<TextBlock Text="🛡️" FontSize="32" VerticalAlignment="Center" Margin="0,0,12,0" />
<TextBlock Text="NoTrace"
FontSize="32"
FontWeight="Bold"
Foreground="{StaticResource TextPrimaryBrush}"
VerticalAlignment="Center" />
</StackPanel>
<TextBlock Text="Remova arquivos de forma segura e irreversível"
FontSize="14"
Foreground="{StaticResource TextSecondaryBrush}" />
<!-- Admin Warning -->
<Border x:Name="AdminWarning"
Background="#1c1917"
BorderBrush="#f59e0b"
BorderThickness="1"
CornerRadius="8"
Padding="12,10"
Margin="0,16,0,0"
Visibility="Collapsed">
<StackPanel Orientation="Horizontal">
<TextBlock Text="⚠️" FontSize="14" VerticalAlignment="Center" Margin="0,0,8,0" />
<TextBlock Text="Execute como Administrador para melhor funcionamento"
Foreground="#fbbf24"
FontSize="12"
VerticalAlignment="Center" />
</StackPanel>
</Border>
</StackPanel>
<!-- Drive Cards Section -->
<StackPanel Grid.Row="1" Margin="0,0,0,20">
<TextBlock Text="Selecione o drive para limpeza:"
FontSize="14"
FontWeight="SemiBold"
Foreground="{StaticResource TextSecondaryBrush}"
Margin="0,0,0,12" />
<ItemsControl x:Name="DrivesList">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource DriveCard}"
Margin="0,0,12,12"
Width="200"
MouseLeftButtonDown="DriveCard_Click"
Tag="{Binding Letter}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Header com ícone e badge -->
<Grid Grid.Row="0" Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="💾" FontSize="24" VerticalAlignment="Center" />
<Border Grid.Column="2">
<Border.Style>
<Style TargetType="Border"
BasedOn="{StaticResource Badge}">
<Setter Property="Background" Value="#14532d" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsSSD}"
Value="True">
<Setter Property="Background"
Value="#422006" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock FontSize="10" FontWeight="Bold">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="HDD" />
<Setter Property="Foreground" Value="#22c55e" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsSSD}"
Value="True">
<Setter Property="Text" Value="SSD" />
<Setter Property="Foreground"
Value="#f59e0b" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</Grid>
<!-- Nome do drive -->
<TextBlock Grid.Row="1"
Text="{Binding DisplayName}"
FontSize="13"
FontWeight="SemiBold"
Foreground="{StaticResource TextPrimaryBrush}"
TextTrimming="CharacterEllipsis"
Margin="0,0,0,8" />
<!-- Barra de progresso de espaço -->
<Grid Grid.Row="2" Margin="0,0,0,8">
<Border Background="#21262d" CornerRadius="4" Height="6" />
<ProgressBar
Value="{Binding UsedSpacePercent, Mode=OneWay}"
Minimum="0"
Maximum="100"
Height="6"
Foreground="{StaticResource PrimaryBrush}"
Background="Transparent"
BorderThickness="0">
<ProgressBar.Template>
<ControlTemplate TargetType="ProgressBar">
<Border CornerRadius="4"
Background="{TemplateBinding Background}">
<Border x:Name="PART_Track">
<Border x:Name="PART_Indicator"
CornerRadius="4"
Background="{TemplateBinding Foreground}"
HorizontalAlignment="Left" />
</Border>
</Border>
</ControlTemplate>
</ProgressBar.Template>
</ProgressBar>
</Grid>
<!-- Espaço livre -->
<StackPanel Grid.Row="3" Orientation="Horizontal">
<TextBlock Text="{Binding FreeSpaceFormatted}"
FontSize="11"
Foreground="{StaticResource TextSecondaryBrush}" />
<TextBlock Text=" livre de "
FontSize="11"
Foreground="{StaticResource TextSecondaryBrush}" />
<TextBlock Text="{Binding TotalSizeFormatted}"
FontSize="11"
Foreground="{StaticResource TextSecondaryBrush}" />
</StackPanel>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<!-- Log Section -->
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<TextBlock Text="📋" FontSize="14" VerticalAlignment="Center" Margin="0,0,6,0" />
<TextBlock Text="Log de Execução"
FontSize="13"
FontWeight="SemiBold"
Foreground="{StaticResource TextSecondaryBrush}" />
</StackPanel>
<Border Grid.Row="1"
Background="{StaticResource CardBrush}"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="1"
CornerRadius="8">
<TextBox x:Name="OutputBox"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
TextWrapping="Wrap"
IsReadOnly="True"
AcceptsReturn="True"
Padding="12"
Background="Transparent"
Foreground="{StaticResource TextSecondaryBrush}"
BorderThickness="0"
FontFamily="Consolas"
FontSize="11"
CaretBrush="Transparent" />
</Border>
</Grid>
<!-- Footer with Buttons -->
<Grid Grid.Row="3" Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Progress Bar -->
<ProgressBar x:Name="ProgressBar"
Height="4"
IsIndeterminate="True"
Visibility="Collapsed"
Background="#21262d"
Foreground="{StaticResource PrimaryBrush}"
BorderThickness="0"
VerticalAlignment="Center"
Margin="0,0,20,0" />
<Button x:Name="InfoButton"
Grid.Column="1"
Content="ℹ️ Como funciona?"
Style="{StaticResource SecondaryButton}"
Click="LearnMore_Click"
Margin="0,0,12,0" />
<Button x:Name="StartButton"
Grid.Column="2"
Content="🚀 Iniciar Limpeza"
Style="{StaticResource PrimaryButton}"
Click="StartButton_Click" />
</Grid>
</Grid>
</Window>