1、添加2个自定义控件:chartTC、TreeViewTc; 2、修复了一些bug,完善了功能;3、更新了gitignore,将bin等目录忽略;
This commit is contained in:
145
.gitignore
vendored
145
.gitignore
vendored
@ -1,4 +1,141 @@
|
|||||||
./0easySifProject
|
# tc
|
||||||
./0sifRawData
|
packages/
|
||||||
./MyComputers.xml
|
sifAlgorithm_Python_exe/
|
||||||
./packages
|
Setup/
|
||||||
|
*.docx
|
||||||
|
|
||||||
|
.vs
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
x64/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_i.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.log
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.Publish.xml
|
||||||
|
*.pubxml
|
||||||
|
*.azurePubxml
|
||||||
|
|
||||||
|
# NuGet Packages Directory
|
||||||
|
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||||
|
packages/
|
||||||
|
## TODO: If the tool you use requires repositories.config, also uncomment the next line
|
||||||
|
!packages/repositories.config
|
||||||
|
|
||||||
|
# Windows Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Windows Store app package directory
|
||||||
|
AppPackages/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
sql/
|
||||||
|
*.Cache
|
||||||
|
ClientBin/
|
||||||
|
[Ss]tyle[Cc]op.*
|
||||||
|
![Ss]tyle[Cc]op.targets
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
|
||||||
|
*.publishsettings
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file to a newer
|
||||||
|
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
App_Data/*.mdf
|
||||||
|
App_Data/*.ldf
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# Windows detritus
|
||||||
|
# =========================
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Mac desktop service store files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
_NCrunch*
|
||||||
36
TreeViewTc/Properties/AssemblyInfo.cs
Normal file
36
TreeViewTc/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("TreeViewTc")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("TreeViewTc")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("d8ed957e-4b79-4c20-a2aa-c70008e5dad8")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
|
// 方法是按如下所示使用“*”: :
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
60
TreeViewTc/TreeViewTc.csproj
Normal file
60
TreeViewTc/TreeViewTc.csproj
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{D8ED957E-4B79-4C20-A2AA-C70008E5DAD8}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>TreeViewTc</RootNamespace>
|
||||||
|
<AssemblyName>TreeViewTc</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="TreeViewTc2.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TreeViewTc2.Designer.cs">
|
||||||
|
<DependentUpon>TreeViewTc2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="TreeViewTc2.resx">
|
||||||
|
<DependentUpon>TreeViewTc2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
99
TreeViewTc/TreeViewTc2.Designer.cs
generated
Normal file
99
TreeViewTc/TreeViewTc2.Designer.cs
generated
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
namespace TreeViewTc
|
||||||
|
{
|
||||||
|
partial class TreeViewTc2
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// treeView1
|
||||||
|
//
|
||||||
|
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.treeView1.HotTracking = true;
|
||||||
|
this.treeView1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.treeView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.treeView1.Name = "treeView1";
|
||||||
|
this.treeView1.Size = new System.Drawing.Size(209, 539);
|
||||||
|
this.treeView1.TabIndex = 0;
|
||||||
|
this.treeView1.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView1_BeforeExpand);
|
||||||
|
this.treeView1.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterExpand);
|
||||||
|
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||||
|
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||||
|
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
|
||||||
|
this.treeView1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeView1_MouseUp);
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.deleteToolStripMenuItem,
|
||||||
|
this.saveAsToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(211, 80);
|
||||||
|
//
|
||||||
|
// deleteToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||||
|
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(210, 24);
|
||||||
|
this.deleteToolStripMenuItem.Text = "delete";
|
||||||
|
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// saveAsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||||
|
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(210, 24);
|
||||||
|
this.saveAsToolStripMenuItem.Text = "saveAs";
|
||||||
|
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// TreeViewTc2
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.treeView1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||||
|
this.Name = "TreeViewTc2";
|
||||||
|
this.Size = new System.Drawing.Size(209, 539);
|
||||||
|
this.Load += new System.EventHandler(this.TreeViewTc2_Load);
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public System.Windows.Forms.TreeView treeView1;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
256
TreeViewTc/TreeViewTc2.cs
Normal file
256
TreeViewTc/TreeViewTc2.cs
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
//自定义封装控件:
|
||||||
|
//(1)控件为成员【本代码使用此方法】:https://blog.csdn.net/wanlong360599336/article/details/7578447
|
||||||
|
//(2)继承控件:https://blog.csdn.net/aoshilang2249/article/details/41252781?utm_medium=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-2.nonecase&depth_1-utm_source=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-2.nonecase
|
||||||
|
namespace TreeViewTc
|
||||||
|
{
|
||||||
|
public delegate void Delegate1(string vinfo);//申明委托类型:用于进度条的更新
|
||||||
|
|
||||||
|
public partial class TreeViewTc2 : UserControl
|
||||||
|
{
|
||||||
|
public TreeViewTc2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
treeView1.ExpandAll();
|
||||||
|
//treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
|
||||||
|
|
||||||
|
//this.treeView1.ContextMenuStrip = this.contextMenuStrip1;//这行代码有问题:在控件treeView1任何位置鼠标右击都会显示右键菜单
|
||||||
|
}
|
||||||
|
|
||||||
|
void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Button != MouseButtons.Right) return;
|
||||||
|
if (e.Node.Parent == null || e.Node == null) return;
|
||||||
|
treeView1.SelectedNode = e.Node;
|
||||||
|
contextMenuStrip1.Show(treeView1, e.X, e.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public event Delegate1 PlotSifEvent;//申明事件
|
||||||
|
private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Button != MouseButtons.Left) return;
|
||||||
|
if (e.Node.Parent == null || e.Node == null) return;
|
||||||
|
treeView1.SelectedNode = e.Node;
|
||||||
|
|
||||||
|
string nodeName = treeView1.SelectedNode.Name;
|
||||||
|
|
||||||
|
if (PlotSifEvent != null)
|
||||||
|
{
|
||||||
|
PlotSifEvent(nodeName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TreeViewTc2_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
////实例化TreeNode类 TreeNode(string text,int imageIndex,int selectImageIndex)
|
||||||
|
//TreeNode rootNode = new TreeNode("我的电脑"); //载入显示 选择显示
|
||||||
|
//rootNode.Tag = "我的电脑"; //树节点数据
|
||||||
|
//rootNode.Text = "我的电脑"; //树节点标签内容
|
||||||
|
//treeView1.Nodes.Add(rootNode); //树中添加根目录
|
||||||
|
|
||||||
|
////显示MyDocuments(我的文档)结点
|
||||||
|
//var myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);//获取计算机我的文档文件夹
|
||||||
|
//TreeNode DocNode = new TreeNode(myDocuments);
|
||||||
|
//DocNode.Tag = "我的文档"; //设置结点名称
|
||||||
|
//DocNode.Text = "我的文档";
|
||||||
|
////DocNode.ImageIndex = IconIndexes.MyDocuments; //设置获取结点显示图片
|
||||||
|
////DocNode.SelectedImageIndex = IconIndexes.MyDocuments; //设置选择显示图片
|
||||||
|
//rootNode.Nodes.Add(DocNode); //rootNode目录下加载节点
|
||||||
|
//DocNode.Nodes.Add("");
|
||||||
|
|
||||||
|
////循环遍历计算机所有逻辑驱动器名称(盘符)
|
||||||
|
//foreach (string drive in Environment.GetLogicalDrives())
|
||||||
|
//{
|
||||||
|
// //实例化DriveInfo对象 命名空间System.IO
|
||||||
|
// var dir = new DriveInfo(drive);
|
||||||
|
// switch (dir.DriveType) //判断驱动器类型
|
||||||
|
// {
|
||||||
|
// case DriveType.Fixed: //仅取固定磁盘盘符 Removable-U盘
|
||||||
|
// {
|
||||||
|
// //Split仅获取盘符字母
|
||||||
|
// TreeNode tNode = new TreeNode(dir.Name.Split(':')[0]);
|
||||||
|
// tNode.Name = dir.Name;
|
||||||
|
// tNode.Tag = tNode.Name;
|
||||||
|
// //tNode.ImageIndex = IconIndexes.FixedDrive; //获取结点显示图片
|
||||||
|
// //tNode.SelectedImageIndex = IconIndexes.FixedDrive; //选择显示图片
|
||||||
|
// treeView1.Nodes.Add(tNode); //加载驱动节点
|
||||||
|
// tNode.Nodes.Add("");
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//rootNode.Expand();//展开树状视图
|
||||||
|
|
||||||
|
|
||||||
|
//string path = @"D:\Desktop\0easySifProject";
|
||||||
|
//Initialize(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string mPath;
|
||||||
|
public void Initialize(string path)
|
||||||
|
{
|
||||||
|
string[] dics = Directory.GetDirectories(path);
|
||||||
|
foreach (string dic in dics)
|
||||||
|
{
|
||||||
|
if (dic.Contains("sifTmp"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
TreeNode subNode = new TreeNode(new DirectoryInfo(dic).Name);//实例化
|
||||||
|
subNode.Name = new DirectoryInfo(dic).FullName;//完整目录
|
||||||
|
subNode.Tag = subNode.Name;
|
||||||
|
treeView1.Nodes.Add(subNode);
|
||||||
|
subNode.Nodes.Add("");//加载空节点 实现+号
|
||||||
|
}
|
||||||
|
|
||||||
|
mPath = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reInitialize()
|
||||||
|
{
|
||||||
|
clearAll();
|
||||||
|
Initialize(mPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearAll()
|
||||||
|
{
|
||||||
|
treeView1.Nodes.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRootNode(string NodeName)
|
||||||
|
{
|
||||||
|
//添加根节点
|
||||||
|
treeView1.Nodes.Add(NodeName.Trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnAddSonNode_Click(string SonNodeName)
|
||||||
|
{
|
||||||
|
if (treeView1.SelectedNode == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("请选择要添加子节点的节点!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
treeView1.SelectedNode.Nodes.Add(SonNodeName.Trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void treeView1_AfterExpand(object sender, TreeViewEventArgs e)
|
||||||
|
{
|
||||||
|
e.Node.Expand();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void treeView1_BeforeExpand(object sender, TreeViewCancelEventArgs e)
|
||||||
|
{
|
||||||
|
TreeViewItems.Add(e.Node);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public event Delegate1 DeleteEvent;//申明事件
|
||||||
|
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string nodeName = treeView1.SelectedNode.Name;
|
||||||
|
|
||||||
|
if (MessageBox.Show("确认删除?", "此删除不可恢复", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
if (DeleteEvent != null)
|
||||||
|
{
|
||||||
|
DeleteEvent(nodeName);
|
||||||
|
treeView1.SelectedNode.Remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void treeView1_MouseUp(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public event Delegate1 SaveAsEvent;//申明事件
|
||||||
|
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string nodeName = treeView1.SelectedNode.Name;
|
||||||
|
|
||||||
|
if (SaveAsEvent != null)
|
||||||
|
{
|
||||||
|
SaveAsEvent(nodeName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class TreeViewItems
|
||||||
|
{
|
||||||
|
public static void Add(TreeNode treeNode)
|
||||||
|
{
|
||||||
|
//try..catch异常处理
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//判断"我的电脑"Tag 上面加载的该结点没指定其路径
|
||||||
|
if (treeNode.Tag.ToString() != "我的电脑")
|
||||||
|
{
|
||||||
|
treeNode.Nodes.Clear();//清除空节点再加载子节点
|
||||||
|
TreeNode tNode = treeNode;//获取选中\展开\折叠结点
|
||||||
|
string path = tNode.Name;//路径
|
||||||
|
|
||||||
|
//获取"我的文档"路径
|
||||||
|
if (treeNode.Tag.ToString() == "我的文档")
|
||||||
|
{
|
||||||
|
path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);//获取计算机我的文档文件夹
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取指定目录中的子目录名称并加载结点
|
||||||
|
string[] dics = Directory.GetDirectories(path);
|
||||||
|
foreach (string dic in dics)
|
||||||
|
{
|
||||||
|
TreeNode subNode = new TreeNode(new DirectoryInfo(dic).Name);//实例化
|
||||||
|
subNode.Name = new DirectoryInfo(dic).FullName;//完整目录
|
||||||
|
subNode.Tag = subNode.Name;
|
||||||
|
//subNode.ImageIndex = IconIndexes.ClosedFolder;//获取节点显示图片
|
||||||
|
//subNode.SelectedImageIndex = IconIndexes.OpenFolder;//选择节点显示图片
|
||||||
|
tNode.Nodes.Add(subNode);
|
||||||
|
subNode.Nodes.Add("");//加载空节点 实现+号
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取目录中的文件
|
||||||
|
string[] files = Directory.GetFiles(path);
|
||||||
|
foreach (string file in files)
|
||||||
|
{
|
||||||
|
string[] nameTmp = file.Split('\\');
|
||||||
|
string name = nameTmp[nameTmp.Length - 1];
|
||||||
|
|
||||||
|
TreeNode subNode = new TreeNode(name);//实例化
|
||||||
|
subNode.Name = file;//完整目录
|
||||||
|
subNode.Tag = subNode.Name;
|
||||||
|
//subNode.ImageIndex = IconIndexes.ClosedFolder;//获取节点显示图片
|
||||||
|
//subNode.SelectedImageIndex = IconIndexes.OpenFolder;//选择节点显示图片
|
||||||
|
tNode.Nodes.Add(subNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception msg)
|
||||||
|
{
|
||||||
|
MessageBox.Show(msg.Message);//异常处理
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
123
TreeViewTc/TreeViewTc2.resx
Normal file
123
TreeViewTc/TreeViewTc2.resx
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
36
chartTC/Properties/AssemblyInfo.cs
Normal file
36
chartTC/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("chartTC")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("chartTC")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("79fb5f64-9da8-42bf-b1e5-749aea345c7e")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
|
// 方法是按如下所示使用“*”: :
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
98
chartTC/chartTC.Designer.cs
generated
Normal file
98
chartTC/chartTC.Designer.cs
generated
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
namespace chartTC
|
||||||
|
{
|
||||||
|
partial class chartTC
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||||
|
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
|
||||||
|
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||||
|
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.clearAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// chart1
|
||||||
|
//
|
||||||
|
chartArea1.Name = "ChartArea1";
|
||||||
|
this.chart1.ChartAreas.Add(chartArea1);
|
||||||
|
this.chart1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
legend1.Name = "Legend1";
|
||||||
|
this.chart1.Legends.Add(legend1);
|
||||||
|
this.chart1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.chart1.Name = "chart1";
|
||||||
|
series1.ChartArea = "ChartArea1";
|
||||||
|
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
|
||||||
|
series1.Legend = "Legend1";
|
||||||
|
series1.Name = "Series1";
|
||||||
|
this.chart1.Series.Add(series1);
|
||||||
|
this.chart1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
this.chart1.TabIndex = 0;
|
||||||
|
this.chart1.Text = "chart1";
|
||||||
|
this.chart1.Click += new System.EventHandler(this.chart1_Click);
|
||||||
|
this.chart1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseClick);
|
||||||
|
this.chart1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseDoubleClick);
|
||||||
|
this.chart1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart1_MouseMove);
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.clearAllToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(121, 26);
|
||||||
|
//
|
||||||
|
// clearAllToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.clearAllToolStripMenuItem.Name = "clearAllToolStripMenuItem";
|
||||||
|
this.clearAllToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
|
||||||
|
this.clearAllToolStripMenuItem.Text = "ClearAll";
|
||||||
|
this.clearAllToolStripMenuItem.Click += new System.EventHandler(this.clearAllToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// chartTC
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.chart1);
|
||||||
|
this.Name = "chartTC";
|
||||||
|
this.Size = new System.Drawing.Size(800, 450);
|
||||||
|
this.Load += new System.EventHandler(this.chartTC_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public System.Windows.Forms.DataVisualization.Charting.Chart chart1;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem clearAllToolStripMenuItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
450
chartTC/chartTC.cs
Normal file
450
chartTC/chartTC.cs
Normal file
@ -0,0 +1,450 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
using System.Windows.Forms.DataVisualization.Charting;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace chartTC
|
||||||
|
{
|
||||||
|
public delegate void clickEventHandler(Stack name, Stack x, Stack y);
|
||||||
|
|
||||||
|
public partial class chartTC: UserControl
|
||||||
|
{
|
||||||
|
public chartTC()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chart1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chartTC_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
chart1.Series.Clear();
|
||||||
|
//ChartHelper.AddSeries(chart1, "曲线图", SeriesChartType.Line, Color.Red, Color.Red);
|
||||||
|
//ChartHelper.SetTitle(chart1, "sif", new Font("微软雅黑", 12), Docking.Bottom, Color.White);
|
||||||
|
ChartHelper.SetStyle(chart1, Color.Transparent, Color.White);
|
||||||
|
//ChartHelper.SetLegend(chart1, Docking.Top, StringAlignment.Center, Color.Transparent, Color.White);
|
||||||
|
//ChartHelper.SetXY(chart1, "波长", "值", StringAlignment.Far, Color.Black, Color.Black, AxisArrowStyle.None/*AxisArrowStyle.SharpTriangle*/, 10, 5);
|
||||||
|
ChartHelper.SetMajorGrid(chart1, Color.Gray, 20, 2);
|
||||||
|
|
||||||
|
|
||||||
|
//chart1.GetToolTipText += new EventHandler<ToolTipEventArgs>(chart_GetToolTipText);//https://bbs.csdn.net/topics/390754014
|
||||||
|
|
||||||
|
|
||||||
|
chart1.ChartAreas[0].CursorX.Interval = 0;
|
||||||
|
chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
|
||||||
|
chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void chart_GetToolTipText(object sender, ToolTipEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.HitTestResult.ChartElementType == ChartElementType.DataPoint)
|
||||||
|
{
|
||||||
|
int i = e.HitTestResult.PointIndex;
|
||||||
|
DataPoint dp = e.HitTestResult.Series.Points[i];
|
||||||
|
e.Text = string.Format("{1:F3}", dp.XValue, dp.YValues[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Point? prevPosition = null;
|
||||||
|
ToolTip tooltip = new ToolTip();
|
||||||
|
void chart1_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
var pos = e.Location;
|
||||||
|
if (prevPosition.HasValue && pos == prevPosition.Value)
|
||||||
|
return;
|
||||||
|
tooltip.RemoveAll();
|
||||||
|
prevPosition = pos;
|
||||||
|
|
||||||
|
var results = chart1.HitTest(pos.X, pos.Y, false, ChartElementType.DataPoint);
|
||||||
|
|
||||||
|
//double XVuale = chart1.ChartAreas[0].AxisX.PixelPositionToValue(e.X);
|
||||||
|
|
||||||
|
//chart1.Series[0].
|
||||||
|
|
||||||
|
//tooltip.Show("X=" + prop.AxisLabel + ", Y=" + prop.YValues[0], this.chart1, pos.X, pos.Y - 15);
|
||||||
|
|
||||||
|
foreach (var result in results)
|
||||||
|
{
|
||||||
|
if (result.ChartElementType == ChartElementType.DataPoint)
|
||||||
|
{
|
||||||
|
var prop = result.Object as DataPoint;
|
||||||
|
if (prop != null)
|
||||||
|
{
|
||||||
|
var pointXPixel = result.ChartArea.AxisX.ValueToPixelPosition(prop.XValue);
|
||||||
|
var pointYPixel = result.ChartArea.AxisY.ValueToPixelPosition(prop.YValues[0]);
|
||||||
|
|
||||||
|
// check if the cursor is really close to the point (2 pixels around the point)
|
||||||
|
//if (Math.Abs(pos.X - pointXPixel) < 2 &&
|
||||||
|
// Math.Abs(pos.Y - pointYPixel) < 2)
|
||||||
|
//{
|
||||||
|
// tooltip.Show("X=" + prop.XValue + ", Y=" + prop.YValues[0], this.chart1,
|
||||||
|
// pos.X, pos.Y - 15);
|
||||||
|
//}
|
||||||
|
|
||||||
|
tooltip.Show("X=" + prop.AxisLabel + ", Y=" + prop.YValues[0], this.chart1, pos.X, pos.Y - 15);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chart_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
//labX.Text = e.X.ToString();
|
||||||
|
//labY.Text = e.Y.ToString();
|
||||||
|
|
||||||
|
//if (e.HitTestResult.ChartElementType == ChartElementType.DataPoint)
|
||||||
|
//{
|
||||||
|
// int i = e.HitTestResult.PointIndex;
|
||||||
|
// DataPoint dp = e.HitTestResult.Series.Points[i];
|
||||||
|
// e.Text = string.Format("{1:F3}", dp.XValue, dp.YValues[0]);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//ChartHitInfo hitInfo = chartControl4.CalcHitInfo(e.Location);
|
||||||
|
//if (hitInfo.SeriesPoint != null)
|
||||||
|
//{
|
||||||
|
// MessageBox.Show(hitInfo.SeriesPoint.Values[0].ToString());
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chart_Wave1_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
HitTestResult myTestResult = chart1.HitTest(e.X, e.Y);
|
||||||
|
if (myTestResult.ChartElementType == ChartElementType.DataPoint)
|
||||||
|
{
|
||||||
|
this.Cursor = Cursors.Cross;
|
||||||
|
int i = myTestResult.PointIndex;
|
||||||
|
DataPoint dp = myTestResult.Series.Points[i];
|
||||||
|
|
||||||
|
double doubleXValue = (dp.XValue);
|
||||||
|
double doubleYValue = dp.YValues[0];
|
||||||
|
//自我实现值的显示
|
||||||
|
MessageBox.Show(doubleYValue.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Cursor = Cursors.Default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public event clickEventHandler clickPointEvent;
|
||||||
|
private void chart1_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (chart1.Series.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if (e.Button == MouseButtons.Left)
|
||||||
|
{
|
||||||
|
//var collection = chart1.Series.Select(series => series.Points.Where(point => point.XValue == 0).ToList()).ToList();//????????????????????????????????????????????????????????
|
||||||
|
//chart1.Series.ElementAt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////方式1:遍历x坐标处的所有y坐标
|
||||||
|
//var pos = e.Location;
|
||||||
|
|
||||||
|
//var yAxis = chart1.ChartAreas[0].AxisY;
|
||||||
|
//int yMin = (int)yAxis.ValueToPixelPosition(yAxis.Maximum) - 1;
|
||||||
|
//int yMax = (int)yAxis.ValueToPixelPosition(yAxis.Minimum);
|
||||||
|
|
||||||
|
//for (int i = yMin; i < yMax + 1; i++)
|
||||||
|
//{
|
||||||
|
// var results = chart1.HitTest(pos.X, pos.Y, true, ChartElementType.DataPoint);
|
||||||
|
|
||||||
|
// foreach (var result in results)
|
||||||
|
// {
|
||||||
|
// if (result.ChartElementType == ChartElementType.DataPoint)
|
||||||
|
// {
|
||||||
|
// var prop = result.Object as DataPoint;
|
||||||
|
// if (prop != null)
|
||||||
|
// {
|
||||||
|
// var pointXPixel = result.ChartArea.AxisX.ValueToPixelPosition(prop.XValue);
|
||||||
|
// var pointYPixel = result.ChartArea.AxisY.ValueToPixelPosition(prop.YValues[0]);
|
||||||
|
|
||||||
|
// int b = 1;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//方式2:
|
||||||
|
double cursorPos = chart1.ChartAreas[0].CursorX.Position;
|
||||||
|
|
||||||
|
var xAxis = chart1.ChartAreas[0].AxisX;
|
||||||
|
|
||||||
|
double XVuale1 = chart1.ChartAreas[0].AxisX.ValueToPixelPosition(e.X);
|
||||||
|
double XVuale2 = chart1.ChartAreas[0].AxisX.GetPosition(e.X);
|
||||||
|
|
||||||
|
double XVuale3 = Math.Round(chart1.ChartAreas[0].AxisX.PixelPositionToValue(e.X));
|
||||||
|
|
||||||
|
if (XVuale3-1 < xAxis.Minimum)//XVuale3-1:因为在chart上绘制的曲线的第一个点的x坐标为1而不是0;
|
||||||
|
XVuale3 = 1;
|
||||||
|
else if (chart1.Series[0].Points.Count - 1 < XVuale3 - 1)
|
||||||
|
XVuale3= chart1.Series[0].Points.Count;
|
||||||
|
|
||||||
|
chart1.ChartAreas[0].CursorX.Position = XVuale3;
|
||||||
|
|
||||||
|
Stack name = new Stack();
|
||||||
|
Stack x = new Stack();
|
||||||
|
Stack y = new Stack();
|
||||||
|
for (int i = 0; i < chart1.Series.Count; i++)
|
||||||
|
{
|
||||||
|
DataPoint p1 = chart1.Series[i].Points.ElementAt((int)XVuale3 - 1);
|
||||||
|
|
||||||
|
name.Push(chart1.Series[i].Name);
|
||||||
|
x.Push(p1.AxisLabel);
|
||||||
|
y.Push(p1.YValues[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(clickPointEvent != null)
|
||||||
|
clickPointEvent(name, x, y);
|
||||||
|
}
|
||||||
|
else if (e.Button == MouseButtons.Right)
|
||||||
|
{
|
||||||
|
contextMenuStrip1.Show(chart1, e.X, e.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private double calcCursorGraphX(int clientX)
|
||||||
|
{
|
||||||
|
var xAxis = chart1.ChartAreas[0].AxisX;
|
||||||
|
int xRight = (int)xAxis.ValueToPixelPosition(xAxis.Maximum) - 1;
|
||||||
|
int xLeft = (int)xAxis.ValueToPixelPosition(xAxis.Minimum);
|
||||||
|
|
||||||
|
if (clientX > xRight)
|
||||||
|
{
|
||||||
|
return xAxis.Maximum;
|
||||||
|
}
|
||||||
|
else if (clientX < xLeft)
|
||||||
|
{
|
||||||
|
return xAxis.Minimum;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return xAxis.PixelPositionToValue(clientX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//private int nearestPreceedingValue(double x)
|
||||||
|
//{
|
||||||
|
// var bpData = chart1.Series[0].Points;
|
||||||
|
// int bpIndex = bpData.BinarySearch(x, (xVal, point) => Math.Sign(x - point.XValue));
|
||||||
|
|
||||||
|
// if (bpIndex < 0)
|
||||||
|
// {
|
||||||
|
// bpIndex = ~bpIndex; // BinarySearch() returns the index of the next element LARGER than the target.
|
||||||
|
// bpIndex = Math.Max(0, bpIndex - 1); // We want the value of the previous element, so we must decrement the returned index.
|
||||||
|
// } // If this is before the start of the graph, use the first valid data point.
|
||||||
|
|
||||||
|
// return bpIndex;
|
||||||
|
//}
|
||||||
|
|
||||||
|
private void clearAllToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
chart1.Series.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearAll()
|
||||||
|
{
|
||||||
|
chart1.Series.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color ss()
|
||||||
|
{
|
||||||
|
int iSeed = 10;
|
||||||
|
Random ro = new Random(10);
|
||||||
|
long tick = DateTime.Now.Ticks;
|
||||||
|
Random ran = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
|
||||||
|
|
||||||
|
int R = ran.Next(255);
|
||||||
|
int G = ran.Next(255);
|
||||||
|
int B = ran.Next(255);
|
||||||
|
B = (R + G > 400) ? R + G - 400 : B;//0 : 380 - R - G;
|
||||||
|
B = (B > 255) ? 255 : B;
|
||||||
|
return Color.FromArgb(R, G, B);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//return or.FromArgb(random.Next(255), random.Next(255), random.Next(255));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Color GetRandomColor()
|
||||||
|
{
|
||||||
|
Random RandomNum_First = new Random((int)DateTime.Now.Ticks);
|
||||||
|
// 对于C#的随机数,没什么好说的
|
||||||
|
System.Threading.Thread.Sleep(RandomNum_First.Next(50));
|
||||||
|
Random RandomNum_Sencond = new Random((int)DateTime.Now.Ticks);
|
||||||
|
|
||||||
|
// 为了在白色背景上显示,尽量生成深色
|
||||||
|
int int_Red = RandomNum_First.Next(256);
|
||||||
|
int int_Green = RandomNum_Sencond.Next(256);
|
||||||
|
int int_Blue = (int_Red + int_Green > 400) ? 0 : 400 - int_Red - int_Green;
|
||||||
|
int_Blue = (int_Blue > 255) ? 255 : int_Blue;
|
||||||
|
|
||||||
|
return Color.FromArgb(int_Red, int_Green, int_Blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addSeries(string[] x, double[] y,string name)
|
||||||
|
{
|
||||||
|
int count = chart1.Series.Count;
|
||||||
|
|
||||||
|
//ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, Color.Green, Color.Red, false);
|
||||||
|
//ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, ss(), ss(), false);
|
||||||
|
ChartHelper.AddSeries(chart1, name, SeriesChartType.Line, GetRandomColor(), GetRandomColor(), false);
|
||||||
|
|
||||||
|
chart1.Series[count].Points.DataBindXY(x, y);
|
||||||
|
//chart1.Series[count].Points.DataBindY(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chart1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
//Chart chart1 = sender as Chart;
|
||||||
|
//右键恢复事件
|
||||||
|
if (e.Button == MouseButtons.Left)
|
||||||
|
{
|
||||||
|
chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//https://blog.csdn.net/boxuming/article/details/89678159?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.pc_relevant_default&utm_relevant_index=9
|
||||||
|
public class ChartHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Name:添加序列
|
||||||
|
/// Author:by boxuming 2019-04-28 13:59
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="seriesName">序列名称</param>
|
||||||
|
/// <param name="chartType">图表类型</param>
|
||||||
|
/// <param name="color">颜色</param>
|
||||||
|
/// <param name="markColor">标记点颜色</param>
|
||||||
|
/// <param name="showValue">是否显示数值</param>
|
||||||
|
public static void AddSeries(Chart chart, string seriesName, SeriesChartType chartType, Color color, Color markColor, bool showValue = false)
|
||||||
|
{
|
||||||
|
chart.Series.Add(seriesName);
|
||||||
|
chart.Series[seriesName].ChartType = chartType;
|
||||||
|
chart.Series[seriesName].Color = color;
|
||||||
|
|
||||||
|
if (showValue)
|
||||||
|
{
|
||||||
|
chart.Series[seriesName].IsValueShownAsLabel = true;
|
||||||
|
chart.Series[seriesName].MarkerStyle = MarkerStyle.Circle;
|
||||||
|
chart.Series[seriesName].MarkerColor = markColor;
|
||||||
|
chart.Series[seriesName].LabelForeColor = color;
|
||||||
|
chart.Series[seriesName].LabelAngle = -90;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name:设置标题
|
||||||
|
/// Author:by boxuming 2019-04-28 14:25
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="chartName">图表名称</param>
|
||||||
|
public static void SetTitle(Chart chart, string chartName, Font font, Docking docking, Color foreColor)
|
||||||
|
{
|
||||||
|
chart.Titles.Add(chartName);
|
||||||
|
chart.Titles[0].Font = font;
|
||||||
|
chart.Titles[0].Docking = docking;
|
||||||
|
chart.Titles[0].ForeColor = foreColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name:设置样式
|
||||||
|
/// Author:by boxuming 2019-04-23 14:04
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="backColor">背景颜色</param>
|
||||||
|
/// <param name="foreColor">字体颜色</param>
|
||||||
|
public static void SetStyle(Chart chart, Color backColor, Color foreColor)
|
||||||
|
{
|
||||||
|
chart.BackColor = backColor;
|
||||||
|
chart.ChartAreas[0].BackColor = backColor;
|
||||||
|
chart.ForeColor = Color.Red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name:设置图例
|
||||||
|
/// Author:by boxuming 2019-04-23 14:30
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="docking">停靠位置</param>
|
||||||
|
/// <param name="align">对齐方式</param>
|
||||||
|
/// <param name="backColor">背景颜色</param>
|
||||||
|
/// <param name="foreColor">字体颜色</param>
|
||||||
|
public static void SetLegend(Chart chart, Docking docking, StringAlignment align, Color backColor, Color foreColor)
|
||||||
|
{
|
||||||
|
chart.Legends[0].Docking = docking;
|
||||||
|
chart.Legends[0].Alignment = align;
|
||||||
|
chart.Legends[0].BackColor = backColor;
|
||||||
|
chart.Legends[0].ForeColor = foreColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name:设置XY轴
|
||||||
|
/// Author:by boxuming 2019-04-23 14:35
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="xTitle">X轴标题</param>
|
||||||
|
/// <param name="yTitle">Y轴标题</param>
|
||||||
|
/// <param name="align">坐标轴标题对齐方式</param>
|
||||||
|
/// <param name="foreColor">坐标轴字体颜色</param>
|
||||||
|
/// <param name="lineColor">坐标轴颜色</param>
|
||||||
|
/// <param name="arrowStyle">坐标轴箭头样式</param>
|
||||||
|
/// <param name="xInterval">X轴的间距</param>
|
||||||
|
/// <param name="yInterval">Y轴的间距</param>
|
||||||
|
public static void SetXY(Chart chart, string xTitle, string yTitle, StringAlignment align, Color foreColor, Color lineColor, AxisArrowStyle arrowStyle, double xInterval, double yInterval)
|
||||||
|
{
|
||||||
|
chart.ChartAreas[0].AxisX.Title = xTitle;
|
||||||
|
chart.ChartAreas[0].AxisY.Title = yTitle;
|
||||||
|
chart.ChartAreas[0].AxisX.TitleAlignment = align;
|
||||||
|
chart.ChartAreas[0].AxisY.TitleAlignment = align;
|
||||||
|
chart.ChartAreas[0].AxisX.TitleForeColor = foreColor;
|
||||||
|
chart.ChartAreas[0].AxisY.TitleForeColor = foreColor;
|
||||||
|
chart.ChartAreas[0].AxisX.LabelStyle = new LabelStyle() { ForeColor = foreColor };
|
||||||
|
chart.ChartAreas[0].AxisY.LabelStyle = new LabelStyle() { ForeColor = foreColor };
|
||||||
|
chart.ChartAreas[0].AxisX.LineColor = lineColor;
|
||||||
|
chart.ChartAreas[0].AxisY.LineColor = lineColor;
|
||||||
|
chart.ChartAreas[0].AxisX.ArrowStyle = arrowStyle;
|
||||||
|
chart.ChartAreas[0].AxisY.ArrowStyle = arrowStyle;
|
||||||
|
//chart.ChartAreas[0].AxisX.Interval = xInterval;
|
||||||
|
//chart.ChartAreas[0].AxisY.Interval = yInterval;
|
||||||
|
chart.ChartAreas[0].AxisY.IsStartedFromZero = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name:设置网格
|
||||||
|
/// Author:by boxuming 2019-04-23 14:55
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="chart">图表对象</param>
|
||||||
|
/// <param name="lineColor">网格线颜色</param>
|
||||||
|
/// <param name="xInterval">X轴网格的间距</param>
|
||||||
|
/// <param name="yInterval">Y轴网格的间距</param>
|
||||||
|
public static void SetMajorGrid(Chart chart, Color lineColor, double xInterval, double yInterval)
|
||||||
|
{
|
||||||
|
chart.ChartAreas[0].AxisX.MajorGrid.LineColor = lineColor;
|
||||||
|
chart.ChartAreas[0].AxisY.MajorGrid.LineColor = lineColor;
|
||||||
|
chart.ChartAreas[0].AxisX.MajorGrid.Interval = xInterval;
|
||||||
|
chart.ChartAreas[0].AxisY.MajorGrid.Interval = yInterval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
61
chartTC/chartTC.csproj
Normal file
61
chartTC/chartTC.csproj
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{79FB5F64-9DA8-42BF-B1E5-749AEA345C7E}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>chartTC</RootNamespace>
|
||||||
|
<AssemblyName>chartTC</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="chartTC.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="chartTC.Designer.cs">
|
||||||
|
<DependentUpon>chartTC.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="chartTC.resx">
|
||||||
|
<DependentUpon>chartTC.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
123
chartTC/chartTC.resx
Normal file
123
chartTC/chartTC.resx
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
BIN
easySif安装教程.docx
BIN
easySif安装教程.docx
Binary file not shown.
BIN
ico/EasySif_logo.ico
Normal file
BIN
ico/EasySif_logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
ico/EasySif_logo1.png
Normal file
BIN
ico/EasySif_logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
ico/IRIS LOG.jpg
Normal file
BIN
ico/IRIS LOG.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 661 KiB |
BIN
ico/IRIS LOG2.png
Normal file
BIN
ico/IRIS LOG2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
147
mainProgram/AboutWindows.Designer.cs
generated
Normal file
147
mainProgram/AboutWindows.Designer.cs
generated
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
partial class AboutWindows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutWindows));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("宋体", 20F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label1.Location = new System.Drawing.Point(150, 25);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(117, 27);
|
||||||
|
this.label1.TabIndex = 2;
|
||||||
|
this.label1.Text = "EasySif";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(152, 69);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(77, 14);
|
||||||
|
this.label2.TabIndex = 3;
|
||||||
|
this.label2.Text = "版本:1.13";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label4.Location = new System.Drawing.Point(41, 155);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(336, 14);
|
||||||
|
this.label4.TabIndex = 5;
|
||||||
|
this.label4.Text = "地址:北京市海淀区安宁庄东路18号光华创业园5号楼";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label5.Location = new System.Drawing.Point(41, 186);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(133, 14);
|
||||||
|
this.label5.TabIndex = 6;
|
||||||
|
this.label5.Text = "电话:010-51292601";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label6.Location = new System.Drawing.Point(41, 214);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(203, 14);
|
||||||
|
this.label6.TabIndex = 7;
|
||||||
|
this.label6.Text = "邮箱:hanshanlong@iris-rs.cn";
|
||||||
|
//
|
||||||
|
// pictureBox2
|
||||||
|
//
|
||||||
|
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
|
||||||
|
this.pictureBox2.Location = new System.Drawing.Point(44, 22);
|
||||||
|
this.pictureBox2.Name = "pictureBox2";
|
||||||
|
this.pictureBox2.Size = new System.Drawing.Size(66, 75);
|
||||||
|
this.pictureBox2.TabIndex = 9;
|
||||||
|
this.pictureBox2.TabStop = false;
|
||||||
|
//
|
||||||
|
// linkLabel1
|
||||||
|
//
|
||||||
|
this.linkLabel1.AutoSize = true;
|
||||||
|
this.linkLabel1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.linkLabel1.Location = new System.Drawing.Point(41, 124);
|
||||||
|
this.linkLabel1.Name = "linkLabel1";
|
||||||
|
this.linkLabel1.Size = new System.Drawing.Size(231, 14);
|
||||||
|
this.linkLabel1.TabIndex = 10;
|
||||||
|
this.linkLabel1.TabStop = true;
|
||||||
|
this.linkLabel1.Text = "公司:北京依锐思遥感技术有限公司";
|
||||||
|
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||||
|
//
|
||||||
|
// AboutWindows
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(448, 260);
|
||||||
|
this.Controls.Add(this.linkLabel1);
|
||||||
|
this.Controls.Add(this.pictureBox2);
|
||||||
|
this.Controls.Add(this.label6);
|
||||||
|
this.Controls.Add(this.label5);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "AboutWindows";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "关于EasySif";
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox2;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
mainProgram/AboutWindows.cs
Normal file
26
mainProgram/AboutWindows.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
public partial class AboutWindows : Form
|
||||||
|
{
|
||||||
|
public AboutWindows()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start("http://www.iris-rs.cn/");
|
||||||
|
linkLabel1.LinkVisited = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1316
mainProgram/AboutWindows.resx
Normal file
1316
mainProgram/AboutWindows.resx
Normal file
File diff suppressed because it is too large
Load Diff
7
mainProgram/Form1.Designer.cs
generated
7
mainProgram/Form1.Designer.cs
generated
@ -26,9 +26,14 @@
|
|||||||
private System.Windows.Forms.TextBox PointInfoTextBox;
|
private System.Windows.Forms.TextBox PointInfoTextBox;
|
||||||
private TreeViewTc.TreeViewTc2 treeViewTc21;
|
private TreeViewTc.TreeViewTc2 treeViewTc21;
|
||||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
|
||||||
private System.Windows.Forms.ToolStripMenuItem CloseToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem CloseToolStripMenuItem;
|
||||||
private chartTC.chartTC chartTC1;
|
private chartTC.chartTC chartTC1;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.ToolStripStatusLabel projectPath_toolStripStatusLabel;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem AboutToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem sifAlgorithmAbstractToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,8 @@ namespace mainProgram
|
|||||||
mProjectManager = value;
|
mProjectManager = value;
|
||||||
|
|
||||||
Console.WriteLine("工程文件目录为:" + mProjectManager.ProjectPath + "---------------------");
|
Console.WriteLine("工程文件目录为:" + mProjectManager.ProjectPath + "---------------------");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@ -42,8 +44,11 @@ namespace mainProgram
|
|||||||
//w.Show();//不阻塞
|
//w.Show();//不阻塞
|
||||||
DialogResult tmp = w.ShowDialog();//阻塞
|
DialogResult tmp = w.ShowDialog();//阻塞
|
||||||
|
|
||||||
if(tmp == DialogResult.OK)
|
if (tmp == DialogResult.OK)
|
||||||
|
{
|
||||||
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
||||||
|
SetProjectNameAndProjectPath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
private void OpenProjectToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@ -62,7 +67,7 @@ namespace mainProgram
|
|||||||
|
|
||||||
if (dialogResult == DialogResult.OK)
|
if (dialogResult == DialogResult.OK)
|
||||||
{
|
{
|
||||||
this.Text = this.Text + "-" + getProjectName();
|
SetProjectNameAndProjectPath();
|
||||||
|
|
||||||
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
treeViewTc21.Initialize(mProjectManager.ProjectPath);
|
||||||
}
|
}
|
||||||
@ -77,9 +82,22 @@ namespace mainProgram
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ss()
|
private void SetProjectNameAndProjectPath()
|
||||||
{
|
{
|
||||||
//PrejectTreeView
|
this.Text = this.Text + "-" + getProjectName();
|
||||||
|
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text + mProjectManager.ProjectPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearProjectNameAndProjectPath()
|
||||||
|
{
|
||||||
|
this.Text = this.Text + "-" + getProjectName();
|
||||||
|
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text + mProjectManager.ProjectPath;
|
||||||
|
|
||||||
|
int index = this.Text.IndexOf(getProjectName());
|
||||||
|
this.Text = this.Text.Substring(0, index - 1);//index - 1:还要加上一个字符“-”
|
||||||
|
|
||||||
|
int index2 = this.projectPath_toolStripStatusLabel.Text.IndexOf(mProjectManager.ProjectPath);
|
||||||
|
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text.Substring(0, index2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +136,7 @@ namespace mainProgram
|
|||||||
|
|
||||||
private void main_FormClosing(object sender, FormClosingEventArgs e)
|
private void main_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("确实退出吗", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
if (MessageBox.Show("确认退出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
e.Cancel = false;
|
e.Cancel = false;
|
||||||
}
|
}
|
||||||
@ -136,6 +154,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "svd");
|
SVDWindows w = new SVDWindows(mProjectManager, "svd");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -154,6 +178,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "doas");
|
SVDWindows w = new SVDWindows(mProjectManager, "doas");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -172,6 +202,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "sfm");
|
SVDWindows w = new SVDWindows(mProjectManager, "sfm");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -190,6 +226,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "sfm_gaussian");
|
SVDWindows w = new SVDWindows(mProjectManager, "sfm_gaussian");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -208,6 +250,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "sfld");
|
SVDWindows w = new SVDWindows(mProjectManager, "sfld");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -226,6 +274,12 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProjectManager.GetDateFolderCount() == 0)//当没有做福亮度校正时,2rad文件夹为空,就不能打开算法窗口
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "请先进行预处理-福亮度校正!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SVDWindows w = new SVDWindows(mProjectManager, "3fld");
|
SVDWindows w = new SVDWindows(mProjectManager, "3fld");
|
||||||
//w.TransferEvent += RecieveProjectManager;
|
//w.TransferEvent += RecieveProjectManager;
|
||||||
|
|
||||||
@ -391,6 +445,7 @@ namespace mainProgram
|
|||||||
|
|
||||||
private void main_Load(object sender, EventArgs e)
|
private void main_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
treeViewTc21.DeleteEvent += DeleteFiles;
|
treeViewTc21.DeleteEvent += DeleteFiles;
|
||||||
treeViewTc21.PlotSifEvent += PlotSif;
|
treeViewTc21.PlotSifEvent += PlotSif;
|
||||||
treeViewTc21.SaveAsEvent += SaveAs;
|
treeViewTc21.SaveAsEvent += SaveAs;
|
||||||
@ -398,6 +453,12 @@ namespace mainProgram
|
|||||||
chartTC1.clickPointEvent += ShowPointInfo;
|
chartTC1.clickPointEvent += ShowPointInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//protected override void OnPaint(PaintEventArgs e)
|
||||||
|
//{
|
||||||
|
// //System.Drawing.Color.FromArgb(0, 106, 181)
|
||||||
|
// ControlPaint.DrawBorder(e.Graphics, ClientRectangle, System.Drawing.Color.FromArgb(0, 106, 181), ButtonBorderStyle.Solid);
|
||||||
|
//}
|
||||||
|
|
||||||
public void PlotSifSpectral(string path)
|
public void PlotSifSpectral(string path)
|
||||||
{
|
{
|
||||||
//SpectralDataReaderWriter spectralDataReaderWriter = new SpectralDataReaderWriter(@"D:\Desktop\0sifRawData\rawdata\2021_12_21\beijing_10_53_45.csv");
|
//SpectralDataReaderWriter spectralDataReaderWriter = new SpectralDataReaderWriter(@"D:\Desktop\0sifRawData\rawdata\2021_12_21\beijing_10_53_45.csv");
|
||||||
@ -469,33 +530,40 @@ namespace mainProgram
|
|||||||
this.SfmGaussinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.SfmGaussinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.SfldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.SfldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.Fld3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.Fld3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.AboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.projectPath_toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.treeViewTc21 = new TreeViewTc.TreeViewTc2();
|
this.treeViewTc21 = new TreeViewTc.TreeViewTc2();
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
this.PointInfoTextBox = new System.Windows.Forms.TextBox();
|
this.PointInfoTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.chartTC1 = new chartTC.chartTC();
|
this.chartTC1 = new chartTC.chartTC();
|
||||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
|
this.statusStrip1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
this.splitContainer1.Panel2.SuspendLayout();
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
this.splitContainer1.SuspendLayout();
|
this.splitContainer1.SuspendLayout();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
//
|
//
|
||||||
|
this.menuStrip1.BackColor = System.Drawing.Color.White;
|
||||||
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.fileToolStripMenuItem,
|
this.fileToolStripMenuItem,
|
||||||
this.preprocessToolStripMenuItem,
|
this.preprocessToolStripMenuItem,
|
||||||
this.sifComputeToolStripMenuItem});
|
this.sifComputeToolStripMenuItem,
|
||||||
|
this.帮助ToolStripMenuItem});
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
this.menuStrip1.Size = new System.Drawing.Size(1420, 25);
|
this.menuStrip1.Size = new System.Drawing.Size(1176, 25);
|
||||||
this.menuStrip1.TabIndex = 0;
|
this.menuStrip1.TabIndex = 0;
|
||||||
this.menuStrip1.Text = "menuStrip1";
|
this.menuStrip1.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
@ -608,60 +676,127 @@ namespace mainProgram
|
|||||||
this.Fld3ToolStripMenuItem.Text = "3Fld";
|
this.Fld3ToolStripMenuItem.Text = "3Fld";
|
||||||
this.Fld3ToolStripMenuItem.Click += new System.EventHandler(this.Fld3ToolStripMenuItem_Click);
|
this.Fld3ToolStripMenuItem.Click += new System.EventHandler(this.Fld3ToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// 帮助ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem,
|
||||||
|
this.AboutToolStripMenuItem});
|
||||||
|
this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
|
||||||
|
this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
|
||||||
|
this.帮助ToolStripMenuItem.Text = "帮助";
|
||||||
|
//
|
||||||
|
// sifAlgorithmAbstractToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem.Name = "sifAlgorithmAbstractToolStripMenuItem";
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem.Text = "Sif算法简介";
|
||||||
|
this.sifAlgorithmAbstractToolStripMenuItem.Click += new System.EventHandler(this.sifAlgorithmAbstractToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// AboutToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.AboutToolStripMenuItem.Name = "AboutToolStripMenuItem";
|
||||||
|
this.AboutToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.AboutToolStripMenuItem.Text = "关于";
|
||||||
|
this.AboutToolStripMenuItem.Click += new System.EventHandler(this.AboutToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// statusStrip1
|
// statusStrip1
|
||||||
//
|
//
|
||||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.statusStrip1.Location = new System.Drawing.Point(0, 1040);
|
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.projectPath_toolStripStatusLabel});
|
||||||
|
this.statusStrip1.Location = new System.Drawing.Point(0, 778);
|
||||||
this.statusStrip1.Name = "statusStrip1";
|
this.statusStrip1.Name = "statusStrip1";
|
||||||
this.statusStrip1.Size = new System.Drawing.Size(1420, 22);
|
this.statusStrip1.Size = new System.Drawing.Size(1176, 22);
|
||||||
this.statusStrip1.TabIndex = 1;
|
this.statusStrip1.TabIndex = 1;
|
||||||
this.statusStrip1.Text = "statusStrip1";
|
this.statusStrip1.Text = "statusStrip1";
|
||||||
//
|
//
|
||||||
|
// projectPath_toolStripStatusLabel
|
||||||
|
//
|
||||||
|
this.projectPath_toolStripStatusLabel.Name = "projectPath_toolStripStatusLabel";
|
||||||
|
this.projectPath_toolStripStatusLabel.Size = new System.Drawing.Size(68, 17);
|
||||||
|
this.projectPath_toolStripStatusLabel.Text = "工程路径:";
|
||||||
|
//
|
||||||
// splitContainer1
|
// splitContainer1
|
||||||
//
|
//
|
||||||
|
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.splitContainer1.Location = new System.Drawing.Point(0, 52);
|
this.splitContainer1.Location = new System.Drawing.Point(0, 50);
|
||||||
this.splitContainer1.Name = "splitContainer1";
|
this.splitContainer1.Name = "splitContainer1";
|
||||||
//
|
//
|
||||||
// splitContainer1.Panel1
|
// splitContainer1.Panel1
|
||||||
//
|
//
|
||||||
this.splitContainer1.Panel1.Controls.Add(this.panel1);
|
this.splitContainer1.Panel1.Controls.Add(this.panel1);
|
||||||
|
this.splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
//
|
//
|
||||||
// splitContainer1.Panel2
|
// splitContainer1.Panel2
|
||||||
//
|
//
|
||||||
this.splitContainer1.Panel2.Controls.Add(this.chartTC1);
|
this.splitContainer1.Panel2.Controls.Add(this.chartTC1);
|
||||||
this.splitContainer1.Size = new System.Drawing.Size(1420, 988);
|
this.splitContainer1.Panel2.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.splitContainer1.SplitterDistance = 269;
|
this.splitContainer1.Size = new System.Drawing.Size(1176, 728);
|
||||||
|
this.splitContainer1.SplitterDistance = 231;
|
||||||
this.splitContainer1.TabIndex = 6;
|
this.splitContainer1.TabIndex = 6;
|
||||||
//
|
//
|
||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
this.panel1.Controls.Add(this.treeViewTc21);
|
this.panel1.Controls.Add(this.treeViewTc21);
|
||||||
|
this.panel1.Controls.Add(this.button1);
|
||||||
|
this.panel1.Controls.Add(this.button2);
|
||||||
this.panel1.Controls.Add(this.PointInfoTextBox);
|
this.panel1.Controls.Add(this.PointInfoTextBox);
|
||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(269, 988);
|
this.panel1.Size = new System.Drawing.Size(227, 724);
|
||||||
this.panel1.TabIndex = 6;
|
this.panel1.TabIndex = 6;
|
||||||
//
|
//
|
||||||
// treeViewTc21
|
// treeViewTc21
|
||||||
//
|
//
|
||||||
this.treeViewTc21.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.treeViewTc21.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.treeViewTc21.Location = new System.Drawing.Point(0, 0);
|
this.treeViewTc21.Location = new System.Drawing.Point(0, 23);
|
||||||
this.treeViewTc21.Margin = new System.Windows.Forms.Padding(4);
|
this.treeViewTc21.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.treeViewTc21.Name = "treeViewTc21";
|
this.treeViewTc21.Name = "treeViewTc21";
|
||||||
this.treeViewTc21.Size = new System.Drawing.Size(269, 731);
|
this.treeViewTc21.Size = new System.Drawing.Size(227, 421);
|
||||||
this.treeViewTc21.TabIndex = 6;
|
this.treeViewTc21.TabIndex = 6;
|
||||||
this.treeViewTc21.Load += new System.EventHandler(this.treeViewTc21_Load);
|
this.treeViewTc21.Load += new System.EventHandler(this.treeViewTc21_Load);
|
||||||
//
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.button1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||||
|
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.button1.Enabled = false;
|
||||||
|
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||||
|
this.button1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(227, 23);
|
||||||
|
this.button1.TabIndex = 7;
|
||||||
|
this.button1.Text = "工程";
|
||||||
|
this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.button1.UseVisualStyleBackColor = false;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.button2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.button2.Enabled = false;
|
||||||
|
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||||
|
this.button2.Location = new System.Drawing.Point(0, 444);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(227, 23);
|
||||||
|
this.button2.TabIndex = 8;
|
||||||
|
this.button2.Text = "信息";
|
||||||
|
this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
this.button2.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
// PointInfoTextBox
|
// PointInfoTextBox
|
||||||
//
|
//
|
||||||
|
this.PointInfoTextBox.BackColor = System.Drawing.Color.White;
|
||||||
this.PointInfoTextBox.Dock = System.Windows.Forms.DockStyle.Bottom;
|
this.PointInfoTextBox.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
this.PointInfoTextBox.Location = new System.Drawing.Point(0, 731);
|
this.PointInfoTextBox.Location = new System.Drawing.Point(0, 467);
|
||||||
this.PointInfoTextBox.Multiline = true;
|
this.PointInfoTextBox.Multiline = true;
|
||||||
this.PointInfoTextBox.Name = "PointInfoTextBox";
|
this.PointInfoTextBox.Name = "PointInfoTextBox";
|
||||||
this.PointInfoTextBox.ReadOnly = true;
|
this.PointInfoTextBox.ReadOnly = true;
|
||||||
this.PointInfoTextBox.Size = new System.Drawing.Size(269, 257);
|
this.PointInfoTextBox.Size = new System.Drawing.Size(227, 257);
|
||||||
this.PointInfoTextBox.TabIndex = 5;
|
this.PointInfoTextBox.TabIndex = 5;
|
||||||
//
|
//
|
||||||
// chartTC1
|
// chartTC1
|
||||||
@ -669,56 +804,50 @@ namespace mainProgram
|
|||||||
this.chartTC1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.chartTC1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.chartTC1.Location = new System.Drawing.Point(0, 0);
|
this.chartTC1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.chartTC1.Name = "chartTC1";
|
this.chartTC1.Name = "chartTC1";
|
||||||
this.chartTC1.Size = new System.Drawing.Size(1147, 988);
|
this.chartTC1.Size = new System.Drawing.Size(937, 724);
|
||||||
this.chartTC1.TabIndex = 3;
|
this.chartTC1.TabIndex = 3;
|
||||||
this.chartTC1.Load += new System.EventHandler(this.chartTC1_Load);
|
this.chartTC1.Load += new System.EventHandler(this.chartTC1_Load);
|
||||||
//
|
//
|
||||||
// toolStrip1
|
// toolStrip1
|
||||||
//
|
//
|
||||||
|
this.toolStrip1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
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.Location = new System.Drawing.Point(0, 25);
|
||||||
this.toolStrip1.Name = "toolStrip1";
|
this.toolStrip1.Name = "toolStrip1";
|
||||||
this.toolStrip1.Size = new System.Drawing.Size(1420, 27);
|
this.toolStrip1.Size = new System.Drawing.Size(1176, 25);
|
||||||
this.toolStrip1.TabIndex = 7;
|
this.toolStrip1.TabIndex = 7;
|
||||||
this.toolStrip1.Text = "toolStrip1";
|
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
|
// main
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1420, 1062);
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(1176, 800);
|
||||||
this.Controls.Add(this.splitContainer1);
|
this.Controls.Add(this.splitContainer1);
|
||||||
this.Controls.Add(this.toolStrip1);
|
this.Controls.Add(this.toolStrip1);
|
||||||
this.Controls.Add(this.statusStrip1);
|
this.Controls.Add(this.statusStrip1);
|
||||||
this.Controls.Add(this.menuStrip1);
|
this.Controls.Add(this.menuStrip1);
|
||||||
|
this.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MainMenuStrip = this.menuStrip1;
|
this.MainMenuStrip = this.menuStrip1;
|
||||||
this.Name = "main";
|
this.Name = "main";
|
||||||
|
this.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "easySif";
|
this.Text = "EasySif";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.main_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.main_FormClosing);
|
||||||
this.Load += new System.EventHandler(this.main_Load);
|
this.Load += new System.EventHandler(this.main_Load);
|
||||||
this.menuStrip1.ResumeLayout(false);
|
this.menuStrip1.ResumeLayout(false);
|
||||||
this.menuStrip1.PerformLayout();
|
this.menuStrip1.PerformLayout();
|
||||||
|
this.statusStrip1.ResumeLayout(false);
|
||||||
|
this.statusStrip1.PerformLayout();
|
||||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||||
this.splitContainer1.ResumeLayout(false);
|
this.splitContainer1.ResumeLayout(false);
|
||||||
this.panel1.ResumeLayout(false);
|
this.panel1.ResumeLayout(false);
|
||||||
this.panel1.PerformLayout();
|
this.panel1.PerformLayout();
|
||||||
this.toolStrip1.ResumeLayout(false);
|
|
||||||
this.toolStrip1.PerformLayout();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@ -744,11 +873,11 @@ namespace mainProgram
|
|||||||
if (mProjectManager == null)
|
if (mProjectManager == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int index = this.Text.IndexOf(getProjectName());
|
ClearProjectNameAndProjectPath();
|
||||||
this.Text = this.Text.Substring(0, index - 1);//index - 1:还要加上一个字符“-”
|
|
||||||
|
|
||||||
mProjectManager = null;
|
mProjectManager = null;
|
||||||
GC.Collect();
|
GC.Collect();
|
||||||
|
|
||||||
treeViewTc21.clearAll();
|
treeViewTc21.clearAll();
|
||||||
chartTC1.chart1.Series.Clear();
|
chartTC1.chart1.Series.Clear();
|
||||||
PointInfoTextBox.Clear();
|
PointInfoTextBox.Clear();
|
||||||
@ -758,6 +887,26 @@ namespace mainProgram
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//C#调用默认浏览器打开网页的几种方法:https://blog.csdn.net/testcs_dn/article/details/42246969
|
||||||
|
private void sifAlgorithmAbstractToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start("https://mp.weixin.qq.com/s/L89CdJcSs2dADxQMztv2nw");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AboutWindows w = new AboutWindows();
|
||||||
|
//Form2 w = new Form2();
|
||||||
|
|
||||||
|
//w.Show();//不阻塞
|
||||||
|
DialogResult tmp = w.ShowDialog();//阻塞
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
46
mainProgram/Form2.Designer.cs
generated
Normal file
46
mainProgram/Form2.Designer.cs
generated
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
partial class Form2
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// Form2
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Name = "Form2";
|
||||||
|
this.Text = "Form2";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
20
mainProgram/Form2.cs
Normal file
20
mainProgram/Form2.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
public partial class Form2 : Form
|
||||||
|
{
|
||||||
|
public Form2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
mainProgram/Form2.resx
Normal file
120
mainProgram/Form2.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
58
mainProgram/NewProjectWindow.Designer.cs
generated
58
mainProgram/NewProjectWindow.Designer.cs
generated
@ -45,7 +45,7 @@
|
|||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(36, 41);
|
this.label1.Location = new System.Drawing.Point(25, 30);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||||
this.label1.TabIndex = 0;
|
this.label1.TabIndex = 0;
|
||||||
@ -53,7 +53,8 @@
|
|||||||
//
|
//
|
||||||
// ProjectPathTextBox
|
// ProjectPathTextBox
|
||||||
//
|
//
|
||||||
this.ProjectPathTextBox.Location = new System.Drawing.Point(115, 37);
|
this.ProjectPathTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ProjectPathTextBox.Location = new System.Drawing.Point(104, 26);
|
||||||
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
|
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
|
||||||
this.ProjectPathTextBox.ReadOnly = true;
|
this.ProjectPathTextBox.ReadOnly = true;
|
||||||
this.ProjectPathTextBox.Size = new System.Drawing.Size(205, 21);
|
this.ProjectPathTextBox.Size = new System.Drawing.Size(205, 21);
|
||||||
@ -62,7 +63,7 @@
|
|||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(36, 154);
|
this.label2.Location = new System.Drawing.Point(25, 143);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(53, 12);
|
this.label2.Size = new System.Drawing.Size(53, 12);
|
||||||
this.label2.TabIndex = 2;
|
this.label2.TabIndex = 2;
|
||||||
@ -70,27 +71,32 @@
|
|||||||
//
|
//
|
||||||
// CreateProjectBtn
|
// CreateProjectBtn
|
||||||
//
|
//
|
||||||
this.CreateProjectBtn.Location = new System.Drawing.Point(96, 217);
|
this.CreateProjectBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CreateProjectBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.CreateProjectBtn.Location = new System.Drawing.Point(234, 206);
|
||||||
this.CreateProjectBtn.Name = "CreateProjectBtn";
|
this.CreateProjectBtn.Name = "CreateProjectBtn";
|
||||||
this.CreateProjectBtn.Size = new System.Drawing.Size(75, 23);
|
this.CreateProjectBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.CreateProjectBtn.TabIndex = 3;
|
this.CreateProjectBtn.TabIndex = 3;
|
||||||
this.CreateProjectBtn.Text = "创建工程";
|
this.CreateProjectBtn.Text = "创建";
|
||||||
this.CreateProjectBtn.UseVisualStyleBackColor = true;
|
this.CreateProjectBtn.UseVisualStyleBackColor = false;
|
||||||
this.CreateProjectBtn.Click += new System.EventHandler(this.CreateProjectBtn_Click);
|
this.CreateProjectBtn.Click += new System.EventHandler(this.CreateProjectBtn_Click);
|
||||||
//
|
//
|
||||||
// Cancel
|
// Cancel
|
||||||
//
|
//
|
||||||
this.Cancel.Location = new System.Drawing.Point(314, 217);
|
this.Cancel.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.Cancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.Cancel.Location = new System.Drawing.Point(324, 206);
|
||||||
this.Cancel.Name = "Cancel";
|
this.Cancel.Name = "Cancel";
|
||||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.Cancel.TabIndex = 4;
|
this.Cancel.TabIndex = 4;
|
||||||
this.Cancel.Text = "取消";
|
this.Cancel.Text = "取消";
|
||||||
this.Cancel.UseVisualStyleBackColor = true;
|
this.Cancel.UseVisualStyleBackColor = false;
|
||||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
||||||
//
|
//
|
||||||
// DataPathTextBox
|
// DataPathTextBox
|
||||||
//
|
//
|
||||||
this.DataPathTextBox.Location = new System.Drawing.Point(115, 150);
|
this.DataPathTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.DataPathTextBox.Location = new System.Drawing.Point(104, 139);
|
||||||
this.DataPathTextBox.Name = "DataPathTextBox";
|
this.DataPathTextBox.Name = "DataPathTextBox";
|
||||||
this.DataPathTextBox.ReadOnly = true;
|
this.DataPathTextBox.ReadOnly = true;
|
||||||
this.DataPathTextBox.Size = new System.Drawing.Size(205, 21);
|
this.DataPathTextBox.Size = new System.Drawing.Size(205, 21);
|
||||||
@ -98,27 +104,32 @@
|
|||||||
//
|
//
|
||||||
// SelectDataPathBtn
|
// SelectDataPathBtn
|
||||||
//
|
//
|
||||||
this.SelectDataPathBtn.Location = new System.Drawing.Point(374, 149);
|
this.SelectDataPathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.SelectDataPathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.SelectDataPathBtn.Location = new System.Drawing.Point(324, 137);
|
||||||
this.SelectDataPathBtn.Name = "SelectDataPathBtn";
|
this.SelectDataPathBtn.Name = "SelectDataPathBtn";
|
||||||
this.SelectDataPathBtn.Size = new System.Drawing.Size(75, 23);
|
this.SelectDataPathBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.SelectDataPathBtn.TabIndex = 4;
|
this.SelectDataPathBtn.TabIndex = 4;
|
||||||
this.SelectDataPathBtn.Text = "选择";
|
this.SelectDataPathBtn.Text = "浏览...";
|
||||||
this.SelectDataPathBtn.UseVisualStyleBackColor = true;
|
this.SelectDataPathBtn.UseVisualStyleBackColor = false;
|
||||||
this.SelectDataPathBtn.Click += new System.EventHandler(this.SelectDataPathBtn_Click);
|
this.SelectDataPathBtn.Click += new System.EventHandler(this.SelectDataPathBtn_Click);
|
||||||
//
|
//
|
||||||
// SelectProjectPathBtn
|
// SelectProjectPathBtn
|
||||||
//
|
//
|
||||||
this.SelectProjectPathBtn.Location = new System.Drawing.Point(374, 36);
|
this.SelectProjectPathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.SelectProjectPathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.SelectProjectPathBtn.Location = new System.Drawing.Point(324, 24);
|
||||||
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
|
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
|
||||||
this.SelectProjectPathBtn.Size = new System.Drawing.Size(75, 23);
|
this.SelectProjectPathBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.SelectProjectPathBtn.TabIndex = 5;
|
this.SelectProjectPathBtn.TabIndex = 5;
|
||||||
this.SelectProjectPathBtn.Text = "选择";
|
this.SelectProjectPathBtn.Text = "浏览...";
|
||||||
this.SelectProjectPathBtn.UseVisualStyleBackColor = true;
|
this.SelectProjectPathBtn.UseVisualStyleBackColor = false;
|
||||||
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
|
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
|
||||||
//
|
//
|
||||||
// CalFilePathTextBox
|
// CalFilePathTextBox
|
||||||
//
|
//
|
||||||
this.CalFilePathTextBox.Location = new System.Drawing.Point(115, 91);
|
this.CalFilePathTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CalFilePathTextBox.Location = new System.Drawing.Point(104, 80);
|
||||||
this.CalFilePathTextBox.Name = "CalFilePathTextBox";
|
this.CalFilePathTextBox.Name = "CalFilePathTextBox";
|
||||||
this.CalFilePathTextBox.ReadOnly = true;
|
this.CalFilePathTextBox.ReadOnly = true;
|
||||||
this.CalFilePathTextBox.Size = new System.Drawing.Size(205, 21);
|
this.CalFilePathTextBox.Size = new System.Drawing.Size(205, 21);
|
||||||
@ -126,18 +137,20 @@
|
|||||||
//
|
//
|
||||||
// SelectCalFilePathBtn
|
// SelectCalFilePathBtn
|
||||||
//
|
//
|
||||||
this.SelectCalFilePathBtn.Location = new System.Drawing.Point(374, 90);
|
this.SelectCalFilePathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.SelectCalFilePathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.SelectCalFilePathBtn.Location = new System.Drawing.Point(324, 78);
|
||||||
this.SelectCalFilePathBtn.Name = "SelectCalFilePathBtn";
|
this.SelectCalFilePathBtn.Name = "SelectCalFilePathBtn";
|
||||||
this.SelectCalFilePathBtn.Size = new System.Drawing.Size(75, 23);
|
this.SelectCalFilePathBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.SelectCalFilePathBtn.TabIndex = 8;
|
this.SelectCalFilePathBtn.TabIndex = 8;
|
||||||
this.SelectCalFilePathBtn.Text = "选择";
|
this.SelectCalFilePathBtn.Text = "浏览...";
|
||||||
this.SelectCalFilePathBtn.UseVisualStyleBackColor = true;
|
this.SelectCalFilePathBtn.UseVisualStyleBackColor = false;
|
||||||
this.SelectCalFilePathBtn.Click += new System.EventHandler(this.SelectCalFilePathBtn_Click);
|
this.SelectCalFilePathBtn.Click += new System.EventHandler(this.SelectCalFilePathBtn_Click);
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
this.label3.AutoSize = true;
|
||||||
this.label3.Location = new System.Drawing.Point(36, 95);
|
this.label3.Location = new System.Drawing.Point(25, 84);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(53, 12);
|
this.label3.Size = new System.Drawing.Size(53, 12);
|
||||||
this.label3.TabIndex = 9;
|
this.label3.TabIndex = 9;
|
||||||
@ -147,7 +160,8 @@
|
|||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(490, 271);
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(429, 249);
|
||||||
this.Controls.Add(this.label3);
|
this.Controls.Add(this.label3);
|
||||||
this.Controls.Add(this.SelectCalFilePathBtn);
|
this.Controls.Add(this.SelectCalFilePathBtn);
|
||||||
this.Controls.Add(this.CalFilePathTextBox);
|
this.Controls.Add(this.CalFilePathTextBox);
|
||||||
@ -163,7 +177,7 @@
|
|||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "NewProjectWindow";
|
this.Name = "NewProjectWindow";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "创建工程";
|
this.Text = "创建工程";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|||||||
@ -50,15 +50,42 @@ namespace mainProgram
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectManager projectManager = new ProjectManager(projectPath);
|
//做判断:
|
||||||
projectManager.CreateProject(calFilePath, dataPath);
|
DialogResult re = MessageBox.Show("删除工程路径下所有内容?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
|
||||||
|
if (re == DialogResult.Cancel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建工程
|
||||||
|
ProjectManager projectManager = new ProjectManager(projectPath);
|
||||||
|
int value = projectManager.CreateProject(calFilePath, dataPath);
|
||||||
|
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
TransferEvent(projectManager);//触发事件
|
TransferEvent(projectManager);//触发事件
|
||||||
|
|
||||||
MessageBox.Show(this, "工程创建成功!", "提示");
|
MessageBox.Show(this, "工程创建成功!", "提示");
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
Close();//创建工程完成后,关闭窗口
|
Close();//创建工程完成后,关闭窗口
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
MessageBox.Show(this, "定标文件夹有错!", "提示");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
MessageBox.Show(this, "数据文件夹有错!", "提示");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
MessageBox.Show(this, "工程路径有错!", "提示");
|
||||||
|
break;
|
||||||
|
default: /* 可选的 */
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectDataPathBtn_Click(object sender, EventArgs e)
|
private void SelectDataPathBtn_Click(object sender, EventArgs e)
|
||||||
@ -81,19 +108,32 @@ namespace mainProgram
|
|||||||
|
|
||||||
private void SelectProjectPathBtn_Click(object sender, EventArgs e)
|
private void SelectProjectPathBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog dialog = new FolderBrowserDialog();
|
//FolderBrowserDialog dialog = new FolderBrowserDialog();
|
||||||
dialog.Description = "请选择工程文件夹";
|
//dialog.Description = "请选择工程文件夹";
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
//if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
//{
|
||||||
if (string.IsNullOrEmpty(dialog.SelectedPath))
|
// if (string.IsNullOrEmpty(dialog.SelectedPath))
|
||||||
{
|
// {
|
||||||
MessageBox.Show(this, "文件夹路径不能为空", "提示");
|
// MessageBox.Show(this, "文件夹路径不能为空", "提示");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
string savePath = dialog.SelectedPath;
|
// string savePath = dialog.SelectedPath;
|
||||||
ProjectPathTextBox.Text = savePath;
|
// ProjectPathTextBox.Text = savePath;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
OpenFileDialog dialog = new OpenFileDialog();
|
||||||
|
dialog.CheckFileExists = false; //设置不弹出警告
|
||||||
|
//dialog.Multiselect = true;//该值确定是否可以选择多个文件
|
||||||
|
dialog.Title = "请输入工程名";
|
||||||
|
dialog.Filter = "所有文件(*.*)|*.*";
|
||||||
|
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||||
|
{
|
||||||
|
string filePath = dialog.FileName;
|
||||||
|
filePath = filePath + ".EasySif";
|
||||||
|
ProjectPathTextBox.Text = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cancel_Click(object sender, EventArgs e)
|
private void Cancel_Click(object sender, EventArgs e)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
30
mainProgram/OpenProjectWindow.Designer.cs
generated
30
mainProgram/OpenProjectWindow.Designer.cs
generated
@ -38,7 +38,8 @@
|
|||||||
//
|
//
|
||||||
// ProjectPathTextBox
|
// ProjectPathTextBox
|
||||||
//
|
//
|
||||||
this.ProjectPathTextBox.Location = new System.Drawing.Point(135, 38);
|
this.ProjectPathTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ProjectPathTextBox.Location = new System.Drawing.Point(111, 28);
|
||||||
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
|
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
|
||||||
this.ProjectPathTextBox.ReadOnly = true;
|
this.ProjectPathTextBox.ReadOnly = true;
|
||||||
this.ProjectPathTextBox.Size = new System.Drawing.Size(162, 21);
|
this.ProjectPathTextBox.Size = new System.Drawing.Size(162, 21);
|
||||||
@ -46,18 +47,20 @@
|
|||||||
//
|
//
|
||||||
// OpenProjectPathBtn
|
// OpenProjectPathBtn
|
||||||
//
|
//
|
||||||
this.OpenProjectPathBtn.Location = new System.Drawing.Point(49, 118);
|
this.OpenProjectPathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.OpenProjectPathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.OpenProjectPathBtn.Location = new System.Drawing.Point(190, 90);
|
||||||
this.OpenProjectPathBtn.Name = "OpenProjectPathBtn";
|
this.OpenProjectPathBtn.Name = "OpenProjectPathBtn";
|
||||||
this.OpenProjectPathBtn.Size = new System.Drawing.Size(83, 23);
|
this.OpenProjectPathBtn.Size = new System.Drawing.Size(83, 23);
|
||||||
this.OpenProjectPathBtn.TabIndex = 2;
|
this.OpenProjectPathBtn.TabIndex = 2;
|
||||||
this.OpenProjectPathBtn.Text = "打开工程";
|
this.OpenProjectPathBtn.Text = "打开工程";
|
||||||
this.OpenProjectPathBtn.UseVisualStyleBackColor = true;
|
this.OpenProjectPathBtn.UseVisualStyleBackColor = false;
|
||||||
this.OpenProjectPathBtn.Click += new System.EventHandler(this.OpenProjectPathBtn_Click);
|
this.OpenProjectPathBtn.Click += new System.EventHandler(this.OpenProjectPathBtn_Click);
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(47, 38);
|
this.label1.Location = new System.Drawing.Point(32, 32);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||||
this.label1.TabIndex = 3;
|
this.label1.TabIndex = 3;
|
||||||
@ -65,29 +68,34 @@
|
|||||||
//
|
//
|
||||||
// SelectProjectPathBtn
|
// SelectProjectPathBtn
|
||||||
//
|
//
|
||||||
this.SelectProjectPathBtn.Location = new System.Drawing.Point(351, 38);
|
this.SelectProjectPathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.SelectProjectPathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.SelectProjectPathBtn.Location = new System.Drawing.Point(295, 27);
|
||||||
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
|
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
|
||||||
this.SelectProjectPathBtn.Size = new System.Drawing.Size(83, 23);
|
this.SelectProjectPathBtn.Size = new System.Drawing.Size(83, 23);
|
||||||
this.SelectProjectPathBtn.TabIndex = 4;
|
this.SelectProjectPathBtn.TabIndex = 4;
|
||||||
this.SelectProjectPathBtn.Text = "选择";
|
this.SelectProjectPathBtn.Text = "浏览...";
|
||||||
this.SelectProjectPathBtn.UseVisualStyleBackColor = true;
|
this.SelectProjectPathBtn.UseVisualStyleBackColor = false;
|
||||||
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
|
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
|
||||||
//
|
//
|
||||||
// CancelBtn
|
// CancelBtn
|
||||||
//
|
//
|
||||||
this.CancelBtn.Location = new System.Drawing.Point(351, 118);
|
this.CancelBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.CancelBtn.Location = new System.Drawing.Point(295, 90);
|
||||||
this.CancelBtn.Name = "CancelBtn";
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
this.CancelBtn.Size = new System.Drawing.Size(83, 23);
|
this.CancelBtn.Size = new System.Drawing.Size(83, 23);
|
||||||
this.CancelBtn.TabIndex = 5;
|
this.CancelBtn.TabIndex = 5;
|
||||||
this.CancelBtn.Text = "取消";
|
this.CancelBtn.Text = "取消";
|
||||||
this.CancelBtn.UseVisualStyleBackColor = true;
|
this.CancelBtn.UseVisualStyleBackColor = false;
|
||||||
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
//
|
//
|
||||||
// OpenProjectWindow
|
// OpenProjectWindow
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(485, 191);
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(416, 141);
|
||||||
this.Controls.Add(this.CancelBtn);
|
this.Controls.Add(this.CancelBtn);
|
||||||
this.Controls.Add(this.SelectProjectPathBtn);
|
this.Controls.Add(this.SelectProjectPathBtn);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
@ -97,7 +105,7 @@
|
|||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "OpenProjectWindow";
|
this.Name = "OpenProjectWindow";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "打开工程";
|
this.Text = "打开工程";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|||||||
@ -19,32 +19,44 @@ namespace mainProgram
|
|||||||
|
|
||||||
private void SelectProjectPathBtn_Click(object sender, EventArgs e)
|
private void SelectProjectPathBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog dialog = new FolderBrowserDialog();
|
//FolderBrowserDialog dialog = new FolderBrowserDialog();
|
||||||
dialog.Description = "请选择工程文件夹";
|
//dialog.Description = "请选择工程文件";
|
||||||
|
//if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
|
//{
|
||||||
|
// if (string.IsNullOrEmpty(dialog.SelectedPath))
|
||||||
|
// {
|
||||||
|
// MessageBox.Show(this, "文件夹路径不能为空", "提示");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// string savePath = dialog.SelectedPath;
|
||||||
|
// ProjectPathTextBox.Text = savePath;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OpenFileDialog dialog = new OpenFileDialog();
|
||||||
|
//dialog.CheckFileExists = false; //设置不弹出警告
|
||||||
|
//dialog.Multiselect = true;//该值确定是否可以选择多个文件
|
||||||
|
dialog.Title = "请选择工程文件";
|
||||||
|
dialog.Filter = "工程文件(*.EasySif)|*.EasySif";
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(dialog.SelectedPath))
|
string filePath = dialog.FileName;
|
||||||
{
|
ProjectPathTextBox.Text = filePath;
|
||||||
MessageBox.Show(this, "文件夹路径不能为空", "提示");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
string savePath = dialog.SelectedPath;
|
|
||||||
ProjectPathTextBox.Text = savePath;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public event transferProjectManagerDelegate TransferEvent;//申明事件
|
public event transferProjectManagerDelegate TransferEvent;//申明事件
|
||||||
private void OpenProjectPathBtn_Click(object sender, EventArgs e)
|
private void OpenProjectPathBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string projectPath = ProjectPathTextBox.Text;
|
string projectFile = ProjectPathTextBox.Text;
|
||||||
if (projectPath != null && projectPath.Length == 0)
|
if (projectFile != null && projectFile.Length == 0)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "工程路径不能为空", "提示");
|
MessageBox.Show(this, "工程路径不能为空", "提示");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectManager projectManager = new ProjectManager(projectPath);
|
ProjectManager projectManager = new ProjectManager(projectFile);
|
||||||
|
|
||||||
if(projectManager.OpenProject())
|
if(projectManager.OpenProject())
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -172,9 +172,13 @@ namespace mainProgram
|
|||||||
{
|
{
|
||||||
public ProjectManager(string xx)
|
public ProjectManager(string xx)
|
||||||
{
|
{
|
||||||
mProjectPath = xx;
|
string sourceFileName = Path.GetFileName(xx);//获取文件名
|
||||||
|
mProjectFile = xx;
|
||||||
|
mProjectPath = Path.GetDirectoryName(xx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string mProjectFile;
|
||||||
|
|
||||||
private string mProjectPath;
|
private string mProjectPath;
|
||||||
private string mMetadataPath;
|
private string mMetadataPath;
|
||||||
private string mRawPath;
|
private string mRawPath;
|
||||||
@ -241,18 +245,37 @@ namespace mainProgram
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateProject(string calFilePath, string dataPath)
|
//返回值:0:代表成功;1:代表定标文件夹有错误;2:代表数据文件夹有错误;3:代表工程路径有错误;
|
||||||
|
public int CreateProject(string calFilePath, string dataPath)
|
||||||
{
|
{
|
||||||
if (mProjectPath.Length == 0)
|
if (mProjectPath.Length == 0)
|
||||||
{
|
{
|
||||||
return;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
DelectDir(mProjectPath);//删除工程路径下的所有内容
|
DelectDir(mProjectPath);//删除工程路径下的所有内容
|
||||||
CreateProjectStructure();
|
|
||||||
CopyCalFiles2Project(calFilePath);//复制定标文件到工程结构对应文件夹
|
|
||||||
CopyFiles2Project(dataPath);//复制原始数据文件到工程结构对应文件夹
|
|
||||||
|
|
||||||
|
CreateProjectStructure();
|
||||||
|
|
||||||
|
bool re1 = CopyCalFiles2Project(calFilePath);//复制定标文件到工程结构对应文件夹
|
||||||
|
if (!re1)
|
||||||
|
{
|
||||||
|
DelectDir(mProjectPath);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
mCsvFileCount = 0;//类的变量
|
||||||
|
bool re2 = CopyFiles2Project(dataPath, ref mCsvFileCount);//复制原始数据文件到工程结构对应文件夹
|
||||||
|
if (!re2)
|
||||||
|
{
|
||||||
|
DelectDir(mProjectPath);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//将文件个数写入到可执行文件所在目录 → 打开工程时需要读取
|
||||||
|
BinaryWriter bw = new BinaryWriter(new FileStream(mProjectFile, FileMode.Create));//Path.Combine(mMetadataPath, "CsvFileCount.dat")
|
||||||
|
bw.Write(mCsvFileCount);
|
||||||
|
bw.Close();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -269,7 +292,7 @@ namespace mainProgram
|
|||||||
////删除指定节点信息
|
////删除指定节点信息
|
||||||
//DeleteXmlInformation(myXMLFilePath);
|
//DeleteXmlInformation(myXMLFilePath);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool OpenProject()
|
public bool OpenProject()
|
||||||
@ -285,7 +308,7 @@ namespace mainProgram
|
|||||||
|
|
||||||
if (Directory.Exists(mMetadataPath) & Directory.Exists(mRawPath) & Directory.Exists(mRadPath) & Directory.Exists(mSifPath))
|
if (Directory.Exists(mMetadataPath) & Directory.Exists(mRawPath) & Directory.Exists(mRadPath) & Directory.Exists(mSifPath))
|
||||||
{
|
{
|
||||||
BinaryReader br = new BinaryReader(new FileStream(Path.Combine(mMetadataPath, "CsvFileCount.dat"), FileMode.Open));
|
BinaryReader br = new BinaryReader(new FileStream(mProjectFile, FileMode.Open));
|
||||||
mCsvFileCount = br.ReadInt32();
|
mCsvFileCount = br.ReadInt32();
|
||||||
br.Close();
|
br.Close();
|
||||||
|
|
||||||
@ -502,22 +525,23 @@ namespace mainProgram
|
|||||||
}
|
}
|
||||||
|
|
||||||
//文件复制实现:https://www.cnblogs.com/sun-shadow/p/7553556.html
|
//文件复制实现:https://www.cnblogs.com/sun-shadow/p/7553556.html
|
||||||
public void CopyFiles2Project(string sourceFolderName)//
|
public bool CopyFiles2Project(string sourceFolderName, ref int fileCounter)//
|
||||||
{
|
{
|
||||||
if (Directory.Exists(mRawPath))
|
if (Directory.Exists(mRawPath))
|
||||||
{
|
{
|
||||||
DelectDir(mRawPath);
|
DelectDir(mRawPath);
|
||||||
}
|
}
|
||||||
mCsvFileCount = 0;
|
|
||||||
CopySubFun(sourceFolderName, mRawPath, true);//因为此函数会递归,所以把它摘出来
|
|
||||||
|
|
||||||
|
bool re = CopySubFun2(sourceFolderName, mRawPath, true, ref mCsvFileCount);//因为此函数会递归,所以把它摘出来
|
||||||
|
|
||||||
|
return re;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyCalFiles2Project(string sourceFolderName)
|
public bool CopyCalFiles2Project(string sourceFolderName)
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(sourceFolderName))
|
if (!Directory.Exists(sourceFolderName))
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Directory.Exists(mMetadataPath))
|
if (!Directory.Exists(mMetadataPath))
|
||||||
{
|
{
|
||||||
@ -526,6 +550,7 @@ namespace mainProgram
|
|||||||
|
|
||||||
string[] sourceFilesPath = Directory.GetFileSystemEntries(sourceFolderName);
|
string[] sourceFilesPath = Directory.GetFileSystemEntries(sourceFolderName);
|
||||||
|
|
||||||
|
int fileCounterCopied = 0;
|
||||||
for (int i = 0; i < sourceFilesPath.Length; i++)
|
for (int i = 0; i < sourceFilesPath.Length; i++)
|
||||||
{
|
{
|
||||||
string sourceFilePath = sourceFilesPath[i];
|
string sourceFilePath = sourceFilesPath[i];
|
||||||
@ -536,27 +561,36 @@ namespace mainProgram
|
|||||||
string dest = mMetadataPath;
|
string dest = mMetadataPath;
|
||||||
string sourceFileName = Path.GetFileName(sourceFilePath);//获取文件名
|
string sourceFileName = Path.GetFileName(sourceFilePath);//获取文件名
|
||||||
File.Copy(sourceFilePath, Path.Combine(dest, sourceFileName), true);
|
File.Copy(sourceFilePath, Path.Combine(dest, sourceFileName), true);
|
||||||
|
|
||||||
|
fileCounterCopied++;
|
||||||
}
|
}
|
||||||
else if (Directory.Exists(sourceFilePath))//是文件夹,拷贝文件夹;并递归
|
//因为定标文件不能够放在
|
||||||
|
//else if (Directory.Exists(sourceFilePath))//是文件夹,拷贝文件夹;并递归
|
||||||
|
//{
|
||||||
|
// string lastDirectory = forlders[forlders.Length - 1];
|
||||||
|
// string dest = Path.Combine(mMetadataPath, lastDirectory);
|
||||||
|
|
||||||
|
// if (!Directory.Exists(dest))
|
||||||
|
// {
|
||||||
|
// Directory.CreateDirectory(dest);
|
||||||
|
// }
|
||||||
|
// CopySubFun(sourceFilePath, dest, true);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileCounterCopied == 0)
|
||||||
{
|
{
|
||||||
string lastDirectory = forlders[forlders.Length - 1];
|
return false;
|
||||||
string dest = Path.Combine(mMetadataPath, lastDirectory);
|
|
||||||
|
|
||||||
if (!Directory.Exists(dest))
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(dest);
|
|
||||||
}
|
|
||||||
CopySubFun(sourceFilePath, dest, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CopySubFun(string sourceFolderName, string destFolderName, bool overwrite)//因为此函数会递归,所以把它摘出来
|
private bool CopySubFun(string sourceFolderName, string destFolderName, bool overwrite)//因为此函数会递归,所以把它摘出来
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(sourceFolderName))
|
if (!Directory.Exists(sourceFolderName))
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Directory.Exists(destFolderName))
|
if (!Directory.Exists(destFolderName))
|
||||||
{
|
{
|
||||||
@ -591,11 +625,67 @@ namespace mainProgram
|
|||||||
CopySubFun(sourceFilePath, dest, overwrite);
|
CopySubFun(sourceFilePath, dest, overwrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//将文件个数写入到可执行文件所在目录 → 打开工程时需要读取
|
private bool CopySubFun2(string sourceFolderName, string destFolderName, bool overwrite, ref int fileCounter)//不使用递归
|
||||||
BinaryWriter bw = new BinaryWriter(new FileStream(Path.Combine(mMetadataPath, "CsvFileCount.dat"), FileMode.Create));
|
{
|
||||||
bw.Write(mCsvFileCount);
|
if (!Directory.Exists(sourceFolderName))
|
||||||
bw.Close();
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Directory.Exists(destFolderName))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(destFolderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] files = Directory.GetFiles(sourceFolderName);
|
||||||
|
if (files.Length>0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] sourceForldersPath = Directory.GetFileSystemEntries(sourceFolderName);
|
||||||
|
for (int i = 0; i < sourceForldersPath.Length; i++)
|
||||||
|
{
|
||||||
|
string sourceForlder = sourceForldersPath[i];
|
||||||
|
|
||||||
|
string[] forlders = sourceForlder.Split('\\');
|
||||||
|
string destFolderName2 = Path.Combine(destFolderName, forlders[forlders.Length - 1]);
|
||||||
|
|
||||||
|
if (File.Exists(sourceForlder))//如果是文件,代表用户选择的dn数据文件夹结构有问题
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Directory.Exists(destFolderName2))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(destFolderName2);
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] filesPath = Directory.GetFileSystemEntries(sourceForlder);
|
||||||
|
for (int j = 0; j < filesPath.Length; j++)//必须按照源文件夹结构!!!!!!
|
||||||
|
{
|
||||||
|
string filePath = filesPath[j];
|
||||||
|
if (Directory.Exists(filePath))//如果是文件夹,代表用户选择的dn数据文件夹结构有问题
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
string sourceFileName = Path.GetFileName(filePath);//获取文件名
|
||||||
|
File.Copy(filePath, Path.Combine(destFolderName2, sourceFileName), overwrite);
|
||||||
|
|
||||||
|
//统计文件个数
|
||||||
|
fileCounter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileCounter == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DelectDir(string srcPath)
|
public void DelectDir(string srcPath)
|
||||||
@ -936,15 +1026,35 @@ namespace mainProgram
|
|||||||
Array.Sort(df);
|
Array.Sort(df);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetDateFolderCount()
|
||||||
|
{
|
||||||
|
FindTimespan();
|
||||||
|
return df.Length;
|
||||||
|
}
|
||||||
|
|
||||||
public string GetMinDate()
|
public string GetMinDate()
|
||||||
|
{
|
||||||
|
if (df.Length == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return df[0].mDateFolder;
|
return df[0].mDateFolder;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string GetMaxDate()
|
public string GetMaxDate()
|
||||||
|
{
|
||||||
|
if (df.Length == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return df[df.Length - 1].mDateFolder;
|
return df[df.Length - 1].mDateFolder;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void CopyWantedFiles(string minTime, string maxTime)
|
public void CopyWantedFiles(string minTime, string maxTime)
|
||||||
{
|
{
|
||||||
@ -1006,22 +1116,10 @@ namespace mainProgram
|
|||||||
destFileName = sourceFileName.Substring(firstIndex);
|
destFileName = sourceFileName.Substring(firstIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (File.Exists(sourceFilePath))//是文件,直接拷贝
|
if (File.Exists(sourceFilePath))//是文件,直接拷贝
|
||||||
{
|
{
|
||||||
File.Copy(sourceFilePath, Path.Combine(destFolderPath, sourceFolderName + destFileName), overwrite);
|
File.Copy(sourceFilePath, Path.Combine(destFolderPath, sourceFolderName + destFileName), overwrite);
|
||||||
}
|
}
|
||||||
else if (Directory.Exists(sourceFilePath))//是文件夹,拷贝文件夹;并递归 → 减而治之
|
|
||||||
{
|
|
||||||
string lastDirectory = forlders[forlders.Length - 1];
|
|
||||||
string dest = Path.Combine(destFolderPath, lastDirectory);
|
|
||||||
|
|
||||||
if (!Directory.Exists(dest))
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(dest);
|
|
||||||
}
|
|
||||||
CopySubFun(sourceFilePath, dest, overwrite);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
mainProgram/ProjectManagerWindow.Designer.cs
generated
6
mainProgram/ProjectManagerWindow.Designer.cs
generated
@ -44,7 +44,8 @@
|
|||||||
//
|
//
|
||||||
// textBox1
|
// textBox1
|
||||||
//
|
//
|
||||||
this.textBox1.Location = new System.Drawing.Point(341, 76);
|
this.textBox1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.textBox1.Location = new System.Drawing.Point(239, 82);
|
||||||
this.textBox1.Name = "textBox1";
|
this.textBox1.Name = "textBox1";
|
||||||
this.textBox1.Size = new System.Drawing.Size(100, 21);
|
this.textBox1.Size = new System.Drawing.Size(100, 21);
|
||||||
this.textBox1.TabIndex = 1;
|
this.textBox1.TabIndex = 1;
|
||||||
@ -53,6 +54,7 @@
|
|||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
this.ClientSize = new System.Drawing.Size(547, 236);
|
this.ClientSize = new System.Drawing.Size(547, 236);
|
||||||
this.Controls.Add(this.textBox1);
|
this.Controls.Add(this.textBox1);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
@ -60,7 +62,7 @@
|
|||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "ProjectManagerWindow";
|
this.Name = "ProjectManagerWindow";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "ProjectManagerWindow";
|
this.Text = "ProjectManagerWindow";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
66
mainProgram/Properties/Resources.Designer.cs
generated
66
mainProgram/Properties/Resources.Designer.cs
generated
@ -1,49 +1,44 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
// 运行时版本: 4.0.30319.42000
|
// 运行时版本:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// 对此文件的更改可能导致不正确的行为,如果
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
// 重新生成代码,则所做更改将丢失。
|
// 重新生成代码,这些更改将会丢失。
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace mainProgram.Properties
|
namespace mainProgram.Properties {
|
||||||
{
|
using System;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 强类型资源类,用于查找本地化字符串等。
|
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// 此类是由 StronglyTypedResourceBuilder
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources
|
internal class Resources {
|
||||||
{
|
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal Resources()
|
internal Resources() {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
{
|
get {
|
||||||
get
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
{
|
|
||||||
if ((resourceMan == null))
|
|
||||||
{
|
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mainProgram.Properties.Resources", typeof(Resources).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mainProgram.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
@ -52,20 +47,37 @@ namespace mainProgram.Properties
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
/// 重写当前线程的 CurrentUICulture 属性
|
||||||
/// 使用此强类型的资源类的资源查找。
|
/// 重写当前线程的 CurrentUICulture 属性。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
{
|
get {
|
||||||
get
|
|
||||||
{
|
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
set
|
set {
|
||||||
{
|
|
||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap EasySif_logo1 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("EasySif_logo1", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap IRIS_LOG2 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("IRIS LOG2", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
@ -60,6 +60,7 @@
|
|||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
@ -68,9 +69,10 @@
|
|||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
@ -85,9 +87,10 @@
|
|||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
@ -109,9 +112,16 @@
|
|||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="IRIS LOG2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\IRIS LOG2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="EasySif_logo1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\EasySif_logo1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
110
mainProgram/RadCorrectionWindow.Designer.cs
generated
Normal file
110
mainProgram/RadCorrectionWindow.Designer.cs
generated
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
partial class RadCorrectionWindow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RadCorrectionWindow));
|
||||||
|
this.CancelBtn = new System.Windows.Forms.Button();
|
||||||
|
this.ProcessesDetailTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.StartProcessBtn = new System.Windows.Forms.Button();
|
||||||
|
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// CancelBtn
|
||||||
|
//
|
||||||
|
this.CancelBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.CancelBtn.Location = new System.Drawing.Point(388, 255);
|
||||||
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
|
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.CancelBtn.TabIndex = 7;
|
||||||
|
this.CancelBtn.Text = "取消";
|
||||||
|
this.CancelBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
|
//
|
||||||
|
// ProcessesDetailTextBox
|
||||||
|
//
|
||||||
|
this.ProcessesDetailTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ProcessesDetailTextBox.Location = new System.Drawing.Point(32, 24);
|
||||||
|
this.ProcessesDetailTextBox.Multiline = true;
|
||||||
|
this.ProcessesDetailTextBox.Name = "ProcessesDetailTextBox";
|
||||||
|
this.ProcessesDetailTextBox.ReadOnly = true;
|
||||||
|
this.ProcessesDetailTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||||
|
this.ProcessesDetailTextBox.Size = new System.Drawing.Size(431, 154);
|
||||||
|
this.ProcessesDetailTextBox.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// StartProcessBtn
|
||||||
|
//
|
||||||
|
this.StartProcessBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.StartProcessBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.StartProcessBtn.Location = new System.Drawing.Point(296, 255);
|
||||||
|
this.StartProcessBtn.Name = "StartProcessBtn";
|
||||||
|
this.StartProcessBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.StartProcessBtn.TabIndex = 5;
|
||||||
|
this.StartProcessBtn.Text = "开始";
|
||||||
|
this.StartProcessBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.StartProcessBtn.Click += new System.EventHandler(this.StartProcessBtn_Click);
|
||||||
|
//
|
||||||
|
// progressBar1
|
||||||
|
//
|
||||||
|
this.progressBar1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.progressBar1.ForeColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.progressBar1.Location = new System.Drawing.Point(32, 207);
|
||||||
|
this.progressBar1.Name = "progressBar1";
|
||||||
|
this.progressBar1.Size = new System.Drawing.Size(431, 23);
|
||||||
|
this.progressBar1.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// RadCorrectionWindow
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(496, 304);
|
||||||
|
this.Controls.Add(this.CancelBtn);
|
||||||
|
this.Controls.Add(this.ProcessesDetailTextBox);
|
||||||
|
this.Controls.Add(this.StartProcessBtn);
|
||||||
|
this.Controls.Add(this.progressBar1);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "RadCorrectionWindow";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "辐亮度校正";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button CancelBtn;
|
||||||
|
private System.Windows.Forms.TextBox ProcessesDetailTextBox;
|
||||||
|
private System.Windows.Forms.Button StartProcessBtn;
|
||||||
|
private System.Windows.Forms.ProgressBar progressBar1;
|
||||||
|
}
|
||||||
|
}
|
||||||
89
mainProgram/RadCorrectionWindow.cs
Normal file
89
mainProgram/RadCorrectionWindow.cs
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
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.Threading;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
public partial class RadCorrectionWindow : Form
|
||||||
|
{
|
||||||
|
private BackgroundWorker backgroundWorker1;
|
||||||
|
|
||||||
|
private ProjectManager mProjectManager = null;//保存打开的/新建的工程对象
|
||||||
|
public RadCorrectionWindow(ProjectManager projectManager)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
mProjectManager = projectManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CancelBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartProcessBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var addr2 = getMemory(mProjectManager);
|
||||||
|
Console.WriteLine("子窗口变量的地址 = " + addr2);
|
||||||
|
|
||||||
|
//mProjectManager.UpdateProgressBarInfo = new UpdateProgressBarInfoDelegate(UpdateWidgetInfo);
|
||||||
|
mProjectManager.UpdateProgressBarInfoEvent += UpdateWidgetInfo;//向事件中注册事件处理程序
|
||||||
|
//mProjectManager.RadComplete = new RadCompleteDelegate(RadComplete);
|
||||||
|
mProjectManager.RadCompleteEvent += RadComplete;
|
||||||
|
|
||||||
|
Thread t1 = new Thread(new ThreadStart(mProjectManager.Rad));
|
||||||
|
t1.IsBackground = true;
|
||||||
|
|
||||||
|
t1.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateWidgetInfo(int ipos, string vinfo)//
|
||||||
|
{
|
||||||
|
//ProcessesDetailTextBox.AppendText(vinfo);//此行代码放在这里会出现问题 → 线程间操作无效: 从不是创建控件“ProcessesDetailTextBox”的线程访问它。
|
||||||
|
|
||||||
|
if (this.InvokeRequired) //InvokeRequired属性为真时,说明一个创建它以以外的线程(即SleepT)想访问它
|
||||||
|
{
|
||||||
|
UpdateProgressBarInfoDelegate setpos = new UpdateProgressBarInfoDelegate(UpdateWidgetInfo);
|
||||||
|
this.Invoke(setpos, new object[] { ipos, vinfo });//SleepT线程调用本控件Form1中的方法
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.progressBar1.Value = Convert.ToInt32(ipos);
|
||||||
|
ProcessesDetailTextBox.AppendText(vinfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RadComplete()
|
||||||
|
{
|
||||||
|
//this.Close();//此行代码放在这里会出现问题 → 线程间操作无效: 从不是创建控件“RadCorrectionWindow”的线程访问它。
|
||||||
|
|
||||||
|
if (this.InvokeRequired)//InvokeRequired属性为真时,说明一个创建它以以外的线程想访问它
|
||||||
|
{
|
||||||
|
RadCompleteDelegate RadCompleteTmp = new RadCompleteDelegate(RadComplete);
|
||||||
|
this.Invoke(RadCompleteTmp, new object[] { });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "辐亮度转换完成!", "提示");
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getMemory(object o) // 获取引用类型的内存地址方法
|
||||||
|
{
|
||||||
|
GCHandle h = GCHandle.Alloc(o, GCHandleType.WeakTrackResurrection);
|
||||||
|
IntPtr addr = GCHandle.ToIntPtr(h);
|
||||||
|
return "0x" + addr.ToString("X");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1253
mainProgram/RadCorrectionWindow.resx
Normal file
1253
mainProgram/RadCorrectionWindow.resx
Normal file
File diff suppressed because it is too large
Load Diff
BIN
mainProgram/Resources/EasySif_logo1.png
Normal file
BIN
mainProgram/Resources/EasySif_logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
mainProgram/Resources/IRIS LOG2.png
Normal file
BIN
mainProgram/Resources/IRIS LOG2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
384
mainProgram/SVDWindows.Designer.cs
generated
Normal file
384
mainProgram/SVDWindows.Designer.cs
generated
Normal file
@ -0,0 +1,384 @@
|
|||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
partial class SVDWindows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SVDWindows));
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.ProcessBtn = new System.Windows.Forms.Button();
|
||||||
|
this.CancelBtn = new System.Windows.Forms.Button();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.Min_FraunhoferWindowTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.Max_FraunhoferWindowTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.FraunhoferPositionTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.MinYearTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MaxYearTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.ProcessMessageTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MinMonthTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MinDayTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MaxMonthTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.MaxDayTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.LeftShoulder_leftTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.LeftShoulder_rightTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.RightShoulder_leftTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.RightShoulder_rightTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.LeftShoulderLabel = new System.Windows.Forms.Label();
|
||||||
|
this.RightShoulderLabel = new System.Windows.Forms.Label();
|
||||||
|
this.min_dateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.max_dateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||||
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.groupBox1.SuspendLayout();
|
||||||
|
this.groupBox2.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(28, 95);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(77, 12);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "选择时间范围";
|
||||||
|
//
|
||||||
|
// ProcessBtn
|
||||||
|
//
|
||||||
|
this.ProcessBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ProcessBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.ProcessBtn.Location = new System.Drawing.Point(419, 575);
|
||||||
|
this.ProcessBtn.Name = "ProcessBtn";
|
||||||
|
this.ProcessBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.ProcessBtn.TabIndex = 3;
|
||||||
|
this.ProcessBtn.Text = "执行";
|
||||||
|
this.ProcessBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.ProcessBtn.Click += new System.EventHandler(this.ProcessBtn_Click);
|
||||||
|
//
|
||||||
|
// CancelBtn
|
||||||
|
//
|
||||||
|
this.CancelBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.CancelBtn.Location = new System.Drawing.Point(518, 575);
|
||||||
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
|
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.CancelBtn.TabIndex = 4;
|
||||||
|
this.CancelBtn.Text = "取消";
|
||||||
|
this.CancelBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(28, 29);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(89, 12);
|
||||||
|
this.label2.TabIndex = 5;
|
||||||
|
this.label2.Text = "Fraunhofer窗口";
|
||||||
|
//
|
||||||
|
// Min_FraunhoferWindowTextBox
|
||||||
|
//
|
||||||
|
this.Min_FraunhoferWindowTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.Min_FraunhoferWindowTextBox.Location = new System.Drawing.Point(145, 26);
|
||||||
|
this.Min_FraunhoferWindowTextBox.Name = "Min_FraunhoferWindowTextBox";
|
||||||
|
this.Min_FraunhoferWindowTextBox.Size = new System.Drawing.Size(160, 21);
|
||||||
|
this.Min_FraunhoferWindowTextBox.TabIndex = 6;
|
||||||
|
this.Min_FraunhoferWindowTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// Max_FraunhoferWindowTextBox
|
||||||
|
//
|
||||||
|
this.Max_FraunhoferWindowTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.Max_FraunhoferWindowTextBox.Location = new System.Drawing.Point(356, 26);
|
||||||
|
this.Max_FraunhoferWindowTextBox.Name = "Max_FraunhoferWindowTextBox";
|
||||||
|
this.Max_FraunhoferWindowTextBox.Size = new System.Drawing.Size(160, 21);
|
||||||
|
this.Max_FraunhoferWindowTextBox.TabIndex = 7;
|
||||||
|
this.Max_FraunhoferWindowTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// FraunhoferPositionTextBox
|
||||||
|
//
|
||||||
|
this.FraunhoferPositionTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.FraunhoferPositionTextBox.Location = new System.Drawing.Point(280, 158);
|
||||||
|
this.FraunhoferPositionTextBox.Name = "FraunhoferPositionTextBox";
|
||||||
|
this.FraunhoferPositionTextBox.Size = new System.Drawing.Size(100, 21);
|
||||||
|
this.FraunhoferPositionTextBox.TabIndex = 8;
|
||||||
|
this.FraunhoferPositionTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(32, 161);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(113, 12);
|
||||||
|
this.label3.TabIndex = 9;
|
||||||
|
this.label3.Text = "Fraunhofer确切位置";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(28, 40);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(77, 12);
|
||||||
|
this.label4.TabIndex = 10;
|
||||||
|
this.label4.Text = "数据时间范围";
|
||||||
|
//
|
||||||
|
// MinYearTextBox
|
||||||
|
//
|
||||||
|
this.MinYearTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MinYearTextBox.Location = new System.Drawing.Point(145, 36);
|
||||||
|
this.MinYearTextBox.Name = "MinYearTextBox";
|
||||||
|
this.MinYearTextBox.ReadOnly = true;
|
||||||
|
this.MinYearTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MinYearTextBox.TabIndex = 11;
|
||||||
|
this.MinYearTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// MaxYearTextBox
|
||||||
|
//
|
||||||
|
this.MaxYearTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MaxYearTextBox.Location = new System.Drawing.Point(356, 36);
|
||||||
|
this.MaxYearTextBox.Name = "MaxYearTextBox";
|
||||||
|
this.MaxYearTextBox.ReadOnly = true;
|
||||||
|
this.MaxYearTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MaxYearTextBox.TabIndex = 12;
|
||||||
|
this.MaxYearTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// ProcessMessageTextBox
|
||||||
|
//
|
||||||
|
this.ProcessMessageTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ProcessMessageTextBox.Location = new System.Drawing.Point(27, 400);
|
||||||
|
this.ProcessMessageTextBox.Multiline = true;
|
||||||
|
this.ProcessMessageTextBox.Name = "ProcessMessageTextBox";
|
||||||
|
this.ProcessMessageTextBox.ReadOnly = true;
|
||||||
|
this.ProcessMessageTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||||
|
this.ProcessMessageTextBox.Size = new System.Drawing.Size(566, 149);
|
||||||
|
this.ProcessMessageTextBox.TabIndex = 17;
|
||||||
|
//
|
||||||
|
// MinMonthTextBox
|
||||||
|
//
|
||||||
|
this.MinMonthTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MinMonthTextBox.Location = new System.Drawing.Point(200, 36);
|
||||||
|
this.MinMonthTextBox.Name = "MinMonthTextBox";
|
||||||
|
this.MinMonthTextBox.ReadOnly = true;
|
||||||
|
this.MinMonthTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MinMonthTextBox.TabIndex = 18;
|
||||||
|
this.MinMonthTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// MinDayTextBox
|
||||||
|
//
|
||||||
|
this.MinDayTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MinDayTextBox.Location = new System.Drawing.Point(255, 36);
|
||||||
|
this.MinDayTextBox.Name = "MinDayTextBox";
|
||||||
|
this.MinDayTextBox.ReadOnly = true;
|
||||||
|
this.MinDayTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MinDayTextBox.TabIndex = 19;
|
||||||
|
this.MinDayTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// MaxMonthTextBox
|
||||||
|
//
|
||||||
|
this.MaxMonthTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MaxMonthTextBox.Location = new System.Drawing.Point(411, 36);
|
||||||
|
this.MaxMonthTextBox.Name = "MaxMonthTextBox";
|
||||||
|
this.MaxMonthTextBox.ReadOnly = true;
|
||||||
|
this.MaxMonthTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MaxMonthTextBox.TabIndex = 20;
|
||||||
|
this.MaxMonthTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// MaxDayTextBox
|
||||||
|
//
|
||||||
|
this.MaxDayTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.MaxDayTextBox.Location = new System.Drawing.Point(466, 36);
|
||||||
|
this.MaxDayTextBox.Name = "MaxDayTextBox";
|
||||||
|
this.MaxDayTextBox.ReadOnly = true;
|
||||||
|
this.MaxDayTextBox.Size = new System.Drawing.Size(50, 21);
|
||||||
|
this.MaxDayTextBox.TabIndex = 21;
|
||||||
|
this.MaxDayTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// LeftShoulder_leftTextBox
|
||||||
|
//
|
||||||
|
this.LeftShoulder_leftTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.LeftShoulder_leftTextBox.Location = new System.Drawing.Point(145, 107);
|
||||||
|
this.LeftShoulder_leftTextBox.Name = "LeftShoulder_leftTextBox";
|
||||||
|
this.LeftShoulder_leftTextBox.Size = new System.Drawing.Size(76, 21);
|
||||||
|
this.LeftShoulder_leftTextBox.TabIndex = 22;
|
||||||
|
this.LeftShoulder_leftTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// LeftShoulder_rightTextBox
|
||||||
|
//
|
||||||
|
this.LeftShoulder_rightTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.LeftShoulder_rightTextBox.Location = new System.Drawing.Point(229, 107);
|
||||||
|
this.LeftShoulder_rightTextBox.Name = "LeftShoulder_rightTextBox";
|
||||||
|
this.LeftShoulder_rightTextBox.Size = new System.Drawing.Size(76, 21);
|
||||||
|
this.LeftShoulder_rightTextBox.TabIndex = 23;
|
||||||
|
this.LeftShoulder_rightTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// RightShoulder_leftTextBox
|
||||||
|
//
|
||||||
|
this.RightShoulder_leftTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.RightShoulder_leftTextBox.Location = new System.Drawing.Point(356, 107);
|
||||||
|
this.RightShoulder_leftTextBox.Name = "RightShoulder_leftTextBox";
|
||||||
|
this.RightShoulder_leftTextBox.Size = new System.Drawing.Size(76, 21);
|
||||||
|
this.RightShoulder_leftTextBox.TabIndex = 24;
|
||||||
|
this.RightShoulder_leftTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// RightShoulder_rightTextBox
|
||||||
|
//
|
||||||
|
this.RightShoulder_rightTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.RightShoulder_rightTextBox.Location = new System.Drawing.Point(438, 107);
|
||||||
|
this.RightShoulder_rightTextBox.Name = "RightShoulder_rightTextBox";
|
||||||
|
this.RightShoulder_rightTextBox.Size = new System.Drawing.Size(76, 21);
|
||||||
|
this.RightShoulder_rightTextBox.TabIndex = 25;
|
||||||
|
this.RightShoulder_rightTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// LeftShoulderLabel
|
||||||
|
//
|
||||||
|
this.LeftShoulderLabel.AutoSize = true;
|
||||||
|
this.LeftShoulderLabel.Location = new System.Drawing.Point(203, 76);
|
||||||
|
this.LeftShoulderLabel.Name = "LeftShoulderLabel";
|
||||||
|
this.LeftShoulderLabel.Size = new System.Drawing.Size(53, 12);
|
||||||
|
this.LeftShoulderLabel.TabIndex = 26;
|
||||||
|
this.LeftShoulderLabel.Text = "左肩窗口";
|
||||||
|
//
|
||||||
|
// RightShoulderLabel
|
||||||
|
//
|
||||||
|
this.RightShoulderLabel.AutoSize = true;
|
||||||
|
this.RightShoulderLabel.Location = new System.Drawing.Point(417, 76);
|
||||||
|
this.RightShoulderLabel.Name = "RightShoulderLabel";
|
||||||
|
this.RightShoulderLabel.Size = new System.Drawing.Size(53, 12);
|
||||||
|
this.RightShoulderLabel.TabIndex = 27;
|
||||||
|
this.RightShoulderLabel.Text = "右肩窗口";
|
||||||
|
//
|
||||||
|
// min_dateTimePicker
|
||||||
|
//
|
||||||
|
this.min_dateTimePicker.Location = new System.Drawing.Point(145, 89);
|
||||||
|
this.min_dateTimePicker.Name = "min_dateTimePicker";
|
||||||
|
this.min_dateTimePicker.Size = new System.Drawing.Size(160, 21);
|
||||||
|
this.min_dateTimePicker.TabIndex = 28;
|
||||||
|
//
|
||||||
|
// max_dateTimePicker
|
||||||
|
//
|
||||||
|
this.max_dateTimePicker.Location = new System.Drawing.Point(356, 89);
|
||||||
|
this.max_dateTimePicker.Name = "max_dateTimePicker";
|
||||||
|
this.max_dateTimePicker.Size = new System.Drawing.Size(160, 21);
|
||||||
|
this.max_dateTimePicker.TabIndex = 29;
|
||||||
|
//
|
||||||
|
// groupBox1
|
||||||
|
//
|
||||||
|
this.groupBox1.BackColor = System.Drawing.Color.White;
|
||||||
|
this.groupBox1.Controls.Add(this.max_dateTimePicker);
|
||||||
|
this.groupBox1.Controls.Add(this.label1);
|
||||||
|
this.groupBox1.Controls.Add(this.min_dateTimePicker);
|
||||||
|
this.groupBox1.Controls.Add(this.label4);
|
||||||
|
this.groupBox1.Controls.Add(this.MinYearTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MaxYearTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MinMonthTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MinDayTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MaxMonthTextBox);
|
||||||
|
this.groupBox1.Controls.Add(this.MaxDayTextBox);
|
||||||
|
this.groupBox1.Location = new System.Drawing.Point(27, 19);
|
||||||
|
this.groupBox1.Name = "groupBox1";
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(566, 143);
|
||||||
|
this.groupBox1.TabIndex = 30;
|
||||||
|
this.groupBox1.TabStop = false;
|
||||||
|
this.groupBox1.Text = "数据";
|
||||||
|
//
|
||||||
|
// groupBox2
|
||||||
|
//
|
||||||
|
this.groupBox2.BackColor = System.Drawing.Color.White;
|
||||||
|
this.groupBox2.Controls.Add(this.RightShoulder_leftTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.label2);
|
||||||
|
this.groupBox2.Controls.Add(this.RightShoulderLabel);
|
||||||
|
this.groupBox2.Controls.Add(this.Min_FraunhoferWindowTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.LeftShoulderLabel);
|
||||||
|
this.groupBox2.Controls.Add(this.Max_FraunhoferWindowTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.RightShoulder_rightTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.FraunhoferPositionTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.label3);
|
||||||
|
this.groupBox2.Controls.Add(this.LeftShoulder_rightTextBox);
|
||||||
|
this.groupBox2.Controls.Add(this.LeftShoulder_leftTextBox);
|
||||||
|
this.groupBox2.Location = new System.Drawing.Point(27, 178);
|
||||||
|
this.groupBox2.Name = "groupBox2";
|
||||||
|
this.groupBox2.Size = new System.Drawing.Size(566, 198);
|
||||||
|
this.groupBox2.TabIndex = 31;
|
||||||
|
this.groupBox2.TabStop = false;
|
||||||
|
this.groupBox2.Text = "SIF参数";
|
||||||
|
//
|
||||||
|
// SVDWindows
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(624, 626);
|
||||||
|
this.Controls.Add(this.groupBox2);
|
||||||
|
this.Controls.Add(this.groupBox1);
|
||||||
|
this.Controls.Add(this.ProcessMessageTextBox);
|
||||||
|
this.Controls.Add(this.CancelBtn);
|
||||||
|
this.Controls.Add(this.ProcessBtn);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "SVDWindows";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "SVDWindows";
|
||||||
|
this.Load += new System.EventHandler(this.SVDWindows_Load);
|
||||||
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
this.groupBox1.PerformLayout();
|
||||||
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
this.groupBox2.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Button ProcessBtn;
|
||||||
|
private System.Windows.Forms.Button CancelBtn;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.TextBox Min_FraunhoferWindowTextBox;
|
||||||
|
private System.Windows.Forms.TextBox Max_FraunhoferWindowTextBox;
|
||||||
|
private System.Windows.Forms.TextBox FraunhoferPositionTextBox;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.TextBox MinYearTextBox;
|
||||||
|
private System.Windows.Forms.TextBox MaxYearTextBox;
|
||||||
|
private System.Windows.Forms.TextBox ProcessMessageTextBox;
|
||||||
|
private System.Windows.Forms.TextBox MinMonthTextBox;
|
||||||
|
private System.Windows.Forms.TextBox MinDayTextBox;
|
||||||
|
private System.Windows.Forms.TextBox MaxMonthTextBox;
|
||||||
|
private System.Windows.Forms.TextBox MaxDayTextBox;
|
||||||
|
private System.Windows.Forms.TextBox LeftShoulder_leftTextBox;
|
||||||
|
private System.Windows.Forms.TextBox LeftShoulder_rightTextBox;
|
||||||
|
private System.Windows.Forms.TextBox RightShoulder_leftTextBox;
|
||||||
|
private System.Windows.Forms.TextBox RightShoulder_rightTextBox;
|
||||||
|
private System.Windows.Forms.Label LeftShoulderLabel;
|
||||||
|
private System.Windows.Forms.Label RightShoulderLabel;
|
||||||
|
private System.Windows.Forms.DateTimePicker min_dateTimePicker;
|
||||||
|
private System.Windows.Forms.DateTimePicker max_dateTimePicker;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox1;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox2;
|
||||||
|
}
|
||||||
|
}
|
||||||
356
mainProgram/SVDWindows.cs
Normal file
356
mainProgram/SVDWindows.cs
Normal file
@ -0,0 +1,356 @@
|
|||||||
|
//#define debug
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
public partial class SVDWindows : Form
|
||||||
|
{
|
||||||
|
private ProjectManager mProjectManager = null;//保存打开的/新建的工程对象
|
||||||
|
private string mSifAlgorithm;
|
||||||
|
public SVDWindows(ProjectManager projectManager,string sifAlgorithm)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
mProjectManager = projectManager;
|
||||||
|
mSifAlgorithm = sifAlgorithm;
|
||||||
|
|
||||||
|
this.Text = mSifAlgorithm;//设置界面左上角的窗口名
|
||||||
|
|
||||||
|
//准备sif算法默认窗口
|
||||||
|
switch (mSifAlgorithm)
|
||||||
|
{
|
||||||
|
case "svd":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "740";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "770";
|
||||||
|
FraunhoferPositionTextBox.Text = "760";
|
||||||
|
|
||||||
|
UseLeftShoulder(false);
|
||||||
|
UseRightShoulder(false);
|
||||||
|
UseFraunhoferPosition(true);
|
||||||
|
break;
|
||||||
|
case "sfm":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "759";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "770";
|
||||||
|
FraunhoferPositionTextBox.Text = "760";
|
||||||
|
|
||||||
|
UseLeftShoulder(false);
|
||||||
|
UseRightShoulder(false);
|
||||||
|
UseFraunhoferPosition(true);
|
||||||
|
break;
|
||||||
|
case "sfm_gaussian":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "759";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "770";
|
||||||
|
FraunhoferPositionTextBox.Text = "760";
|
||||||
|
|
||||||
|
UseLeftShoulder(false);
|
||||||
|
UseRightShoulder(false);
|
||||||
|
UseFraunhoferPosition(true);
|
||||||
|
break;
|
||||||
|
case "doas":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "759";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "770";
|
||||||
|
FraunhoferPositionTextBox.Text = "760";
|
||||||
|
|
||||||
|
UseLeftShoulder(false);
|
||||||
|
UseRightShoulder(false);
|
||||||
|
UseFraunhoferPosition(true);
|
||||||
|
break;
|
||||||
|
case "sfld":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "740";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "780";
|
||||||
|
|
||||||
|
LeftShoulder_leftTextBox.Text = "756";
|
||||||
|
LeftShoulder_rightTextBox.Text = "759";
|
||||||
|
|
||||||
|
UseLeftShoulder(true);
|
||||||
|
UseRightShoulder(false);
|
||||||
|
UseFraunhoferPosition(false);
|
||||||
|
break;
|
||||||
|
case "3fld":
|
||||||
|
Min_FraunhoferWindowTextBox.Text = "740";
|
||||||
|
Max_FraunhoferWindowTextBox.Text = "780";
|
||||||
|
|
||||||
|
LeftShoulder_leftTextBox.Text = "756";
|
||||||
|
LeftShoulder_rightTextBox.Text = "759";
|
||||||
|
RightShoulder_leftTextBox.Text = "761";
|
||||||
|
RightShoulder_rightTextBox.Text = "762";
|
||||||
|
|
||||||
|
UseLeftShoulder(true);
|
||||||
|
UseRightShoulder(true);
|
||||||
|
UseFraunhoferPosition(false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* 您可以有任意数量的 case 语句 */
|
||||||
|
default: /* 可选的 */
|
||||||
|
//statement(s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UseLeftShoulder(bool readyToUse)
|
||||||
|
{
|
||||||
|
LeftShoulder_leftTextBox.Enabled = readyToUse;
|
||||||
|
LeftShoulder_rightTextBox.Enabled = readyToUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UseRightShoulder(bool readyToUse)
|
||||||
|
{
|
||||||
|
RightShoulder_leftTextBox.Enabled = readyToUse;
|
||||||
|
RightShoulder_rightTextBox.Enabled = readyToUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UseFraunhoferPosition(bool readyToUse)
|
||||||
|
{
|
||||||
|
FraunhoferPositionTextBox.Enabled = readyToUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProcessBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//准备需要处理的文件
|
||||||
|
DateTime min = min_dateTimePicker.Value;
|
||||||
|
DateTime max = max_dateTimePicker.Value;
|
||||||
|
|
||||||
|
if (max < min)
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "选择的数据时间错误!", "提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string minTime = min.Year.ToString() + "_" + min.Month.ToString() + "_" + min.Day.ToString();
|
||||||
|
string maxTime = max.Year.ToString() + "_" + max.Month.ToString() + "_" + max.Day.ToString();
|
||||||
|
|
||||||
|
ProcessMessageTextBox.Text = "Preparing files ...";
|
||||||
|
mProjectManager.CopyWantedFiles(minTime, maxTime);
|
||||||
|
this.ProcessMessageTextBox.Text = this.ProcessMessageTextBox.Text + System.Environment.NewLine + "\tdone ..." + System.Environment.NewLine;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//构建参数
|
||||||
|
string programDir = System.Environment.CurrentDirectory;
|
||||||
|
|
||||||
|
#if debug//条件编译符号 定义在 此源文件的第一行
|
||||||
|
string param1 = "D:\\PycharmProjects\\sif\\standard_sif.csv";
|
||||||
|
#else
|
||||||
|
string param1 = Path.Combine(programDir, "standard_sif.csv");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
string param2 = mProjectManager.mSifTmpPath;//输入数据文件夹
|
||||||
|
|
||||||
|
string outputFileName = mSifAlgorithm + "_" + Min_FraunhoferWindowTextBox.Text + "-" + Max_FraunhoferWindowTextBox.Text + "_" + FraunhoferPositionTextBox.Text + "_" + minTime + "-" + maxTime + ".csv";
|
||||||
|
string param3 = Path.Combine(mProjectManager.mSifPath, outputFileName);//输出文件名
|
||||||
|
|
||||||
|
string param4 = "";
|
||||||
|
switch (mSifAlgorithm)
|
||||||
|
{
|
||||||
|
case "svd":
|
||||||
|
case "sfm":
|
||||||
|
case "sfm_gaussian":
|
||||||
|
case "doas":
|
||||||
|
//string param4 = "[740,770],760";
|
||||||
|
param4 = "[" + Min_FraunhoferWindowTextBox.Text + "," + Max_FraunhoferWindowTextBox.Text + "]," + FraunhoferPositionTextBox.Text;
|
||||||
|
break;
|
||||||
|
case "sfld":
|
||||||
|
param4 = "[" + Min_FraunhoferWindowTextBox.Text + "," + Max_FraunhoferWindowTextBox.Text + "]," + "[" + LeftShoulder_leftTextBox.Text + "," + LeftShoulder_rightTextBox.Text + "]";
|
||||||
|
break;
|
||||||
|
case "3fld":
|
||||||
|
param4 = "[" + Min_FraunhoferWindowTextBox.Text + "," + Max_FraunhoferWindowTextBox.Text + "]," + "[" + LeftShoulder_leftTextBox.Text + "," + LeftShoulder_rightTextBox.Text + "]," + "[" + RightShoulder_leftTextBox.Text + "," + RightShoulder_rightTextBox.Text + "]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* 您可以有任意数量的 case 语句 */
|
||||||
|
default: /* 可选的 */
|
||||||
|
//statement(s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
string param5 = "P1";
|
||||||
|
string param6 = mSifAlgorithm;
|
||||||
|
int a = 1;
|
||||||
|
int b = 2;
|
||||||
|
|
||||||
|
//执行算法
|
||||||
|
StartTest(param1, param2, param3, param4, param5, param6);
|
||||||
|
|
||||||
|
//this.DialogResult = DialogResult.OK;//这行代码会导致窗口直接关闭
|
||||||
|
}
|
||||||
|
catch (Exception e1)
|
||||||
|
{
|
||||||
|
MessageBox.Show(e1.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Process progressTest;
|
||||||
|
private void log(string log, bool time)
|
||||||
|
{
|
||||||
|
//将参数写入到txt文件中 → 调试使用
|
||||||
|
string programDir = System.Environment.CurrentDirectory;
|
||||||
|
string tmp = Path.Combine(programDir, "commandLine.txt");//保存的文件路径
|
||||||
|
//FileStream mystream = new FileStream(tmp, FileMode.OpenOrCreate);
|
||||||
|
//StreamWriter sw = new StreamWriter(mystream);
|
||||||
|
|
||||||
|
StreamWriter sw = new StreamWriter(tmp, true);
|
||||||
|
|
||||||
|
if (time)
|
||||||
|
{
|
||||||
|
string tradeTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ", DateTimeFormatInfo.InvariantInfo);
|
||||||
|
sw.WriteLine(tradeTime + log);//按行写
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sw.WriteLine(" " + log);//按行写
|
||||||
|
}
|
||||||
|
|
||||||
|
sw.Close();//关闭
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool StartTest(string param1, string param2, string param3, string param4, string param5, string param6)
|
||||||
|
{
|
||||||
|
bool state = true;
|
||||||
|
|
||||||
|
Console.WriteLine("开始执行sif 算法 python+++++++++++++++++++++++\n");
|
||||||
|
ProcessStartInfo start = new ProcessStartInfo();
|
||||||
|
|
||||||
|
string programDir = System.Environment.CurrentDirectory;
|
||||||
|
#if debug//条件编译符号 定义在 此源文件的第一行
|
||||||
|
string sifPlgorithm_exe = Path.Combine(@"D:\csharp_vs2017\easySif\sifAlgorithm_Python_exe\dist", "sif_retrieval.exe");
|
||||||
|
#else
|
||||||
|
string sifPlgorithm_exe = Path.Combine(programDir, "sif_retrieval.exe");
|
||||||
|
#endif
|
||||||
|
start.FileName = sifPlgorithm_exe;
|
||||||
|
string sArguments = param1 + " " + param2 + " " + param3 + " " + param4 + " " + param5 + " " + param6;
|
||||||
|
log(sArguments, true);
|
||||||
|
|
||||||
|
|
||||||
|
start.Arguments = sArguments;
|
||||||
|
start.UseShellExecute = false;
|
||||||
|
start.RedirectStandardOutput = true;
|
||||||
|
start.RedirectStandardInput = true;
|
||||||
|
start.RedirectStandardError = true;
|
||||||
|
start.CreateNoWindow = true;
|
||||||
|
|
||||||
|
using (progressTest = Process.Start(start))
|
||||||
|
{
|
||||||
|
// 异步获取命令行内容
|
||||||
|
progressTest.BeginOutputReadLine();
|
||||||
|
// 为异步获取订阅事件
|
||||||
|
progressTest.OutputDataReceived += new DataReceivedEventHandler(outputDataReceived);
|
||||||
|
|
||||||
|
progressTest.ErrorDataReceived += new DataReceivedEventHandler(outputDataReceived2);
|
||||||
|
//progressTest.StandardError += new
|
||||||
|
}
|
||||||
|
Console.WriteLine("开始执行sif 算法 python---------------------\n");
|
||||||
|
|
||||||
|
//this.DialogResult = DialogResult.OK;//这行代码会导致窗口直接关闭
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void outputDataReceived(object sender, DataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(e.Data))//System.Environment.NewLine
|
||||||
|
{
|
||||||
|
this.Invoke(
|
||||||
|
new Action(() => { this.ProcessMessageTextBox.AppendText(e.Data + System.Environment.NewLine); log(e.Data, false); })
|
||||||
|
);
|
||||||
|
|
||||||
|
if (e.Data.Contains("Sif compute Completed!"))//当转换完成后
|
||||||
|
{
|
||||||
|
this.Invoke(
|
||||||
|
new Action(() => { MessageBox.Show(this, "sif计算完成!", "提示"); this.DialogResult = DialogResult.OK; this.Close(); })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Data.Contains("error"))//当转换完成后
|
||||||
|
{
|
||||||
|
this.Invoke(
|
||||||
|
new Action(() => { MessageBox.Show(this, "sif算法发生错误,请联系工程师解决!", "提示"); this.DialogResult = DialogResult.No; this.Close(); })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (this.InvokeRequired)//InvokeRequired属性为真时,说明一个创建它以以外的线程想访问它
|
||||||
|
//{
|
||||||
|
// if (e.Data.Contains("Completed"))//System.NullReferenceException:“未将对象引用设置到对象的实例。”
|
||||||
|
// //System.Diagnostics.DataReceivedEventArgs.Data.get 返回 null。
|
||||||
|
// {
|
||||||
|
// DataReceivedEventHandler Tmp = new DataReceivedEventHandler(outputDataReceived);
|
||||||
|
// this.Invoke(Tmp, new object[] { sender, e });
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// MessageBox.Show(this, "sif转换完成!", "提示");//线程间操作无效: 从不是创建控件“SVDWindows”的线程访问它。
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void outputDataReceived2(object sender, DataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(e.Data))//System.Environment.NewLine
|
||||||
|
{
|
||||||
|
string tmp = this.ProcessMessageTextBox.Text + System.Environment.NewLine + e.Data;
|
||||||
|
this.Invoke(
|
||||||
|
new Action(() => { this.ProcessMessageTextBox.Text = tmp; log(e.Data, false); })
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if (e.Data.Contains("Completed"))//当转换完成后
|
||||||
|
{
|
||||||
|
this.Invoke(
|
||||||
|
new Action(() => { MessageBox.Show(this, "sif转换完成!", "提示"); this.DialogResult = DialogResult.OK; this.Close(); })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CancelBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SVDWindows_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//获取数据的时间范围
|
||||||
|
mProjectManager.FindTimespan();
|
||||||
|
|
||||||
|
string minDate = mProjectManager.GetMinDate();
|
||||||
|
string maxDate = mProjectManager.GetMaxDate();
|
||||||
|
|
||||||
|
string[] minDateList = minDate.Split('_');
|
||||||
|
string[] maxDateList = maxDate.Split('_');
|
||||||
|
|
||||||
|
//显示数据的时间范围
|
||||||
|
MinYearTextBox.Text = minDateList[0];
|
||||||
|
MinMonthTextBox.Text = minDateList[1];
|
||||||
|
MinDayTextBox.Text = minDateList[2];
|
||||||
|
|
||||||
|
MaxYearTextBox.Text = maxDateList[0];
|
||||||
|
MaxMonthTextBox.Text = maxDateList[1];
|
||||||
|
MaxDayTextBox.Text = maxDateList[2];
|
||||||
|
|
||||||
|
//设置默认需要处理的时间范围
|
||||||
|
DateTime min = new DateTime(int.Parse(minDateList[0]), int.Parse(minDateList[1]), int.Parse(minDateList[2]));
|
||||||
|
DateTime max = new DateTime(int.Parse(maxDateList[0]), int.Parse(maxDateList[1]), int.Parse(maxDateList[2]));
|
||||||
|
|
||||||
|
min_dateTimePicker.MinDate = min;
|
||||||
|
min_dateTimePicker.MaxDate = max;
|
||||||
|
min_dateTimePicker.Value = min;
|
||||||
|
|
||||||
|
max_dateTimePicker.MinDate = min;
|
||||||
|
max_dateTimePicker.MaxDate = max;
|
||||||
|
max_dateTimePicker.Value = max;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1253
mainProgram/SVDWindows.resx
Normal file
1253
mainProgram/SVDWindows.resx
Normal file
File diff suppressed because it is too large
Load Diff
128
mainProgram/SaveAs.Designer.cs
generated
Normal file
128
mainProgram/SaveAs.Designer.cs
generated
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
partial class SaveAsWindow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SaveAsWindow));
|
||||||
|
this.SelectPathBtn = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.PathTextBox = new System.Windows.Forms.TextBox();
|
||||||
|
this.OkBtn = new System.Windows.Forms.Button();
|
||||||
|
this.CancelBtn = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// SelectPathBtn
|
||||||
|
//
|
||||||
|
this.SelectPathBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.SelectPathBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.SelectPathBtn.Location = new System.Drawing.Point(367, 32);
|
||||||
|
this.SelectPathBtn.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.SelectPathBtn.Name = "SelectPathBtn";
|
||||||
|
this.SelectPathBtn.Size = new System.Drawing.Size(56, 27);
|
||||||
|
this.SelectPathBtn.TabIndex = 0;
|
||||||
|
this.SelectPathBtn.Text = "浏览...";
|
||||||
|
this.SelectPathBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.SelectPathBtn.Click += new System.EventHandler(this.SelectPathBtn_Click);
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(43, 40);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "保存路径";
|
||||||
|
//
|
||||||
|
// PathTextBox
|
||||||
|
//
|
||||||
|
this.PathTextBox.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.PathTextBox.Location = new System.Drawing.Point(114, 36);
|
||||||
|
this.PathTextBox.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.PathTextBox.Name = "PathTextBox";
|
||||||
|
this.PathTextBox.Size = new System.Drawing.Size(234, 21);
|
||||||
|
this.PathTextBox.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// OkBtn
|
||||||
|
//
|
||||||
|
this.OkBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.OkBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.OkBtn.Location = new System.Drawing.Point(292, 100);
|
||||||
|
this.OkBtn.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.OkBtn.Name = "OkBtn";
|
||||||
|
this.OkBtn.Size = new System.Drawing.Size(56, 27);
|
||||||
|
this.OkBtn.TabIndex = 3;
|
||||||
|
this.OkBtn.Text = "确定";
|
||||||
|
this.OkBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
|
||||||
|
//
|
||||||
|
// CancelBtn
|
||||||
|
//
|
||||||
|
this.CancelBtn.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.CancelBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.CancelBtn.Location = new System.Drawing.Point(367, 100);
|
||||||
|
this.CancelBtn.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
|
this.CancelBtn.Size = new System.Drawing.Size(56, 27);
|
||||||
|
this.CancelBtn.TabIndex = 4;
|
||||||
|
this.CancelBtn.Text = "取消";
|
||||||
|
this.CancelBtn.UseVisualStyleBackColor = false;
|
||||||
|
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
|
//
|
||||||
|
// SaveAsWindow
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.ClientSize = new System.Drawing.Size(468, 163);
|
||||||
|
this.Controls.Add(this.CancelBtn);
|
||||||
|
this.Controls.Add(this.OkBtn);
|
||||||
|
this.Controls.Add(this.PathTextBox);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.SelectPathBtn);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "SaveAsWindow";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "另存为";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button SelectPathBtn;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox PathTextBox;
|
||||||
|
private System.Windows.Forms.Button OkBtn;
|
||||||
|
private System.Windows.Forms.Button CancelBtn;
|
||||||
|
}
|
||||||
|
}
|
||||||
81
mainProgram/SaveAs.cs
Normal file
81
mainProgram/SaveAs.cs
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace mainProgram
|
||||||
|
{
|
||||||
|
public partial class SaveAsWindow : Form
|
||||||
|
{
|
||||||
|
private string mSource;
|
||||||
|
public SaveAsWindow(string source)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
mSource = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectPathBtn_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;
|
||||||
|
PathTextBox.Text = savePath;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CancelBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OkBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(PathTextBox.Text))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(PathTextBox.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
CopySubFun(mSource, PathTextBox.Text, true);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CopySubFun(string sourceName, string destFolderName, bool overwrite)//递归函数
|
||||||
|
{
|
||||||
|
if (File.Exists(sourceName))//是文件,直接拷贝
|
||||||
|
{
|
||||||
|
string sourceFileName = Path.GetFileName(sourceName);//获取文件名
|
||||||
|
File.Copy(sourceName, Path.Combine(destFolderName, sourceFileName), overwrite);
|
||||||
|
}
|
||||||
|
else if (Directory.Exists(sourceName))//是文件夹,拷贝文件夹;并递归
|
||||||
|
{
|
||||||
|
string[] sourceFolders = sourceName.Split('\\');
|
||||||
|
string lastDirectory = sourceFolders[sourceFolders.Length - 1];
|
||||||
|
string dest = Path.Combine(destFolderName, lastDirectory);
|
||||||
|
Directory.CreateDirectory(dest);
|
||||||
|
|
||||||
|
string[] sourceFilesPath = Directory.GetFileSystemEntries(sourceName);
|
||||||
|
for (int i = 0; i < sourceFilesPath.Length; i++)
|
||||||
|
{
|
||||||
|
string sourceFilePath = sourceFilesPath[i];
|
||||||
|
|
||||||
|
CopySubFun(sourceFilePath, dest, overwrite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1253
mainProgram/SaveAs.resx
Normal file
1253
mainProgram/SaveAs.resx
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>leaf.ico</ApplicationIcon>
|
<ApplicationIcon>
|
||||||
|
</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="IronPython, Version=2.7.11.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
|
<Reference Include="IronPython, Version=2.7.11.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
|
||||||
@ -75,12 +76,24 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="AboutWindows.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AboutWindows.Designer.cs">
|
||||||
|
<DependentUpon>AboutWindows.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Form1.cs">
|
<Compile Include="Form1.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form1.Designer.cs">
|
<Compile Include="Form1.Designer.cs">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Form2.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Form2.Designer.cs">
|
||||||
|
<DependentUpon>Form2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="NewProjectWindow.cs">
|
<Compile Include="NewProjectWindow.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -102,6 +115,11 @@
|
|||||||
<DependentUpon>ProjectManagerWindow.cs</DependentUpon>
|
<DependentUpon>ProjectManagerWindow.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="RadCorrectionWindow.cs">
|
<Compile Include="RadCorrectionWindow.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -121,9 +139,15 @@
|
|||||||
<Compile Include="SVDWindows.Designer.cs">
|
<Compile Include="SVDWindows.Designer.cs">
|
||||||
<DependentUpon>SVDWindows.cs</DependentUpon>
|
<DependentUpon>SVDWindows.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<EmbeddedResource Include="AboutWindows.resx">
|
||||||
|
<DependentUpon>AboutWindows.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Form1.resx">
|
<EmbeddedResource Include="Form1.resx">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Form2.resx">
|
||||||
|
<DependentUpon>Form2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="NewProjectWindow.resx">
|
<EmbeddedResource Include="NewProjectWindow.resx">
|
||||||
<DependentUpon>NewProjectWindow.cs</DependentUpon>
|
<DependentUpon>NewProjectWindow.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -135,13 +159,9 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="RadCorrectionWindow.resx">
|
<EmbeddedResource Include="RadCorrectionWindow.resx">
|
||||||
<DependentUpon>RadCorrectionWindow.cs</DependentUpon>
|
<DependentUpon>RadCorrectionWindow.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@ -183,7 +203,10 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="leaf.ico" />
|
<None Include="Resources\EasySif_logo1.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\IRIS LOG2.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
5
mainProgram/packages.config
Normal file
5
mainProgram/packages.config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="DynamicLanguageRuntime" version="1.3.0" targetFramework="net472" />
|
||||||
|
<package id="IronPython" version="2.7.11" targetFramework="net472" />
|
||||||
|
</packages>
|
||||||
Reference in New Issue
Block a user