764 lines
30 KiB
C#
764 lines
30 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.ComponentModel;
|
||
using System.Data;
|
||
using System.Drawing;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
using System.Windows.Forms;
|
||
using System.IO;
|
||
using System.Threading;
|
||
using System.Runtime.InteropServices;
|
||
using System.Diagnostics;
|
||
|
||
using System.Windows.Forms.DataVisualization.Charting;
|
||
using System.Drawing;
|
||
using System.Collections;
|
||
|
||
namespace mainProgram
|
||
{
|
||
public partial class main : Form
|
||
{
|
||
public main()
|
||
{
|
||
InitializeComponent();
|
||
}
|
||
|
||
private ProjectManager mProjectManager = null;//保存打开的/新建的工程对象
|
||
|
||
public void RecieveProjectManager(ProjectManager value)
|
||
{
|
||
mProjectManager = value;
|
||
|
||
Console.WriteLine("工程文件目录为:" + mProjectManager.ProjectPath + "---------------------");
|
||
}
|
||
|
||
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
NewProjectWindow w = new NewProjectWindow();
|
||
w.TransferEvent += RecieveProjectManager;
|
||
|
||
//w.Show();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if(tmp == DialogResult.OK)
|
||
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
||
}
|
||
|
||
private void OpenProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
if (mProjectManager != null)
|
||
{
|
||
MessageBox.Show(this, "不能重复打开工程!", "提示");
|
||
return;
|
||
}
|
||
|
||
OpenProjectWindow w = new OpenProjectWindow();
|
||
w.TransferEvent += RecieveProjectManager;
|
||
|
||
//w.Show();//不阻塞
|
||
DialogResult dialogResult = w.ShowDialog();//阻塞
|
||
|
||
if (dialogResult == DialogResult.OK)
|
||
{
|
||
this.Text = this.Text + "-" + getProjectName();
|
||
|
||
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
||
}
|
||
}
|
||
|
||
private string getProjectName()
|
||
{
|
||
string[] tmp2 = mProjectManager.ProjectPath.Split('\\');
|
||
string projectName = tmp2[tmp2.Length - 1];
|
||
|
||
return projectName;
|
||
}
|
||
|
||
|
||
private void ss()
|
||
{
|
||
//PrejectTreeView
|
||
}
|
||
|
||
|
||
private void RadToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
if (mProjectManager is null)
|
||
{
|
||
MessageBox.Show(this, "请先打开工程!", "提示");
|
||
return;
|
||
}
|
||
|
||
RadCorrectionWindow w = new RadCorrectionWindow(mProjectManager);
|
||
//w.TransferEvent += RecieveProjectManager;
|
||
|
||
var addr2 = getMemory(mProjectManager);
|
||
Console.WriteLine("父窗口变量的地址 = " + addr2);
|
||
|
||
//w.Show();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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)
|
||
{
|
||
this.Close();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
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();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
treeViewTc21.reInitialize();
|
||
}
|
||
|
||
|
||
#region 绘制曲线函数
|
||
public static void DrawSpline(List<int> listX, List<double> listY, Chart chart)
|
||
{
|
||
try
|
||
{
|
||
//X、Y值成员
|
||
chart.Series[0].Points.DataBindXY(listX, listY);
|
||
chart.Series[0].Points.DataBindY(listY);
|
||
|
||
//点颜色
|
||
chart.Series[0].MarkerColor = Color.Green;
|
||
//图表类型 设置为样条图曲线
|
||
chart.Series[0].ChartType = SeriesChartType.Spline;
|
||
//设置点的大小
|
||
chart.Series[0].MarkerSize = 5;
|
||
//设置曲线的颜色
|
||
chart.Series[0].Color = Color.Orange;
|
||
//设置曲线宽度
|
||
chart.Series[0].BorderWidth = 2;
|
||
//chart.Series[0].CustomProperties = "PointWidth=4";
|
||
//设置是否显示坐标标注
|
||
chart.Series[0].IsValueShownAsLabel = false;
|
||
|
||
//设置游标
|
||
chart.ChartAreas[0].CursorX.IsUserEnabled = true;
|
||
chart.ChartAreas[0].CursorX.AutoScroll = true;
|
||
chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
|
||
//设置X轴是否可以缩放
|
||
chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
|
||
//将滚动条放到图表外
|
||
chart.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = false;
|
||
// 设置滚动条的大小
|
||
chart.ChartAreas[0].AxisX.ScrollBar.Size = 15;
|
||
// 设置滚动条的按钮的风格,下面代码是将所有滚动条上的按钮都显示出来
|
||
chart.ChartAreas[0].AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All;
|
||
chart.ChartAreas[0].AxisX.ScrollBar.ButtonColor = Color.SkyBlue;
|
||
// 设置自动放大与缩小的最小量
|
||
chart.ChartAreas[0].AxisX.ScaleView.SmallScrollSize = double.NaN;
|
||
chart.ChartAreas[0].AxisX.ScaleView.SmallScrollMinSize = 1;
|
||
//设置刻度间隔
|
||
chart.ChartAreas[0].AxisX.Interval = 10;
|
||
//将X轴上格网取消
|
||
chart.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
|
||
//X轴、Y轴标题
|
||
chart.ChartAreas[0].AxisX.Title = "环号";
|
||
chart.ChartAreas[0].AxisY.Title = "直径";
|
||
//设置Y轴范围 可以根据实际情况重新修改
|
||
double max = listY[0];
|
||
double min = listY[0];
|
||
foreach (var yValue in listY)
|
||
{
|
||
if (max < yValue)
|
||
{
|
||
max = yValue;
|
||
}
|
||
if (min > yValue)
|
||
{
|
||
min = yValue;
|
||
}
|
||
}
|
||
chart.ChartAreas[0].AxisY.Maximum = max;
|
||
chart.ChartAreas[0].AxisY.Minimum = min;
|
||
chart.ChartAreas[0].AxisY.Interval = (max - min) / 10;
|
||
//绑定数据源
|
||
chart.DataBind();
|
||
}
|
||
catch (Exception exc)
|
||
{
|
||
MessageBox.Show(exc.ToString());
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 鼠标点击,通过环号显示游标,并缩放到响应位置
|
||
/// <summary>
|
||
/// 鼠标点击,通过环号显示游标,并缩放到响应位置函数
|
||
/// </summary>
|
||
/// <param name="ringNum">环号</param>
|
||
/// <param name="chart">Chart控件</param>
|
||
public static void ShowCurByClick(int ringNum, Chart chart)
|
||
{
|
||
//设置游标位置
|
||
chart.ChartAreas[0].CursorX.Position = ringNum;
|
||
//设置视图缩放
|
||
chart.ChartAreas[0].AxisX.ScaleView.Zoom(ringNum - 1, ringNum + 2);
|
||
//改变曲线线宽
|
||
chart.Series[0].BorderWidth = 3;
|
||
//改变X轴刻度间隔
|
||
chart.ChartAreas[0].AxisX.Interval = 1;
|
||
}
|
||
#endregion
|
||
|
||
private void DeleteFiles(string name)
|
||
{
|
||
//MessageBox.Show(this, "删除:" + name, "提示");
|
||
|
||
if (File.Exists(name))//是文件
|
||
{
|
||
mProjectManager.DeleteFile(name);
|
||
}
|
||
else if (Directory.Exists(name))//是文件夹
|
||
{
|
||
mProjectManager.DelectDirIncludeItself(name);
|
||
}
|
||
}
|
||
|
||
private void SaveAs(string name)
|
||
{
|
||
SaveAsWindow w = new SaveAsWindow(name);
|
||
|
||
//w.Show();//不阻塞
|
||
DialogResult tmp = w.ShowDialog();//阻塞
|
||
|
||
if (tmp == DialogResult.OK)
|
||
{
|
||
//treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
||
}
|
||
}
|
||
|
||
private void PlotSif(string name)
|
||
{
|
||
if (File.Exists(name))//是文件
|
||
{
|
||
//MessageBox.Show(this, "绘制:" + name, "提示");
|
||
|
||
if (name.Contains(mProjectManager.MetadataPath) | name.Contains(mProjectManager.RawPath) | name.Contains(mProjectManager.RadPath))
|
||
return;
|
||
|
||
chartTC1.clearAll();
|
||
PlotSifSpectral(name);
|
||
}
|
||
else if (Directory.Exists(name))//是文件夹
|
||
{
|
||
|
||
}
|
||
|
||
}
|
||
|
||
private void ShowPointInfo(Stack name, Stack x, Stack y)
|
||
{
|
||
PointInfoTextBox.Clear();
|
||
|
||
string pointInfo = "";
|
||
int count = name.Count;
|
||
for (int i = 0; i < count; i++)
|
||
{
|
||
pointInfo += name.Pop().ToString() + "\r\nx: " + x.Pop().ToString() + "\r\ny: " + y.Pop().ToString() + "\r\n";//System.Environment.NewLine
|
||
|
||
}
|
||
PointInfoTextBox.Text = pointInfo;
|
||
}
|
||
|
||
private void main_Load(object sender, EventArgs e)
|
||
{
|
||
treeViewTc21.DeleteEvent += DeleteFiles;
|
||
treeViewTc21.PlotSifEvent += PlotSif;
|
||
treeViewTc21.SaveAsEvent += SaveAs;
|
||
|
||
chartTC1.clickPointEvent += ShowPointInfo;
|
||
}
|
||
|
||
public void PlotSifSpectral(string path)
|
||
{
|
||
//SpectralDataReaderWriter spectralDataReaderWriter = new SpectralDataReaderWriter(@"D:\Desktop\0sifRawData\rawdata\2021_12_21\beijing_10_53_45.csv");
|
||
//SpectralData spectralData = spectralDataReaderWriter.GetSpectral(1);
|
||
|
||
//List<double> x1 = new List<double>();
|
||
//List<double> y1 = new List<double>();
|
||
//for (int i = 0; i < spectralData.spectral.Length; i++)
|
||
//{
|
||
// x1.Add((double)i);
|
||
// y1.Add(spectralData.spectral[i]);
|
||
//}
|
||
|
||
//RefreshChart(x1, y1, "chart1");
|
||
|
||
|
||
|
||
SifDataReaderWriter sifDataReaderWriter = new SifDataReaderWriter(path);
|
||
SifData sifData = sifDataReaderWriter.GetSifData();
|
||
|
||
double[] y = new double[sifData.sif.GetLength(0)];
|
||
for (int i = 0; i < sifData.sif.GetLength(1); i++)
|
||
{
|
||
for (int j = 0; j < sifData.sif.GetLength(0); j++)
|
||
{
|
||
y[j] = sifData.sif[j, i];
|
||
}
|
||
|
||
//string[] tmp = path.Split('\\');
|
||
//string[] fileName = tmp[tmp.Length - 1].Split('_');
|
||
//RefreshChart(sifData.time, y, fileName[0]);
|
||
|
||
RefreshChart(sifData.time, y, sifData.position[i]);
|
||
}
|
||
|
||
}
|
||
|
||
public delegate void RefreshChartDelegate(string[] x, double[] y, string type);
|
||
public void RefreshChart(string[] x, double[] y, string name)
|
||
{
|
||
if (chartTC1.chart1.InvokeRequired)
|
||
{
|
||
RefreshChartDelegate stcb = new RefreshChartDelegate(RefreshChart);
|
||
this.Invoke(stcb, new object[] { x, y, name });
|
||
}
|
||
else
|
||
{
|
||
//chartTC1.chart1.Series[0].Points.DataBindXY(x, y);
|
||
|
||
chartTC1.addSeries(x, y, name);
|
||
}
|
||
}
|
||
|
||
private void InitializeComponent()
|
||
{
|
||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(main));
|
||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.NewProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.OpenProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.CloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.ExitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.preprocessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.RadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.sifComputeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.SvdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.DoasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.SfmToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.SfmGaussinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.SfldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.Fld3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||
this.panel1 = new System.Windows.Forms.Panel();
|
||
this.treeViewTc21 = new TreeViewTc.TreeViewTc2();
|
||
this.PointInfoTextBox = new System.Windows.Forms.TextBox();
|
||
this.chartTC1 = new chartTC.chartTC();
|
||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||
this.menuStrip1.SuspendLayout();
|
||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||
this.splitContainer1.Panel1.SuspendLayout();
|
||
this.splitContainer1.Panel2.SuspendLayout();
|
||
this.splitContainer1.SuspendLayout();
|
||
this.panel1.SuspendLayout();
|
||
this.toolStrip1.SuspendLayout();
|
||
this.SuspendLayout();
|
||
//
|
||
// menuStrip1
|
||
//
|
||
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||
this.fileToolStripMenuItem,
|
||
this.preprocessToolStripMenuItem,
|
||
this.sifComputeToolStripMenuItem});
|
||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||
this.menuStrip1.Name = "menuStrip1";
|
||
this.menuStrip1.Size = new System.Drawing.Size(1420, 25);
|
||
this.menuStrip1.TabIndex = 0;
|
||
this.menuStrip1.Text = "menuStrip1";
|
||
//
|
||
// fileToolStripMenuItem
|
||
//
|
||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||
this.NewProjectToolStripMenuItem,
|
||
this.OpenProjectToolStripMenuItem,
|
||
this.CloseToolStripMenuItem,
|
||
this.ExitToolStripMenuItem});
|
||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
|
||
this.fileToolStripMenuItem.Text = "文件";
|
||
//
|
||
// NewProjectToolStripMenuItem
|
||
//
|
||
this.NewProjectToolStripMenuItem.Name = "NewProjectToolStripMenuItem";
|
||
this.NewProjectToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
|
||
this.NewProjectToolStripMenuItem.Text = "新建工程";
|
||
this.NewProjectToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||
//
|
||
// OpenProjectToolStripMenuItem
|
||
//
|
||
this.OpenProjectToolStripMenuItem.Name = "OpenProjectToolStripMenuItem";
|
||
this.OpenProjectToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
|
||
this.OpenProjectToolStripMenuItem.Text = "打开工程";
|
||
this.OpenProjectToolStripMenuItem.Click += new System.EventHandler(this.OpenProjectToolStripMenuItem_Click);
|
||
//
|
||
// CloseToolStripMenuItem
|
||
//
|
||
this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem";
|
||
this.CloseToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
|
||
this.CloseToolStripMenuItem.Text = "关闭工程";
|
||
this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click);
|
||
//
|
||
// ExitToolStripMenuItem
|
||
//
|
||
this.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem";
|
||
this.ExitToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
|
||
this.ExitToolStripMenuItem.Text = "退出";
|
||
this.ExitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolStripMenuItem_Click);
|
||
//
|
||
// preprocessToolStripMenuItem
|
||
//
|
||
this.preprocessToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||
this.RadToolStripMenuItem});
|
||
this.preprocessToolStripMenuItem.Name = "preprocessToolStripMenuItem";
|
||
this.preprocessToolStripMenuItem.Size = new System.Drawing.Size(56, 21);
|
||
this.preprocessToolStripMenuItem.Text = "预处理";
|
||
//
|
||
// RadToolStripMenuItem
|
||
//
|
||
this.RadToolStripMenuItem.Name = "RadToolStripMenuItem";
|
||
this.RadToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
|
||
this.RadToolStripMenuItem.Text = "辐亮度校正";
|
||
this.RadToolStripMenuItem.Click += new System.EventHandler(this.RadToolStripMenuItem_Click);
|
||
//
|
||
// sifComputeToolStripMenuItem
|
||
//
|
||
this.sifComputeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||
this.SvdToolStripMenuItem,
|
||
this.DoasToolStripMenuItem,
|
||
this.SfmToolStripMenuItem,
|
||
this.SfmGaussinToolStripMenuItem,
|
||
this.SfldToolStripMenuItem,
|
||
this.Fld3ToolStripMenuItem});
|
||
this.sifComputeToolStripMenuItem.Name = "sifComputeToolStripMenuItem";
|
||
this.sifComputeToolStripMenuItem.Size = new System.Drawing.Size(58, 21);
|
||
this.sifComputeToolStripMenuItem.Text = "Sif算法";
|
||
//
|
||
// SvdToolStripMenuItem
|
||
//
|
||
this.SvdToolStripMenuItem.Name = "SvdToolStripMenuItem";
|
||
this.SvdToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.SvdToolStripMenuItem.Text = "Svd";
|
||
this.SvdToolStripMenuItem.Click += new System.EventHandler(this.SvdToolStripMenuItem_Click);
|
||
//
|
||
// DoasToolStripMenuItem
|
||
//
|
||
this.DoasToolStripMenuItem.Name = "DoasToolStripMenuItem";
|
||
this.DoasToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.DoasToolStripMenuItem.Text = "Doas";
|
||
this.DoasToolStripMenuItem.Click += new System.EventHandler(this.DoasToolStripMenuItem_Click);
|
||
//
|
||
// SfmToolStripMenuItem
|
||
//
|
||
this.SfmToolStripMenuItem.Name = "SfmToolStripMenuItem";
|
||
this.SfmToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.SfmToolStripMenuItem.Text = "Sfm";
|
||
this.SfmToolStripMenuItem.Click += new System.EventHandler(this.SfmToolStripMenuItem_Click);
|
||
//
|
||
// SfmGaussinToolStripMenuItem
|
||
//
|
||
this.SfmGaussinToolStripMenuItem.Name = "SfmGaussinToolStripMenuItem";
|
||
this.SfmGaussinToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.SfmGaussinToolStripMenuItem.Text = "Sfm gaussian";
|
||
this.SfmGaussinToolStripMenuItem.Click += new System.EventHandler(this.SfmGaussinToolStripMenuItem_Click);
|
||
//
|
||
// SfldToolStripMenuItem
|
||
//
|
||
this.SfldToolStripMenuItem.Name = "SfldToolStripMenuItem";
|
||
this.SfldToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.SfldToolStripMenuItem.Text = "Sfld";
|
||
this.SfldToolStripMenuItem.Click += new System.EventHandler(this.SfldToolStripMenuItem_Click);
|
||
//
|
||
// Fld3ToolStripMenuItem
|
||
//
|
||
this.Fld3ToolStripMenuItem.Name = "Fld3ToolStripMenuItem";
|
||
this.Fld3ToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||
this.Fld3ToolStripMenuItem.Text = "3Fld";
|
||
this.Fld3ToolStripMenuItem.Click += new System.EventHandler(this.Fld3ToolStripMenuItem_Click);
|
||
//
|
||
// statusStrip1
|
||
//
|
||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||
this.statusStrip1.Location = new System.Drawing.Point(0, 1040);
|
||
this.statusStrip1.Name = "statusStrip1";
|
||
this.statusStrip1.Size = new System.Drawing.Size(1420, 22);
|
||
this.statusStrip1.TabIndex = 1;
|
||
this.statusStrip1.Text = "statusStrip1";
|
||
//
|
||
// splitContainer1
|
||
//
|
||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||
this.splitContainer1.Location = new System.Drawing.Point(0, 52);
|
||
this.splitContainer1.Name = "splitContainer1";
|
||
//
|
||
// splitContainer1.Panel1
|
||
//
|
||
this.splitContainer1.Panel1.Controls.Add(this.panel1);
|
||
//
|
||
// splitContainer1.Panel2
|
||
//
|
||
this.splitContainer1.Panel2.Controls.Add(this.chartTC1);
|
||
this.splitContainer1.Size = new System.Drawing.Size(1420, 988);
|
||
this.splitContainer1.SplitterDistance = 269;
|
||
this.splitContainer1.TabIndex = 6;
|
||
//
|
||
// panel1
|
||
//
|
||
this.panel1.Controls.Add(this.treeViewTc21);
|
||
this.panel1.Controls.Add(this.PointInfoTextBox);
|
||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||
this.panel1.Name = "panel1";
|
||
this.panel1.Size = new System.Drawing.Size(269, 988);
|
||
this.panel1.TabIndex = 6;
|
||
//
|
||
// treeViewTc21
|
||
//
|
||
this.treeViewTc21.Dock = System.Windows.Forms.DockStyle.Fill;
|
||
this.treeViewTc21.Location = new System.Drawing.Point(0, 0);
|
||
this.treeViewTc21.Margin = new System.Windows.Forms.Padding(4);
|
||
this.treeViewTc21.Name = "treeViewTc21";
|
||
this.treeViewTc21.Size = new System.Drawing.Size(269, 731);
|
||
this.treeViewTc21.TabIndex = 6;
|
||
this.treeViewTc21.Load += new System.EventHandler(this.treeViewTc21_Load);
|
||
//
|
||
// PointInfoTextBox
|
||
//
|
||
this.PointInfoTextBox.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||
this.PointInfoTextBox.Location = new System.Drawing.Point(0, 731);
|
||
this.PointInfoTextBox.Multiline = true;
|
||
this.PointInfoTextBox.Name = "PointInfoTextBox";
|
||
this.PointInfoTextBox.ReadOnly = true;
|
||
this.PointInfoTextBox.Size = new System.Drawing.Size(269, 257);
|
||
this.PointInfoTextBox.TabIndex = 5;
|
||
//
|
||
// chartTC1
|
||
//
|
||
this.chartTC1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||
this.chartTC1.Location = new System.Drawing.Point(0, 0);
|
||
this.chartTC1.Name = "chartTC1";
|
||
this.chartTC1.Size = new System.Drawing.Size(1147, 988);
|
||
this.chartTC1.TabIndex = 3;
|
||
this.chartTC1.Load += new System.EventHandler(this.chartTC1_Load);
|
||
//
|
||
// toolStrip1
|
||
//
|
||
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||
this.toolStripButton1});
|
||
this.toolStrip1.Location = new System.Drawing.Point(0, 25);
|
||
this.toolStrip1.Name = "toolStrip1";
|
||
this.toolStrip1.Size = new System.Drawing.Size(1420, 27);
|
||
this.toolStrip1.TabIndex = 7;
|
||
this.toolStrip1.Text = "toolStrip1";
|
||
//
|
||
// toolStripButton1
|
||
//
|
||
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||
this.toolStripButton1.Name = "toolStripButton1";
|
||
this.toolStripButton1.Size = new System.Drawing.Size(24, 24);
|
||
this.toolStripButton1.Text = "toolStripButton1";
|
||
//
|
||
// main
|
||
//
|
||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||
this.ClientSize = new System.Drawing.Size(1420, 1062);
|
||
this.Controls.Add(this.splitContainer1);
|
||
this.Controls.Add(this.toolStrip1);
|
||
this.Controls.Add(this.statusStrip1);
|
||
this.Controls.Add(this.menuStrip1);
|
||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||
this.MainMenuStrip = this.menuStrip1;
|
||
this.Name = "main";
|
||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||
this.Text = "easySif";
|
||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.main_FormClosing);
|
||
this.Load += new System.EventHandler(this.main_Load);
|
||
this.menuStrip1.ResumeLayout(false);
|
||
this.menuStrip1.PerformLayout();
|
||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||
this.splitContainer1.ResumeLayout(false);
|
||
this.panel1.ResumeLayout(false);
|
||
this.panel1.PerformLayout();
|
||
this.toolStrip1.ResumeLayout(false);
|
||
this.toolStrip1.PerformLayout();
|
||
this.ResumeLayout(false);
|
||
this.PerformLayout();
|
||
|
||
}
|
||
|
||
private void chart1_Click(object sender, EventArgs e)
|
||
{
|
||
|
||
}
|
||
|
||
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
|
||
{
|
||
|
||
}
|
||
|
||
private void treeViewTc21_Load(object sender, EventArgs e)
|
||
{
|
||
|
||
}
|
||
|
||
private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
|
||
{
|
||
if (mProjectManager == null)
|
||
return;
|
||
|
||
int index = this.Text.IndexOf(getProjectName());
|
||
this.Text = this.Text.Substring(0, index - 1);//index - 1:还要加上一个字符“-”
|
||
|
||
mProjectManager = null;
|
||
GC.Collect();
|
||
treeViewTc21.clearAll();
|
||
chartTC1.chart1.Series.Clear();
|
||
PointInfoTextBox.Clear();
|
||
}
|
||
|
||
private void chartTC1_Load(object sender, EventArgs e)
|
||
{
|
||
|
||
}
|
||
}
|
||
|
||
}
|