Browse Source

commit: import project FileNameCharsetConvert

HOME 3 years ago
parent
commit
8a86dc03a7

+ 62 - 0
FileNameCharsetConvert/FileNameCharsetConvert.csproj

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" 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>{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>FileNameCharsetConvert</RootNamespace>
+    <AssemblyName>FileNameCharsetConvert</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </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>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="MainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForm.Designer.cs">
+      <DependentUpon>MainForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="MainForm.resx">
+      <DependentUpon>MainForm.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 219 - 0
FileNameCharsetConvert/MainForm.Designer.cs

@@ -0,0 +1,219 @@
+namespace FileNameCharsetConvert
+{
+    partial class MainForm
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.ColumnHeader columnHeader1;
+            System.Windows.Forms.ColumnHeader columnHeader2;
+            System.Windows.Forms.ColumnHeader columnHeader3;
+            this.lvMain = new System.Windows.Forms.ListView();
+            this.txtFolder = new System.Windows.Forms.TextBox();
+            this.btnSelectFolder = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.btnScan = new System.Windows.Forms.Button();
+            this.cmbEncoding = new System.Windows.Forms.ComboBox();
+            this.btnConvert = new System.Windows.Forms.Button();
+            this.btnApplySelection = new System.Windows.Forms.Button();
+            this.dlgFolder = new System.Windows.Forms.FolderBrowserDialog();
+            this.proc = new System.Windows.Forms.ProgressBar();
+            this.label2 = new System.Windows.Forms.Label();
+            columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.SuspendLayout();
+            // 
+            // columnHeader1
+            // 
+            columnHeader1.Text = "原始文件名";
+            columnHeader1.Width = 235;
+            // 
+            // columnHeader2
+            // 
+            columnHeader2.Text = "目标文件名";
+            columnHeader2.Width = 191;
+            // 
+            // columnHeader3
+            // 
+            columnHeader3.Text = "状态";
+            columnHeader3.Width = 64;
+            // 
+            // lvMain
+            // 
+            this.lvMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.lvMain.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            columnHeader1,
+            columnHeader2,
+            columnHeader3});
+            this.lvMain.FullRowSelect = true;
+            this.lvMain.HideSelection = false;
+            this.lvMain.Location = new System.Drawing.Point(12, 81);
+            this.lvMain.Name = "lvMain";
+            this.lvMain.Size = new System.Drawing.Size(597, 280);
+            this.lvMain.TabIndex = 0;
+            this.lvMain.UseCompatibleStateImageBehavior = false;
+            this.lvMain.View = System.Windows.Forms.View.Details;
+            // 
+            // txtFolder
+            // 
+            this.txtFolder.AllowDrop = true;
+            this.txtFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtFolder.Location = new System.Drawing.Point(56, 6);
+            this.txtFolder.Name = "txtFolder";
+            this.txtFolder.Size = new System.Drawing.Size(391, 21);
+            this.txtFolder.TabIndex = 1;
+            this.txtFolder.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFolder_DragDrop);
+            this.txtFolder.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFolder_DragEnter);
+            // 
+            // btnSelectFolder
+            // 
+            this.btnSelectFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnSelectFolder.Location = new System.Drawing.Point(453, 4);
+            this.btnSelectFolder.Name = "btnSelectFolder";
+            this.btnSelectFolder.Size = new System.Drawing.Size(75, 23);
+            this.btnSelectFolder.TabIndex = 2;
+            this.btnSelectFolder.Text = "浏览";
+            this.btnSelectFolder.UseVisualStyleBackColor = true;
+            this.btnSelectFolder.Click += new System.EventHandler(this.btnSelectFolder_Click);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(12, 9);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(41, 12);
+            this.label1.TabIndex = 3;
+            this.label1.Text = "文件夹";
+            // 
+            // btnScan
+            // 
+            this.btnScan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnScan.Location = new System.Drawing.Point(534, 4);
+            this.btnScan.Name = "btnScan";
+            this.btnScan.Size = new System.Drawing.Size(71, 23);
+            this.btnScan.TabIndex = 4;
+            this.btnScan.Text = "扫描";
+            this.btnScan.UseVisualStyleBackColor = true;
+            this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
+            // 
+            // cmbEncoding
+            // 
+            this.cmbEncoding.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.cmbEncoding.DisplayMember = "DisplayName";
+            this.cmbEncoding.FormattingEnabled = true;
+            this.cmbEncoding.Location = new System.Drawing.Point(56, 38);
+            this.cmbEncoding.Name = "cmbEncoding";
+            this.cmbEncoding.Size = new System.Drawing.Size(391, 20);
+            this.cmbEncoding.TabIndex = 5;
+            // 
+            // btnConvert
+            // 
+            this.btnConvert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnConvert.Location = new System.Drawing.Point(453, 36);
+            this.btnConvert.Name = "btnConvert";
+            this.btnConvert.Size = new System.Drawing.Size(75, 23);
+            this.btnConvert.TabIndex = 6;
+            this.btnConvert.Text = "转换文件名";
+            this.btnConvert.UseVisualStyleBackColor = true;
+            this.btnConvert.Click += new System.EventHandler(this.btnConvert_Click);
+            // 
+            // btnApplySelection
+            // 
+            this.btnApplySelection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnApplySelection.Location = new System.Drawing.Point(534, 36);
+            this.btnApplySelection.Name = "btnApplySelection";
+            this.btnApplySelection.Size = new System.Drawing.Size(71, 23);
+            this.btnApplySelection.TabIndex = 6;
+            this.btnApplySelection.Text = "应用选中";
+            this.btnApplySelection.UseVisualStyleBackColor = true;
+            this.btnApplySelection.Click += new System.EventHandler(this.btnApplySelection_Click);
+            // 
+            // dlgFolder
+            // 
+            this.dlgFolder.RootFolder = System.Environment.SpecialFolder.MyComputer;
+            // 
+            // proc
+            // 
+            this.proc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.proc.Location = new System.Drawing.Point(12, 65);
+            this.proc.Name = "proc";
+            this.proc.Size = new System.Drawing.Size(595, 10);
+            this.proc.TabIndex = 7;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(12, 41);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(29, 12);
+            this.label2.TabIndex = 8;
+            this.label2.Text = "编码";
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(621, 373);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.proc);
+            this.Controls.Add(this.btnApplySelection);
+            this.Controls.Add(this.btnConvert);
+            this.Controls.Add(this.cmbEncoding);
+            this.Controls.Add(this.btnScan);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.btnSelectFolder);
+            this.Controls.Add(this.txtFolder);
+            this.Controls.Add(this.lvMain);
+            this.MinimumSize = new System.Drawing.Size(530, 400);
+            this.Name = "Form1";
+            this.Text = "乱码文件名修正";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListView lvMain;
+        private System.Windows.Forms.TextBox txtFolder;
+        private System.Windows.Forms.Button btnSelectFolder;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btnScan;
+        private System.Windows.Forms.ComboBox cmbEncoding;
+        private System.Windows.Forms.Button btnConvert;
+        private System.Windows.Forms.Button btnApplySelection;
+        private System.Windows.Forms.FolderBrowserDialog dlgFolder;
+        private System.Windows.Forms.ProgressBar proc;
+        private System.Windows.Forms.Label label2;
+    }
+}
+

