Commit 53f18a5e authored by 247321453's avatar 247321453

命令行

parent 7ca095ca
......@@ -44,5 +44,10 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -35,12 +35,196 @@ protected override void Dispose(bool disposing)
/// </summary>
private void InitializeComponent()
{
this.lv_cardlist = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.ms_main = new System.Windows.Forms.MenuStrip();
this.文件FToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.打开OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.新建NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.保存SCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.编辑EToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.撤销UToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.还原YToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.添加AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.修改MToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除DToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.新建NToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.检查更新ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ms_main.SuspendLayout();
this.SuspendLayout();
//
// lv_cardlist
//
this.lv_cardlist.Activation = System.Windows.Forms.ItemActivation.OneClick;
this.lv_cardlist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2});
this.lv_cardlist.FullRowSelect = true;
this.lv_cardlist.GridLines = true;
this.lv_cardlist.HideSelection = false;
this.lv_cardlist.HotTracking = true;
this.lv_cardlist.HoverSelection = true;
this.lv_cardlist.Location = new System.Drawing.Point(0, 25);
this.lv_cardlist.Name = "lv_cardlist";
this.lv_cardlist.Size = new System.Drawing.Size(187, 388);
this.lv_cardlist.TabIndex = 0;
this.lv_cardlist.UseCompatibleStateImageBehavior = false;
this.lv_cardlist.View = System.Windows.Forms.View.Details;
//
// columnHeader1
//
this.columnHeader1.Width = 62;
//
// columnHeader2
//
this.columnHeader2.Width = 79;
//
// ms_main
//
this.ms_main.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.文件FToolStripMenuItem,
this.编辑EToolStripMenuItem,
this.帮助ToolStripMenuItem});
this.ms_main.Location = new System.Drawing.Point(0, 0);
this.ms_main.Name = "ms_main";
this.ms_main.Size = new System.Drawing.Size(681, 25);
this.ms_main.TabIndex = 1;
this.ms_main.Text = "menuStrip1";
//
// 文件FToolStripMenuItem
//
this.文件FToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.打开OToolStripMenuItem,
this.新建NToolStripMenuItem,
this.保存SCToolStripMenuItem});
this.文件FToolStripMenuItem.Name = "文件FToolStripMenuItem";
this.文件FToolStripMenuItem.Size = new System.Drawing.Size(70, 21);
this.文件FToolStripMenuItem.Text = "数据库(&F)";
//
// 打开OToolStripMenuItem
//
this.打开OToolStripMenuItem.Name = "打开OToolStripMenuItem";
this.打开OToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.打开OToolStripMenuItem.Text = "打开(&O)";
//
// 新建NToolStripMenuItem
//
this.新建NToolStripMenuItem.Name = "新建NToolStripMenuItem";
this.新建NToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.新建NToolStripMenuItem.Text = "新建(&N)";
//
// 保存SCToolStripMenuItem
//
this.保存SCToolStripMenuItem.Name = "保存SCToolStripMenuItem";
this.保存SCToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.保存SCToolStripMenuItem.Text = "保存(&S)";
//
// 编辑EToolStripMenuItem
//
this.编辑EToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.撤销UToolStripMenuItem,
this.还原YToolStripMenuItem,
this.添加AToolStripMenuItem,
this.修改MToolStripMenuItem,
this.删除DToolStripMenuItem,
this.新建NToolStripMenuItem1});
this.编辑EToolStripMenuItem.Name = "编辑EToolStripMenuItem";
this.编辑EToolStripMenuItem.Size = new System.Drawing.Size(59, 21);
this.编辑EToolStripMenuItem.Text = "编辑(&E)";
//
// 撤销UToolStripMenuItem
//
this.撤销UToolStripMenuItem.Name = "撤销UToolStripMenuItem";
this.撤销UToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.撤销UToolStripMenuItem.Text = "撤销(&U)";
//
// 还原YToolStripMenuItem
//
this.还原YToolStripMenuItem.Name = "还原YToolStripMenuItem";
this.还原YToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.还原YToolStripMenuItem.Text = "还原(&Y)";
//
// 添加AToolStripMenuItem
//
this.添加AToolStripMenuItem.Name = "添加AToolStripMenuItem";
this.添加AToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.添加AToolStripMenuItem.Text = "添加(&A)";
//
// 修改MToolStripMenuItem
//
this.修改MToolStripMenuItem.Name = "修改MToolStripMenuItem";
this.修改MToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.修改MToolStripMenuItem.Text = "修改(&M)";
//
// 删除DToolStripMenuItem
//
this.删除DToolStripMenuItem.Name = "删除DToolStripMenuItem";
this.删除DToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.删除DToolStripMenuItem.Text = "删除(&D)";
//
// 新建NToolStripMenuItem1
//
this.新建NToolStripMenuItem1.Name = "新建NToolStripMenuItem1";
this.新建NToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
this.新建NToolStripMenuItem1.Text = "新建(&N)";
//
// 帮助ToolStripMenuItem
//
this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.关于ToolStripMenuItem,
this.检查更新ToolStripMenuItem});
this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.帮助ToolStripMenuItem.Text = "帮助";
//
// 关于ToolStripMenuItem
//
this.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.关于ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.关于ToolStripMenuItem.Text = "关于";
//
// 检查更新ToolStripMenuItem
//
this.检查更新ToolStripMenuItem.Name = "检查更新ToolStripMenuItem";
this.检查更新ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.检查更新ToolStripMenuItem.Text = "检查更新";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "DataEditorX";
this.ClientSize = new System.Drawing.Size(681, 479);
this.Controls.Add(this.lv_cardlist);
this.Controls.Add(this.ms_main);
this.MainMenuStrip = this.ms_main;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "DataEditorX";
this.ms_main.ResumeLayout(false);
this.ms_main.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem 检查更新ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 关于ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 新建NToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem 删除DToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 修改MToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 添加AToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 还原YToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 撤销UToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 编辑EToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 保存SCToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 新建NToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 打开OToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 文件FToolStripMenuItem;
private System.Windows.Forms.MenuStrip ms_main;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ListView lv_cardlist;
}
}
......@@ -17,15 +17,26 @@ namespace DataEditorX
/// </summary>
public partial class MainForm : Form
{
string m_filename;
string m_title;
public MainForm(string filename)
{
InitFromData();
OpenFile(filename);
}
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitFromData();
}
void InitFromData()
{
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
m_title=this.Text;
}
void OpenFile(string filename)
{
m_filename=filename;
this.Text=filename+" - "+m_title;
//
}
}
......
<?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=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>
<metadata name="ms_main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -23,8 +23,10 @@ private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
if(args.Length==1)
Application.Run(new MainForm(args[0]));
else
Application.Run(new MainForm());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment