-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.axaml
109 lines (84 loc) · 3.51 KB
/
MainWindow.axaml
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
<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="*"/>
</Grid.RowDefinitions>
<!-- File Name Label -->
<TextBlock Text="File name" Margin="5" Grid.Row="0"/>
<!-- File Name TextBox -->
<AutoCompleteBox x:Name="cmbFileName" Margin="5,5,5,10" Grid.Row="1"/>
<!-- Search in Files Contents Label -->
<TextBlock Text="Search in files contents" Margin="5" Grid.Row="2"/>
<!-- Search in Files Contents TextBox -->
<AutoCompleteBox x:Name="cmbInFile" Margin="5,5,5,10" Grid.Row="3"/>
<!-- Case Sensitive CheckBox -->
<CheckBox x:Name="chkCaseSens" Content="Case sensitive" Margin="5,5,5,10" Grid.Row="4"/>
<!-- Path Label -->
<TextBlock Text="Path" Margin="5" Grid.Row="5"/>
<!-- Path Selection -->
<Grid ColumnDefinitions="*,Auto" Grid.Row="6">
<AutoCompleteBox x:Name="cmbPath" Margin="5" Grid.Column="0"
IsTextCompletionEnabled="True" Focusable="True" GotFocus="AutoCompleteBox_GotFocus"
/>
<Button x:Name="btnSearchFolder" Grid.Column="1" Content="..." Click="btnSearchFolder_Click" />
</Grid>
<!-- Search and Close Buttons -->
<StackPanel Orientation="Horizontal" Margin="5,10,5,5" Grid.Row="7" HorizontalAlignment="Right">
<Button x:Name="btnSearch" Content="Search" Click="btnSearch_Click"/>
<!-- TODO: Search abort -->
<Button x:Name="btnClose" Content="Close" Margin="5" Click="btnClose_Click"/>
</StackPanel>
</Grid>
<GridSplitter x:Name="gridSplitter" Grid.Column="1" Background="LightGray" Width="1" ResizeDirection="Columns"/>
<!-- Right Panel -->
<Grid Grid.Column="2" Margin="5" 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="3" Grid.Row="0" Tapped="lblAppInfo_Tapped"/>
<!-- Files ListBox -->
<ListBox x:Name="lstFiles" Grid.Row="1" Margin="0,10,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="5" DockPanel.Dock="Right" />
</DockPanel>
</Border>
</Grid>
</Window>