first commit

This commit is contained in:
2021-12-14 18:39:55 +08:00
commit c0aaf7a897
43 changed files with 1956 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
./0easySifProject
./0sifRawData
./MyComputers.xml

25
easySif.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1267
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mainProgram", "mainProgram\mainProgram.csproj", "{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {42A0C5CF-6279-4EF7-B02F-952117CEC735}
EndGlobalSection
EndGlobal

6
mainProgram/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

142
mainProgram/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,142 @@
namespace mainProgram
{
partial class main
{
/// <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 Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NewProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.OpenProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.preprocessToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sifComputeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.preprocessToolStripMenuItem,
this.sifComputeToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(800, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.NewProjectToolStripMenuItem,
this.OpenProjectToolStripMenuItem,
this.addToolStripMenuItem,
this.SaveProjectToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(39, 21);
this.fileToolStripMenuItem.Text = "File";
//
// NewProjectToolStripMenuItem
//
this.NewProjectToolStripMenuItem.Name = "NewProjectToolStripMenuItem";
this.NewProjectToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.NewProjectToolStripMenuItem.Text = "New";
this.NewProjectToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// OpenProjectToolStripMenuItem
//
this.OpenProjectToolStripMenuItem.Name = "OpenProjectToolStripMenuItem";
this.OpenProjectToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.OpenProjectToolStripMenuItem.Text = "Open";
this.OpenProjectToolStripMenuItem.Click += new System.EventHandler(this.OpenProjectToolStripMenuItem_Click);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.addToolStripMenuItem.Text = "Add";
//
// SaveProjectToolStripMenuItem
//
this.SaveProjectToolStripMenuItem.Name = "SaveProjectToolStripMenuItem";
this.SaveProjectToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.SaveProjectToolStripMenuItem.Text = "Save";
//
// preprocessToolStripMenuItem
//
this.preprocessToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.RadToolStripMenuItem});
this.preprocessToolStripMenuItem.Name = "preprocessToolStripMenuItem";
this.preprocessToolStripMenuItem.Size = new System.Drawing.Size(85, 21);
this.preprocessToolStripMenuItem.Text = "Preprocess";
//
// RadToolStripMenuItem
//
this.RadToolStripMenuItem.Name = "RadToolStripMenuItem";
this.RadToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.RadToolStripMenuItem.Text = "Rad";
this.RadToolStripMenuItem.Click += new System.EventHandler(this.RadToolStripMenuItem_Click);
//
// sifComputeToolStripMenuItem
//
this.sifComputeToolStripMenuItem.Name = "sifComputeToolStripMenuItem";
this.sifComputeToolStripMenuItem.Size = new System.Drawing.Size(87, 21);
this.sifComputeToolStripMenuItem.Text = "SifCompute";
//
// main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "main";
this.Text = "easySif";
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem NewProjectToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem OpenProjectToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveProjectToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem preprocessToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem RadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sifComputeToolStripMenuItem;
}
}

51
mainProgram/Form1.cs Normal file
View File

@ -0,0 +1,51 @@
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 main : Form
{
public main()
{
InitializeComponent();
}
private ProjectManager mProjectManager;//保存打开的/新建的工程对象
public void RecieveProjectManager(ProjectManager value)
{
mProjectManager = value;
Console.WriteLine("工程文件目录为:" + mProjectManager.ProjectPath + "---------------------");
}
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
NewProjectWindow w = new NewProjectWindow();
w.TransferEvent += RecieveProjectManager;
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void OpenProjectToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenProjectWindow w = new OpenProjectWindow();
//w.Show();//不阻塞
w.ShowDialog();//阻塞
}
private void RadToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}

123
mainProgram/Form1.resx Normal file
View 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="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

146
mainProgram/NewProjectWindow.Designer.cs generated Normal file
View File

