/// <summary> /// 重编码载入的所有文件 /// </summary> private void button_Click(object sender, EventArgs e) { if (checkBox.Checked) { RenameTool.ReName(files); } RecodeTool.ReCode(files, encode); MessageBox.Show("重编码完成"); }
/// <summary> /// 文件重编码示例入口 /// </summary> public static void Main(String[] args) { if (args.Length == 0) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ReCode_Form()); } else { String[] files = DragDropTool.GetSubFiles(args); // 载入文件信息 String[] Endwith = new String[] { ".java", ".cs", ".txt", ".xml" }; RenameTool.ReName(files, Endwith); // 重命名 RecodeTool.ReCode(files, Encoding.UTF8, Endwith); // 重编码所有文件 } }