-
Notifications
You must be signed in to change notification settings - Fork 7
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
15 changed files
with
1,498 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
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,89 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{4845D6A1-C7B1-4342-8D2F-432C254C12B0}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BFR.WinApp</RootNamespace> | ||
<AssemblyName>BFR.WinApp</AssemblyName> | ||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<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' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ApplicationIcon>0.ico</ApplicationIcon> | ||
</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="FileInfo.cs" /> | ||
<Compile Include="FrmMain.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Include="FrmMain.Designer.cs"> | ||
<DependentUpon>FrmMain.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<EmbeddedResource Include="FrmMain.resx"> | ||
<DependentUpon>FrmMain.cs</DependentUpon> | ||
</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="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> | ||
<Content Include="0.ico" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\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> |
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,78 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace BFR.WinApp | ||
{ | ||
/// <summary> | ||
/// 文件信息类 | ||
/// </summary> | ||
public class FileInfo | ||
{ | ||
/// <summary> | ||
/// 文件路径,以\结尾 | ||
/// </summary> | ||
public string Dir { get; set; } | ||
|
||
/// <summary> | ||
/// 文件名,包含路径和扩展名 | ||
/// </summary> | ||
public string FullName { get; set; } | ||
|
||
/// <summary> | ||
/// 安全文件名,不包含路径和扩展名 | ||
/// </summary> | ||
public string SafeName { get; set; } | ||
|
||
/// <summary> | ||
/// 文件名,不包含路径 | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// 扩展名 | ||
/// </summary> | ||
public string Ext { get; set; } | ||
|
||
public FileInfo() { } | ||
|
||
/// <summary> | ||
/// 文件信息类 | ||
/// </summary> | ||
/// <param name="fullname">包含路径的文件</param> | ||
public FileInfo(string fullname) | ||
{ | ||
string dir = fullname.Remove(fullname.LastIndexOf("\\") + 1); | ||
string name = fullname.Replace(dir, ""); | ||
string ext = name.Substring(name.LastIndexOf(".")); | ||
string safe = name.Replace(ext, ""); | ||
|
||
this.Dir = dir; | ||
this.FullName = fullname; | ||
this.Name = name; | ||
this.SafeName = safe; | ||
this.Ext = ext; | ||
} | ||
|
||
/// <summary> | ||
/// 文件信息类 | ||
/// </summary> | ||
/// <param name="dir">文件所在的目录</param> | ||
/// <param name="name">文件名称,包含扩展名</param> | ||
public FileInfo(string dir,string name) | ||
{ | ||
if (!dir.EndsWith("\\")) | ||
{ | ||
dir += "\\"; | ||
} | ||
string ext = name.Substring(name.LastIndexOf(".")); | ||
string safe = name.Replace(ext, ""); | ||
|
||
this.Dir = dir; | ||
this.FullName = dir+name; | ||
this.Name = name; | ||
this.SafeName = safe; | ||
this.Ext = ext; | ||
} | ||
} | ||
} |
Oops, something went wrong.