Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FindInFiles/FindInFiles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion FindInFiles/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button x:Name="btnFind" Content="Find" HorizontalAlignment="Left" Margin="242,28,0,0" VerticalAlignment="Top" Width="75" Click="btnFind_Click" Height="22"/>
<Button x:Name="btnBrowse" Content="..." HorizontalAlignment="Left" Margin="686,28,0,0" VerticalAlignment="Top" Width="75" Click="btnBrowse_Click" Height="22" IsEnabled="False"/>
<Button x:Name="btnBrowse" Content="..." HorizontalAlignment="Left" Margin="686,28,0,0" VerticalAlignment="Top" Width="75" Click="btnBrowse_Click" Height="22"/>
<DataGrid x:Name="gridResults" HorizontalAlignment="Left" Height="294" Margin="11,58,0,0" VerticalAlignment="Top" Width="754" MouseDoubleClick="gridResults_MouseDoubleClick" IsReadOnly="True" IsTabStop="True" TabIndex="2"/>
<ComboBox x:Name="cmbSearch" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="227" KeyDown="OnKeyDownSearch" IsEditable="True" DropDownClosed="cmbSearch_DropDownClosed" IsSynchronizedWithCurrentItem="True" IsTabStop="True" TabIndex="0" Loaded="cmbSearch_Loaded" />
<ComboBox x:Name="cmbFolder" HorizontalAlignment="Left" Margin="356,28,0,0" VerticalAlignment="Top" KeyDown="OnKeyDownFolder" Width="325" IsEditable="True" IsTabStop="True" TabIndex="1"/>
Expand Down
13 changes: 11 additions & 2 deletions FindInFiles/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// simple Find In Files tool for searching files containting given string
// simple Find In Files tool for searching files containting given string
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
Expand All @@ -10,6 +10,7 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using WinForms = System.Windows.Forms;

namespace FindInFiles
{
Expand Down Expand Up @@ -140,7 +141,15 @@ void AddFolderHistory(string folderString)

private void btnBrowse_Click(object sender, RoutedEventArgs e)
{
// TODO browse for folder
// Create Folder Browser and give it a title
WinForms.FolderBrowserDialog folderBrowser = new WinForms.FolderBrowserDialog();
folderBrowser.Description = "Select a foooooolder";

// show it to the user
folderBrowser.ShowDialog();

// retrieve the input
cmbFolder.Text = folderBrowser.SelectedPath;
}

// special keys for search field
Expand Down