@ -0,0 +1,146 @@
namespace mainProgram
{
partial class NewProjectWindow
{
/// <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.label1 = new System.Windows.Forms.Label();
this.ProjectPathTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.CreateProjectBtn = new System.Windows.Forms.Button();
this.Cancel = new System.Windows.Forms.Button();
this.DataPathTextBox = new System.Windows.Forms.TextBox();
this.SelectDataPathBtn = new System.Windows.Forms.Button();
this.SelectProjectPathBtn = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(143, 63);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "工程路径";
//
// ProjectPathTextBox
//
this.ProjectPathTextBox.Location = new System.Drawing.Point(217, 53);
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
this.ProjectPathTextBox.ReadOnly = true;
this.ProjectPathTextBox.Size = new System.Drawing.Size(205, 21);
this.ProjectPathTextBox.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(143, 113);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 2;
this.label2.Text = "数据路径";
//
// CreateProjectBtn
//
this.CreateProjectBtn.Location = new System.Drawing.Point(157, 230);
this.CreateProjectBtn.Name = "CreateProjectBtn";
this.CreateProjectBtn.Size = new System.Drawing.Size(75, 23);
this.CreateProjectBtn.TabIndex = 3;
this.CreateProjectBtn.Text = "创建工程";
this.CreateProjectBtn.UseVisualStyleBackColor = true;
this.CreateProjectBtn.Click += new System.EventHandler(this.CreateProjectBtn_Click);
//
// Cancel
//
this.Cancel.Location = new System.Drawing.Point(397, 229);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 4;
this.Cancel.Text = "取消";
this.Cancel.UseVisualStyleBackColor = true;
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
//
// DataPathTextBox
//
this.DataPathTextBox.Location = new System.Drawing.Point(217, 104);
this.DataPathTextBox.Name = "DataPathTextBox";
this.DataPathTextBox.ReadOnly = true;
this.DataPathTextBox.Size = new System.Drawing.Size(205, 21);
this.DataPathTextBox.TabIndex = 1;
//
// SelectDataPathBtn
//
this.SelectDataPathBtn.Location = new System.Drawing.Point(461, 104);
this.SelectDataPathBtn.Name = "SelectDataPathBtn";
this.SelectDataPathBtn.Size = new System.Drawing.Size(75, 23);
this.SelectDataPathBtn.TabIndex = 4;
this.SelectDataPathBtn.Text = "选择";
this.SelectDataPathBtn.UseVisualStyleBackColor = true;
this.SelectDataPathBtn.Click += new System.EventHandler(this.SelectDataPathBtn_Click);
//
// SelectProjectPathBtn
//
this.SelectProjectPathBtn.Location = new System.Drawing.Point(461, 52);
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
this.SelectProjectPathBtn.Size = new System.Drawing.Size(75, 23);
this.SelectProjectPathBtn.TabIndex = 5;
this.SelectProjectPathBtn.Text = "选择";
this.SelectProjectPathBtn.UseVisualStyleBackColor = true;
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
//
// NewProjectWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.SelectProjectPathBtn);
this.Controls.Add(this.SelectDataPathBtn);
this.Controls.Add(this.Cancel);
this.Controls.Add(this.CreateProjectBtn);
this.Controls.Add(this.label2);
this.Controls.Add(this.DataPathTextBox);
this.Controls.Add(this.ProjectPathTextBox);
this.Controls.Add(this.label1);
this.Name = "NewProjectWindow";
this.Text = "创建工程";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox ProjectPathTextBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button CreateProjectBtn;
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.TextBox DataPathTextBox;
private System.Windows.Forms.Button SelectDataPathBtn;
private System.Windows.Forms.Button SelectProjectPathBtn;
}
}

View File

