-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.axaml
More file actions
130 lines (106 loc) · 5.09 KB
/
MainWindow.axaml
File metadata and controls
130 lines (106 loc) · 5.09 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
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="SimpleFileSearch.MainWindow" Title="GH Software File Search" Width="800" Height="600">
<Window.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="2"/>
</Style>
</Window.Styles>
<Grid x:Name="gridMain" RowDefinitions="*,Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Left Panel -->
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- File Name Label -->
<TextBlock Text="File name" Margin="2" Grid.Row="0"/>
<!-- File Name TextBox -->
<AutoCompleteBox x:Name="cmbFileName" Margin="2,2,2,4" Grid.Row="1">
<AutoCompleteBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Remove from History" Click="RemoveFromFileNameHistory_Click"/>
<MenuItem Header="Clear All History" Click="ClearFileNameHistory_Click"/>
</ContextMenu>
</AutoCompleteBox.ContextMenu>
</AutoCompleteBox>
<!-- Search in Files Contents Label -->
<TextBlock Text="Search in files contents" Margin="2" Grid.Row="2"/>
<!-- Search in Files Contents TextBox -->
<AutoCompleteBox x:Name="cmbInFile" Margin="2,2,2,2" Grid.Row="3">
<AutoCompleteBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Remove from History" Click="RemoveFromInFileHistory_Click"/>
<MenuItem Header="Clear All History" Click="ClearInFileHistory_Click"/>
</ContextMenu>
</AutoCompleteBox.ContextMenu>
</AutoCompleteBox>
<!-- Case Sensitive CheckBox -->
<CheckBox x:Name="chkCaseSens" Content="Case sensitive" Margin="2,2,2,2" Grid.Row="4"/>
<!-- Ignore Accentuation CheckBox -->
<CheckBox x:Name="chkIgnoreAccent" Content="Ignore accentuation" Margin="2,2,2,2" Grid.Row="5"/>
<!-- Path Label -->
<TextBlock Text="Path" Margin="2" Grid.Row="6"/>
<!-- Path Selection -->
<Grid ColumnDefinitions="*,Auto" Grid.Row="7">
<AutoCompleteBox x:Name="cmbPath" Margin="2" Grid.Column="0" IsTextCompletionEnabled="True" Focusable="True" GotFocus="AutoCompleteBox_GotFocus">
<AutoCompleteBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Remove from History" Click="RemoveFromPathHistory_Click"/>
<MenuItem Header="Clear All History" Click="ClearPathHistory_Click"/>
</ContextMenu>
</AutoCompleteBox.ContextMenu>
</AutoCompleteBox>
<Button x:Name="btnSearchFolder" Grid.Column="1" Content="..." Click="btnSearchFolder_Click" />
</Grid>
<!-- Max File Size Label and TextBox -->
<TextBlock Text="Max file size to search contents (KB)" Margin="2" Grid.Row="8"/>
<TextBox x:Name="txtMaxFileSize" Margin="2,2,2,4" Grid.Row="9"/>
<!-- Number of Parallel Searches Label and TextBox -->
<TextBlock Text="Number of parallel searches" Margin="2" Grid.Row="10"/>
<TextBox x:Name="txtParallelSearches" Margin="2,2,2,4" Grid.Row="11"/>
<!-- Search and Close Buttons -->
<StackPanel Orientation="Horizontal" Margin="2,4,2,2" Grid.Row="12" HorizontalAlignment="Right">
<Button x:Name="btnSearch" Content="Search" Click="btnSearch_Click"/>
<Button x:Name="btnCancel" Content="Cancel" Margin="5,0,0,0" Click="btnCancel_Click" IsVisible="False"/>
<Button x:Name="btnClose" Content="Close" Margin="2" Click="btnClose_Click"/>
</StackPanel>
<Button x:Name="btnCalculateSize" Content="Calculate Total Size" Grid.Row="13" Margin="2" Click="btnCalculateTotalSize_Click"/>
</Grid>
<GridSplitter x:Name="gridSplitter" Grid.Column="1" Background="LightGray" Width="1" ResizeDirection="Columns"/>
<!-- Right Panel -->
<Grid Grid.Column="2" Margin="2" ColumnDefinitions="*">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="lblAppInfo" Text="Website" Foreground="Blue" TextDecorations="Underline" HorizontalAlignment="Right" Cursor="Hand" Margin="2" Grid.Row="0" Tapped="lblAppInfo_Tapped"/>
<!-- Files ListBox -->
<ListBox x:Name="lstFiles" Grid.Row="1" Margin="0,4,0,0" Tapped="lstFiles_DoubleTapped" />
</Grid>
<Border BorderBrush="LightGray" BorderThickness="1" Margin="0,0,0,0" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
<DockPanel>
<ProgressBar x:Name="progressBarSearching" Height="20" Grid.Row="1" Grid.Column="0" Foreground="Blue" IsVisible="False" DockPanel.Dock="Left" IsIndeterminate="True" />
<TextBlock x:Name="lblStatus" Margin="2" DockPanel.Dock="Right" />
</DockPanel>
</Border>
</Grid>
</Window>