导表修改
This commit is contained in:
@@ -8,7 +8,7 @@ namespace NBConfigBuilder
|
||||
// 配置文件路径
|
||||
private readonly string configPath =
|
||||
Path.Combine(Path.GetDirectoryName(Application.ExecutablePath) ?? string.Empty, "config.json");
|
||||
|
||||
|
||||
// 保存原始标题
|
||||
private string _originalTitle;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace NBConfigBuilder
|
||||
// 设置窗口大小不可变
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
|
||||
|
||||
// 保存原始标题
|
||||
_originalTitle = this.Text;
|
||||
|
||||
@@ -36,14 +36,14 @@ namespace NBConfigBuilder
|
||||
{
|
||||
// 保存当前配置
|
||||
SaveConfig();
|
||||
|
||||
|
||||
// 创建导出器并设置进度回调
|
||||
var exporter = new ExcelExporter(ExportType.AllExcel);
|
||||
exporter.SetProgressCallback(UpdateProgress);
|
||||
|
||||
|
||||
// 运行导出器
|
||||
await Task.Run(() => exporter.Run());
|
||||
|
||||
|
||||
// 显示成功消息
|
||||
MessageBox.Show("配置导出完成!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ namespace NBConfigBuilder
|
||||
Invoke(new Action<string>(UpdateProgress), message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 更新标题栏显示进度
|
||||
this.Text = $"{_originalTitle} - {message}";
|
||||
}
|
||||
@@ -150,6 +150,8 @@ namespace NBConfigBuilder
|
||||
ServerJsonPath = textBoxServerGenJsonPath.Text,
|
||||
GenClient = checkBoxGenClient.Checked,
|
||||
GenServer = checkBoxGenServer.Checked,
|
||||
ClientNamespace = textBoxClientNamespce.Text,
|
||||
ServerNamespace = textBoxServerNamespace.Text
|
||||
};
|
||||
App.Config = config;
|
||||
try
|
||||
@@ -182,6 +184,8 @@ namespace NBConfigBuilder
|
||||
checkBoxGenServer.Checked = config.GenServer;
|
||||
textBoxClientGenJsonPath.Text = config.ClientJsonPath ?? "";
|
||||
textBoxServerGenJsonPath.Text = config.ServerJsonPath ?? "";
|
||||
textBoxClientNamespce.Text = config.ClientNamespace ?? "NB";
|
||||
textBoxServerNamespace.Text = config.ServerNamespace ?? "NB";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -189,5 +193,10 @@ namespace NBConfigBuilder
|
||||
MessageBox.Show($"加载配置失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkBoxGenServer_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user