Exemple #1
0
        private void jsonFormatBtn_Click(object sender, EventArgs e)
        {
            List <string> paths = new List <string>();

            FileSelectTool.SelectFiles(out paths);
            Shell.WriteLine("格式化开始");
            foreach (string file in paths)
            {
                Shell.WriteLine(file);
                string str = File.ReadAllText(file);
                str = FileTool.ConvertJsonString(str);
                FileTool.WriteToTxt(str, file, true);
            }
            Shell.WriteLine("完成");
        }