完成调用丰的sif python算法 → 所有数据处理功能完成

This commit is contained in:
2022-01-14 11:56:12 +08:00
parent 8c78a0d715
commit a7cb3885db
16 changed files with 696 additions and 59 deletions

View File

@ -13,7 +13,7 @@ using System.Threading;
namespace mainProgram
{
//子窗口向父窗口传递参数https://www.cnblogs.com/xcong/p/3386085.html
public delegate void transferProjectManagerDelegate(ProjectManager value);
public delegate void transferProjectManagerDelegate(ProjectManager value);//申明委托
public partial class NewProjectWindow : Form
{
@ -29,9 +29,10 @@ namespace mainProgram
private void CreateProjectBtn_Click(object sender, EventArgs e)
{
//获取数据
string dataPath = DataPathTextBox.Text;
//string currPath = Application.StartupPath;
string dataPath = DataPathTextBox.Text;
string projectPath = ProjectPathTextBox.Text;
string calFilePath = CalFilePathTextBox.Text;
if (dataPath != null && dataPath.Length == 0)
{
@ -43,9 +44,14 @@ namespace mainProgram
MessageBox.Show(this, "工程路径不能为空", "提示");
return;
}
if (calFilePath != null && calFilePath.Length == 0)
{
MessageBox.Show(this, "定标路径不能为空", "提示");
return;
}
ProjectManager projectManager = new ProjectManager(projectPath);
projectManager.CreateProject(dataPath);
projectManager.CreateProject(calFilePath, dataPath);
TransferEvent(projectManager);//触发事件
@ -92,5 +98,22 @@ namespace mainProgram
{
Close();
}
private void SelectCalFilePathBtn_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.Description = "请选择定标文件夹";
if (dialog.ShowDialog() == DialogResult.OK)
{
if (string.IsNullOrEmpty(dialog.SelectedPath))
{
MessageBox.Show(this, "文件夹路径不能为空", "提示");
return;
}
string savePath = dialog.SelectedPath;
CalFilePathTextBox.Text = savePath;
}
}
}
}