@ -0,0 +1,115 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace mainProgram
{
//子窗口向父窗口传递参数https://www.cnblogs.com/xcong/p/3386085.html
public delegate void transferProjectManagerDelegate(ProjectManager value);
public partial class NewProjectWindow : Form
{
public NewProjectWindow()
{
InitializeComponent();
}
public event transferProjectManagerDelegate TransferEvent;//申明事件
private void CreateProjectBtn_Click(object sender, EventArgs e)
{
//获取数据
string dataPath = DataPathTextBox.Text;
//string currPath = Application.StartupPath;
string projectPath = ProjectPathTextBox.Text;
if (dataPath != null && dataPath.Length == 0)
{
MessageBox.Show(this, "数据文件夹路径不能为空", "提示");
return;
}
if (projectPath != null && projectPath.Length == 0)
{
MessageBox.Show(this, "工程路径不能为空", "提示");
return;
}
ProjectManager projectManager = new ProjectManager(projectPath);
projectManager.CreateProjectStructure();
projectManager.CopyFileToFile(dataPath);//复制原始数据文件到工程结构对应文件夹
//ProjectManager xx = new ProjectManager();
////xml文件存储路径
//string myXMLFilePath = "D:\\csharp_vs2017\\easySif\\MyComputers.xml";
////生成xml文件
//xx.GenerateXMLFile(myXMLFilePath);
////遍历xml文件的信息
//xx.GetXMLInformation(myXMLFilePath);
////修改xml文件的信息
//xx.ModifyXmlInformation(myXMLFilePath);
////向xml文件添加节点信息
//xx.AddXmlInformation(myXMLFilePath);
////删除指定节点信息
//xx.DeleteXmlInformation(myXMLFilePath);
TransferEvent(projectManager);//触发事件
Close();//创建工程完成后,关闭窗口
}
private void SelectDataPathBtn_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;
DataPathTextBox.Text = savePath;
}
}
private void SelectProjectPathBtn_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;
ProjectPathTextBox.Text = savePath;
}
}
private void Cancel_Click(object sender, EventArgs e)
{
Close();
}
}
}

View 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>

110
mainProgram/OpenProjectWindow.Designer.cs generated Normal file
View File

@ -0,0 +1,110 @@
namespace mainProgram
{
partial class OpenProjectWindow
{
/// <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.ProjectPathTextBox = new System.Windows.Forms.TextBox();
this.OpenProjectPathBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SelectProjectPathBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// ProjectPathTextBox
//
this.ProjectPathTextBox.Location = new System.Drawing.Point(246, 133);
this.ProjectPathTextBox.Name = "ProjectPathTextBox";
this.ProjectPathTextBox.ReadOnly = true;
this.ProjectPathTextBox.Size = new System.Drawing.Size(163, 21);
this.ProjectPathTextBox.TabIndex = 0;
//
// OpenProjectPathBtn
//
this.OpenProjectPathBtn.Location = new System.Drawing.Point(206, 228);
this.OpenProjectPathBtn.Name = "OpenProjectPathBtn";
this.OpenProjectPathBtn.Size = new System.Drawing.Size(75, 23);
this.OpenProjectPathBtn.TabIndex = 2;
this.OpenProjectPathBtn.Text = "打开工程";
this.OpenProjectPathBtn.UseVisualStyleBackColor = true;
this.OpenProjectPathBtn.Click += new System.EventHandler(this.OpenProjectPathBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(162, 133);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 3;
this.label1.Text = "工程路径";
//
// SelectProjectPathBtn
//
this.SelectProjectPathBtn.Location = new System.Drawing.Point(432, 130);
this.SelectProjectPathBtn.Name = "SelectProjectPathBtn";
this.SelectProjectPathBtn.Size = new System.Drawing.Size(75, 23);
this.SelectProjectPathBtn.TabIndex = 4;
this.SelectProjectPathBtn.Text = "选择";
this.SelectProjectPathBtn.UseVisualStyleBackColor = true;
this.SelectProjectPathBtn.Click += new System.EventHandler(this.SelectProjectPathBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Location = new System.Drawing.Point(444, 227);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
this.CancelBtn.TabIndex = 5;
this.CancelBtn.Text = "取消";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// OpenProjectWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.SelectProjectPathBtn);
this.Controls.Add(this.label1);
this.Controls.Add(this.OpenProjectPathBtn);
this.Controls.Add(this.ProjectPathTextBox);
this.Name = "OpenProjectWindow";
this.Text = "打开工程";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox ProjectPathTextBox;
private System.Windows.Forms.Button OpenProjectPathBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button SelectProjectPathBtn;
private System.Windows.Forms.Button CancelBtn;
}
}

View File

@ -0,0 +1,35 @@
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 OpenProjectWindow : Form
{
public OpenProjectWindow()
{
InitializeComponent();
}
private void SelectProjectPathBtn_Click(object sender, EventArgs e)
{
}
private void OpenProjectPathBtn_Click(object sender, EventArgs e)
{
}
private void CancelBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

View 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>

22
mainProgram/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace mainProgram
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new main());
}
}
}

