完成调用丰的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

@ -9,6 +9,8 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace mainProgram
{
@ -54,19 +56,128 @@ namespace mainProgram
return;
}
RadCorrectionWindow w = new RadCorrectionWindow();
RadCorrectionWindow w = new RadCorrectionWindow(mProjectManager);
//w.TransferEvent += RecieveProjectManager;
var addr2 = getMemory(mProjectManager);
Console.WriteLine("父窗口变量的地址 = " + addr2);
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
public string getMemory(object o) // 获取引用类型的内存地址方法
{
GCHandle h = GCHandle.Alloc(o, GCHandleType.WeakTrackResurrection);
IntPtr addr = GCHandle.ToIntPtr(h);
return "0x" + addr.ToString("X");
}
private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void main_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("确实退出吗", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
e.Cancel = false;
}
else
{
e.Cancel = true;
}
}
private void SvdToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "svd");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
//mProjectManager.Rad();
Thread t1 = new Thread(new ThreadStart(mProjectManager.Rad));
t1.Start();
}
private void DoasToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "doas");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void SfmToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "sfm");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void SfmGaussinToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "sfm_gaussian");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void SfldToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "sfld");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void Fld3ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mProjectManager is null)
{
MessageBox.Show(this, "请先打开工程!", "提示");
return;
}
SVDWindows w = new SVDWindows(mProjectManager, "3fld");
//w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
}
}