+ 104 - 0
FileNameCharsetConvert/MainForm.cs

@@ -0,0 +1,104 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+
+namespace FileNameCharsetConvert
+{
+    public partial class MainForm : Form
+    {
+        public MainForm()
+        {
+            InitializeComponent();
+
+            cmbEncoding.DataSource = Encoding.GetEncodings();
+        }
+
+        private void btnSelectFolder_Click(object sender, EventArgs e)
+        {
+            if (dlgFolder.ShowDialog() == DialogResult.OK)
+            {
+                txtFolder.Text = dlgFolder.SelectedPath;
+            }
+        }
+
+        private void btnScan_Click(object sender, EventArgs e)
+        {
+            lvMain.Items.Clear();
+
+            string[] files = Directory.GetFiles(txtFolder.Text, "*.*", System.IO.SearchOption.AllDirectories);
+
+            for (int i = 0; i < files.Length; i++)
+            {
+                proc.Value = (int)(i * 1.0f / files.Length * 100);
+                ListViewItem lvi = new ListViewItem();
+                lvi.Text = files[i];
+                lvi.SubItems.Add("               ");
+                lvi.SubItems.Add("未转换");
+
+                lvMain.Items.Add(lvi);
+            }
+
+            lvces();
+
+            proc.Value = 100;
+        }
+
+        private void btnConvert_Click(object sender, EventArgs e)
+        {
+            EncodingInfo enci = (EncodingInfo)cmbEncoding.SelectedItem;
+            Encoding enc = enci.GetEncoding();
+            Encoding def = Encoding.Default;
+
+            for (int i = 0; i < lvMain.Items.Count; i++)
+            {
+                proc.Value = (int)(i * 1.0f / lvMain.Items.Count * 100);
+                ListViewItem item = lvMain.Items[i];
+                item.SubItems[1].Text = enc.GetString(def.GetBytes(item.Text));
+                item.SubItems[2].Text = "已转换,未应用";
+            }
+
+            lvces();
+        }
+
+        private void lvces()
+        {
+            foreach (ColumnHeader item in lvMain.Columns)
+            {
+                item.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
+            }
+        }
+
+        private void btnApplySelection_Click(object sender, EventArgs e)
+        {
+            for (int i = 0; i < lvMain.SelectedItems.Count; i++)
+            {
+                ListViewItem lvi = lvMain.SelectedItems[i];
+
+                try
+                {
+                    File.Move(lvi.Text, lvi.SubItems[1].Text);
+                    lvi.SubItems[2].Text = "成功应用";
+                }
+                catch (Exception ex)
+                {
+                    lvi.SubItems[2].Text = "应用失败:" + ex.Message;
+                }
+            }
+        }
+
+        private void txtFolder_DragEnter(object sender, DragEventArgs e)
+        {
+            string[] files;
+            e.Effect =
+                e.Data.GetDataPresent(DataFormats.FileDrop) && (files = (string[])e.Data.GetData(DataFormats.FileDrop)).Length == 1 && Directory.Exists(files[0])
+                    ? DragDropEffects.Link
+                    : DragDropEffects.None;
+        }
+
+        private void txtFolder_DragDrop(object sender, DragEventArgs e)
+        {
+            txtFolder.Text = ((string[])e.Data.GetData(DataFormats.FileDrop))[0];
+        }
+    }
+}

+ 132 - 0
FileNameCharsetConvert/MainForm.resx

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="columnHeader1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+  <metadata name="columnHeader2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+  <metadata name="columnHeader3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+  <metadata name="dlgFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 22</value>
+  </metadata>
+</root>

+ 19 - 0
FileNameCharsetConvert/Program.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Windows.Forms;
+
+namespace FileNameCharsetConvert
+{
+    internal static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        private static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new MainForm());
+        }
+    }
+}

+ 35 - 0
FileNameCharsetConvert/Properties/AssemblyInfo.cs

@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("FileNameCharsetConvert")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FileNameCharsetConvert")]
+[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("ce26341a-ce0b-4b1c-97a5-ba7e8a9acfdd")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 6 - 0
StrangeTools.sln

@@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "@", "@", "{8E093C14-C04A-45
 		NuGet.config = NuGet.config
 	EndProjectSection
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileNameCharsetConvert", "FileNameCharsetConvert\FileNameCharsetConvert.csproj", "{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -20,6 +22,10 @@ Global
 		{7E8C017E-78B6-4AC1-B042-1BDFAF461EE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{7E8C017E-78B6-4AC1-B042-1BDFAF461EE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7E8C017E-78B6-4AC1-B042-1BDFAF461EE7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{CE26341A-CE0B-4B1C-97A5-BA7E8A9ACFDD}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE