1 Star 0 Fork 18

风中的毛 / UnityExcel2JsonGenCSharper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
JsonToExcel.cs 2.59 KB
一键复制 编辑 原始数据 按行查看 历史
keyle_xiao 提交于 2015-08-27 17:41 . Update Release 1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ExcelToJsonGenerator;
namespace Xamasoft.JsonClassGenerator.UI
{
public partial class JsonToExcel : Form
{
public JsonToExcel()
{
InitializeComponent();
}
private void btnBrowse_Click(object sender, EventArgs e)
{
using (var b = new FolderBrowserDialog())
{
b.ShowNewFolderButton = true;
b.SelectedPath = edtTargetFolder.Text;
b.Description = "Please select a folder where to save the generated files.";
if (b.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
edtTargetFolder.Text = b.SelectedPath;
}
}
}
private void SelectFile_Click(object sender, EventArgs e)
{
string path = string.Empty;
using (var b = new OpenFileDialog())
{
while (true)
{
if ((path.EndsWith("JSON") || path.EndsWith("json")))
{
return;
}
b.ShowDialog();
b.AddExtension = true;
if (b.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
path = b.FileName;
FilePath.Text = b.FileName;
}
}
}
}
private void button1_Click(object sender, EventArgs e)
{
//Entrance.Instance.Init(FilePath.Text.Trim(), index.Text);
//string json = Entrance.Instance.GetJsonString();
//if (string.IsNullOrEmpty(json))
//{
// MessageBox.Show("error , the file is empty or the file formate erorr , please call Fez at RTX ...");
//}
//formMain.edtJson.Text = Entrance.Instance.GetSchema();
//formMain.edtMainClass.Text = index.Text;
////formMain.edtJson.Text = Entrance.Instance.GetJsonString();
//System.IO.File.WriteAllText(Path.Combine(edtTargetFolder.Text, string.Format("{0}Config.json", index.Text)), Entrance.Instance.GetJsonString(), Encoding.UTF8);
//MessageBox.Show("Success~");
//this.Close();
//Newtonsoft.Json.JsonConvert
}
}
}
1
https://gitee.com/guoweidong/UnityExcel2JsonGenCSharper.git
git@gitee.com:guoweidong/UnityExcel2JsonGenCSharper.git
guoweidong
UnityExcel2JsonGenCSharper
UnityExcel2JsonGenCSharper
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891