This repository has been archived by the owner. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
11,514 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Drawing; | ||
using System.Data; | ||
using System.IO; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Windows.Forms; | ||
using GongSolutions.Shell; | ||
|
||
namespace FileDialog | ||
{ | ||
public partial class FileDialog : Form | ||
{ | ||
public FileDialog() | ||
{ | ||
InitializeComponent(); | ||
shellView.CurrentFolder = new ShellItem(Properties.Settings.Default.CurrentFolder); | ||
shellView.History.Clear(); | ||
} | ||
|
||
void OnFileSelected(string filename) | ||
{ | ||
MessageBox.Show(filename); | ||
} | ||
|
||
void UpdateOpenButtonState() | ||
{ | ||
openButton.Enabled = (shellView.SelectedItems.Length > 0) || | ||
(fileNameCombo.Text.Length > 0); | ||
} | ||
|
||
void fileNameCombo_TextChanged(object sender, EventArgs e) | ||
{ | ||
UpdateOpenButtonState(); | ||
} | ||
|
||
void shellView_DoubleClick(object sender, EventArgs e) | ||
{ | ||
OnFileSelected(shellView.SelectedItems[0].FileSystemPath); | ||
} | ||
|
||
void shellView_SelectionChanged(object sender, EventArgs e) | ||
{ | ||
UpdateOpenButtonState(); | ||
} | ||
|
||
void fileNameCombo_FilenameEntered(object sender, EventArgs e) | ||
{ | ||
OnFileSelected(fileNameCombo.Text); | ||
} | ||
|
||
void openButton_Click(object sender, EventArgs e) | ||
{ | ||
if (!shellView.NavigateSelectedFolder()) | ||
{ | ||
ShellItem[] selected = shellView.SelectedItems; | ||
|
||
if (selected.Length > 0) | ||
{ | ||
OnFileSelected(selected[0].FileSystemPath); | ||
} | ||
else if (File.Exists(fileNameCombo.Text)) | ||
{ | ||
OnFileSelected(fileNameCombo.Text); | ||
} | ||
} | ||
} | ||
|
||
void cancelButton_Click(object sender, EventArgs e) | ||
{ | ||
Close(); | ||
} | ||
|
||
void FileDialog_FormClosed(object sender, FormClosedEventArgs e) | ||
{ | ||
Properties.Settings.Default.CurrentFolder = shellView.CurrentFolder.ToString(); | ||
Properties.Settings.Default.Save(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.50727</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{6D9343CF-7F87-4C36-ADB8-DD8667F38E51}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>FileDialog</RootNamespace> | ||
<AssemblyName>FileDialog</AssemblyName> | ||
<FileUpgradeFlags> | ||
</FileUpgradeFlags> | ||
<UpgradeBackupLocation> | ||
</UpgradeBackupLocation> | ||
<OldToolsVersion>2.0</OldToolsVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Deployment" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="FileDialog.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Include="FileDialog.Designer.cs"> | ||
<DependentUpon>FileDialog.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="FileDialog.resx"> | ||
<DependentUpon>FileDialog.cs</DependentUpon> | ||
<SubType>Designer</SubType> | ||
</EmbeddedResource> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
<SubType>Designer</SubType> | ||
</EmbeddedResource> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
<DesignTime>True</DesignTime> | ||
</Compile> | ||
<None Include="app.config" /> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Shell\Shell.csproj"> | ||
<Project>{711CCF1F-6B8F-4E97-8D84-0EE679C83B41}</Project> | ||
<Name>Shell</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
Oops, something went wrong.