View File

@ -0,0 +1,322 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.IO;
namespace mainProgram
{
public class ProjectManager
{
public ProjectManager(string xx)
{
mProjectPath = xx;
}
private string mProjectPath;
private string mRawPath;
private string mRadPath;
private string mSifPath;
public string ProjectPath
{
get
{
return mProjectPath;
}
set
{
mProjectPath = value;
}
}
public void CreateProject()
{
//if (mProjectPath.Length==0)
//{
// return;
//}
}
public void OpenProject()
{
}
public void SaveProject()
{
}
public void AddData()
{
}
public void DeleteData()
{
}
//生成工程元数据
public void GenerateXMLFile(string xmlFilePath)
{
try
{
//初始化一个xml实例
XmlDocument myXmlDoc = new XmlDocument();
//创建xml的根节点
XmlElement rootElement = myXmlDoc.CreateElement("Computers");
//将根节点加入到xml文件中AppendChild
myXmlDoc.AppendChild(rootElement);
//初始化第一层的第一个子节点
XmlElement firstLevelElement1 = myXmlDoc.CreateElement("Computer");
//填充第一层的第一个子节点的属性值SetAttribute
firstLevelElement1.SetAttribute("ID", "11111111");
firstLevelElement1.SetAttribute("Description", "Made in China");
//将第一层的第一个子节点加入到根节点下
rootElement.AppendChild(firstLevelElement1);
//初始化第二层的第一个子节点
XmlElement secondLevelElement11 = myXmlDoc.CreateElement("name");
//填充第二层的第一个子节点的值InnerText
secondLevelElement11.InnerText = "Lenovo";
firstLevelElement1.AppendChild(secondLevelElement11);
XmlElement secondLevelElement12 = myXmlDoc.CreateElement("price");
secondLevelElement12.InnerText = "5000";
firstLevelElement1.AppendChild(secondLevelElement12);
XmlElement firstLevelElement2 = myXmlDoc.CreateElement("Computer");
firstLevelElement2.SetAttribute("ID", "2222222");
firstLevelElement2.SetAttribute("Description", "Made in USA");
rootElement.AppendChild(firstLevelElement2);
XmlElement secondLevelElement21 = myXmlDoc.CreateElement("name");
secondLevelElement21.InnerText = "IBM";
firstLevelElement2.AppendChild(secondLevelElement21);
XmlElement secondLevelElement22 = myXmlDoc.CreateElement("price");
secondLevelElement22.InnerText = "10000";
firstLevelElement2.AppendChild(secondLevelElement22);
//将xml文件保存到指定的路径下
myXmlDoc.Save(xmlFilePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
public void GetXMLInformation(string xmlFilePath)
{
try
{
XmlDocument myXmlDoc = new XmlDocument();//初始化一个xml实例
myXmlDoc.Load(xmlFilePath);//加载xml文件参数为xml文件的路径
XmlNode rootNode = myXmlDoc.SelectSingleNode("Computers");//获得第一个姓名匹配的节点SelectSingleNode此xml文件的根节点
string innerXmlInfo = rootNode.InnerXml.ToString();//分别获得该节点的InnerXml和OuterXml信息
string outerXmlInfo = rootNode.OuterXml.ToString();
XmlNodeList firstLevelNodeList = rootNode.ChildNodes;//获得该节点的子节点(即:该节点的第一层子节点)
foreach (XmlNode node in firstLevelNodeList)
{
XmlAttributeCollection attributeCol = node.Attributes;//获得该节点的属性集合
foreach (XmlAttribute attri in attributeCol)
{
//获取属性名称与属性值
string name = attri.Name;
string value = attri.Value;
Console.WriteLine("{0} = {1}", name, value);
}
//判断此节点是否还有子节点
if (node.HasChildNodes)
{
XmlNode secondLevelNode1 = node.FirstChild;//获取该节点的第一个子节点
string name = secondLevelNode1.Name;//获取该节点的名字
string innerText = secondLevelNode1.InnerText;//获取该节点的值InnerText
Console.WriteLine("{0} = {1}", name, innerText);
XmlNode secondLevelNode2 = node.ChildNodes[1];//获取该节点的第二个子节点(用数组下标获取)
name = secondLevelNode2.Name;
innerText = secondLevelNode2.InnerText;
Console.WriteLine("{0} = {1}", name, innerText);
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
public void ModifyXmlInformation(string xmlFilePath)
{
try
{
XmlDocument myXmlDoc = new XmlDocument();
myXmlDoc.Load(xmlFilePath);
XmlNode rootNode = myXmlDoc.FirstChild;
XmlNodeList firstLevelNodeList = rootNode.ChildNodes;
foreach (XmlNode node in firstLevelNodeList)
{
//修改此节点的属性值
if (node.Attributes["Description"].Value.Equals("Made in USA"))
{
node.Attributes["Description"].Value = "Made in HongKong";
}
}
//要想使对xml文件所做的修改生效必须执行以下Save方法
myXmlDoc.Save(xmlFilePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
public void AddXmlInformation(string xmlFilePath)
{
try
{
XmlDocument myXmlDoc = new XmlDocument();
myXmlDoc.Load(xmlFilePath);
//添加一个带有属性的节点信息
foreach (XmlNode node in myXmlDoc.FirstChild.ChildNodes)
{
XmlElement newElement = myXmlDoc.CreateElement("color");
newElement.InnerText = "black";
newElement.SetAttribute("IsMixed", "Yes");
node.AppendChild(newElement);
}
//保存更改
myXmlDoc.Save(xmlFilePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
public void DeleteXmlInformation(string xmlFilePath)
{
try
{
XmlDocument myXmlDoc = new XmlDocument();
myXmlDoc.Load(xmlFilePath);
foreach (XmlNode node in myXmlDoc.FirstChild.ChildNodes)
{
//记录该节点下的最后一个子节点(简称:最后子节点)
XmlNode lastNode = node.LastChild;
//删除最后子节点下的左右子节点
lastNode.RemoveAll();
//删除最后子节点
node.RemoveChild(lastNode);
}
//保存对xml文件所做的修改
myXmlDoc.Save(xmlFilePath);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
//文件复制实现https://www.cnblogs.com/sun-shadow/p/7553556.html
public void CopyFileToFile(string sourceFolderName)//CopyFileToFile
{
if (Directory.Exists(mRawPath))
{
DelectDir(mRawPath);
}
CopySubFun(sourceFolderName, mRawPath, true);
}
private void CopySubFun(string sourceFolderName, string destFolderName, bool overwrite)
{
if (!Directory.Exists(sourceFolderName))
{
return;
}
if (!Directory.Exists(destFolderName))
{
Directory.CreateDirectory(destFolderName);
}
string[] sourceFilesPath = Directory.GetFileSystemEntries(sourceFolderName);
for (int i = 0; i < sourceFilesPath.Length; i++)
{
string sourceFilePath = (sourceFilesPath[i]).Replace("\\", "/");
string[] forlders = sourceFilePath.Split('/');
if (File.Exists(sourceFilePath))//是文件,直接拷贝
{
string dest = destFolderName;
string sourceFileName = Path.GetFileName(sourceFilePath);
File.Copy(sourceFilePath, Path.Combine(dest, sourceFileName), overwrite);
}
else if (Directory.Exists(sourceFilePath))//是文件夹,拷贝文件夹;并递归
{
string lastDirectory = forlders[forlders.Length - 1];
string dest = Path.Combine(destFolderName, lastDirectory).Replace("\\", "/");
if (!Directory.Exists(dest))
{
Directory.CreateDirectory(dest);
}
CopySubFun(sourceFilePath, dest, overwrite);
}
}
}
private void DelectDir(string srcPath)
{
DirectoryInfo dir = new DirectoryInfo(srcPath);
FileSystemInfo[] fileinfo = dir.GetFileSystemInfos(); //返回目录中所有文件和子目录
foreach (FileSystemInfo i in fileinfo)
{
if (i is DirectoryInfo) //判断是否文件夹
{
DirectoryInfo subdir = new DirectoryInfo(i.FullName);
subdir.Delete(true); //删除子目录和文件
}
else
{
File.Delete(i.FullName); //删除指定文件
}
}
}
//工程结构
public void CreateProjectStructure()
{
//创建工程文件夹结构
mRawPath = mProjectPath + "/raw/";
mRadPath = mProjectPath + "/rad/";
mSifPath = mProjectPath + "/sif/";
if (false == Directory.Exists(mRawPath))
{
Directory.CreateDirectory(mRawPath);
}
if (false == Directory.Exists(mRadPath))
{
Directory.CreateDirectory(mRadPath);
}
if (false == Directory.Exists(mSifPath))
{
Directory.CreateDirectory(mSifPath);
}
}
}
}

View File

@ -0,0 +1,70 @@
namespace mainProgram
{
partial class ProjectManagerWindow
{
/// <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.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(156, 85);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 0;
this.label1.Text = "工程名";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(341, 76);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 21);
this.textBox1.TabIndex = 1;
//
// ProjectManagerWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Name = "ProjectManagerWindow";
this.Text = "ProjectManagerWindow";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
}
}

View 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 ProjectManagerWindow : Form
{
public ProjectManagerWindow()
{
InitializeComponent();
}
}
}

View 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>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("mainProgram")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("mainProgram")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("01fe58bf-6b60-4eda-af9b-0a98d3c0b954")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace mainProgram.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mainProgram.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 覆盖当前线程的 CurrentUICulture 属性
/// 使用此强类型的资源类的资源查找。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mainProgram.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace mainProgram
{
class SpectralProcessor
{
}
}

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

Binary file not shown.

View File

@ -0,0 +1,113 @@
<?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>{01FE58BF-6B60-4EDA-AF9B-0A98D3C0B954}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>mainProgram</RootNamespace>
<AssemblyName>mainProgram</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="NewProjectWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewProjectWindow.Designer.cs">
<DependentUpon>NewProjectWindow.cs</DependentUpon>
</Compile>
<Compile Include="OpenProjectWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OpenProjectWindow.Designer.cs">
<DependentUpon>OpenProjectWindow.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="ProjectManager.cs" />
<Compile Include="ProjectManagerWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProjectManagerWindow.Designer.cs">
<DependentUpon>ProjectManagerWindow.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SpectralProcessor.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewProjectWindow.resx">
<DependentUpon>NewProjectWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OpenProjectWindow.resx">
<DependentUpon>OpenProjectWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProjectManagerWindow.resx">
<DependentUpon>ProjectManagerWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1 @@
7dc7907b9853e35973e35c6121d47468f84fe1a6

View File

@ -0,0 +1,13 @@
D:\csharp_vs2017\easySif\mainProgram\bin\Debug\mainProgram.exe.config
D:\csharp_vs2017\easySif\mainProgram\bin\Debug\mainProgram.exe
D:\csharp_vs2017\easySif\mainProgram\bin\Debug\mainProgram.pdb
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.csprojAssemblyReference.cache
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.Properties.Resources.resources
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.csproj.GenerateResource.cache
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.csproj.CoreCompileInputs.cache
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.exe
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.pdb
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.main.resources
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.NewProjectWindow.resources
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.ProjectManagerWindow.resources
D:\csharp_vs2017\easySif\mainProgram\obj\Debug\mainProgram.OpenProjectWindow.resources

Binary file not shown.

Binary file not shown.

Binary file not shown.