📄 addform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Globalization;
namespace SourceManager
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class AddForm : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button button_openfile;
private System.Windows.Forms.TextBox textBox_SourceFile;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.TextBox textBox_sourceNum;
private System.Windows.Forms.TextBox textBox_Cdata;
private System.Windows.Forms.ComboBox comboBox_Lan;
private System.Windows.Forms.ComboBox comboBox_class;
private System.Windows.Forms.ComboBox comboBox_form;
private System.Windows.Forms.ComboBox comboBox_plat;
private System.Windows.Forms.Button button_OK;
private System.Windows.Forms.Button button_close;
private System.Windows.Forms.TextBox textBox_dict;
private System.Windows.Forms.TextBox textBox_func;
private System.Windows.Forms.TextBox textBox_key;
private System.Data.OleDb.OleDbConnection connection;
public AddForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(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.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.textBox_func = new System.Windows.Forms.TextBox();
this.button_openfile = new System.Windows.Forms.Button();
this.textBox_SourceFile = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.textBox_dict = new System.Windows.Forms.TextBox();
this.textBox_key = new System.Windows.Forms.TextBox();
this.comboBox_plat = new System.Windows.Forms.ComboBox();
this.comboBox_form = new System.Windows.Forms.ComboBox();
this.comboBox_class = new System.Windows.Forms.ComboBox();
this.comboBox_Lan = new System.Windows.Forms.ComboBox();
this.textBox_Cdata = new System.Windows.Forms.TextBox();
this.textBox_sourceNum = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.button_OK = new System.Windows.Forms.Button();
this.button_close = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.textBox_func);
this.groupBox1.Controls.Add(this.button_openfile);
this.groupBox1.Controls.Add(this.textBox_SourceFile);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.textBox_dict);
this.groupBox1.Controls.Add(this.textBox_key);
this.groupBox1.Controls.Add(this.comboBox_plat);
this.groupBox1.Controls.Add(this.comboBox_form);
this.groupBox1.Controls.Add(this.comboBox_class);
this.groupBox1.Controls.Add(this.comboBox_Lan);
this.groupBox1.Controls.Add(this.textBox_Cdata);
this.groupBox1.Controls.Add(this.textBox_sourceNum);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(8, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(408, 344);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "输入代码信息";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// checkBox1
//
this.checkBox1.Location = new System.Drawing.Point(16, 184);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(152, 20);
this.checkBox1.TabIndex = 23;
this.checkBox1.Text = "存在头文件";
//
// textBox_func
//
this.textBox_func.Location = new System.Drawing.Point(16, 238);
this.textBox_func.Multiline = true;
this.textBox_func.Name = "textBox_func";
this.textBox_func.Size = new System.Drawing.Size(352, 98);
this.textBox_func.TabIndex = 22;
this.textBox_func.Text = "";
//
// button_openfile
//
this.button_openfile.Font = new System.Drawing.Font("SimSun", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button_openfile.Location = new System.Drawing.Point(371, 22);
this.button_openfile.Name = "button_openfile";
this.button_openfile.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.button_openfile.Size = new System.Drawing.Size(30, 24);
this.button_openfile.TabIndex = 21;
this.button_openfile.Text = "...";
this.button_openfile.Click += new System.EventHandler(this.button_openfile_Click);
//
// textBox_SourceFile
//
this.textBox_SourceFile.Location = new System.Drawing.Point(80, 24);
this.textBox_SourceFile.Name = "textBox_SourceFile";
this.textBox_SourceFile.Size = new System.Drawing.Size(288, 21);
this.textBox_SourceFile.TabIndex = 20;
this.textBox_SourceFile.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(16, 26);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 16);
this.label5.TabIndex = 19;
this.label5.Text = "代码文件";
//
// textBox_dict
//
this.textBox_dict.Location = new System.Drawing.Point(248, 152);
this.textBox_dict.Name = "textBox_dict";
this.textBox_dict.ReadOnly = true;
this.textBox_dict.Size = new System.Drawing.Size(120, 21);
this.textBox_dict.TabIndex = 18;
this.textBox_dict.Text = "";
//
// textBox_key
//
this.textBox_key.Location = new System.Drawing.Point(248, 120);
this.textBox_key.Name = "textBox_key";
this.textBox_key.Size = new System.Drawing.Size(120, 21);
this.textBox_key.TabIndex = 17;
this.textBox_key.Text = "";
//
// comboBox_plat
//
this.comboBox_plat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_plat.Location = new System.Drawing.Point(248, 88);
this.comboBox_plat.Name = "comboBox_plat";
this.comboBox_plat.Size = new System.Drawing.Size(120, 20);
this.comboBox_plat.TabIndex = 16;
//
// comboBox_form
//
this.comboBox_form.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_form.Location = new System.Drawing.Point(80, 152);
this.comboBox_form.Name = "comboBox_form";
this.comboBox_form.Size = new System.Drawing.Size(88, 20);
this.comboBox_form.TabIndex = 15;
//
// comboBox_class
//
this.comboBox_class.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_class.Location = new System.Drawing.Point(80, 120);
this.comboBox_class.Name = "comboBox_class";
this.comboBox_class.Size = new System.Drawing.Size(88, 20);
this.comboBox_class.TabIndex = 14;
//
// comboBox_Lan
//
this.comboBox_Lan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_Lan.Location = new System.Drawing.Point(80, 88);
this.comboBox_Lan.Name = "comboBox_Lan";
this.comboBox_Lan.Size = new System.Drawing.Size(88, 20);
this.comboBox_Lan.TabIndex = 13;
this.comboBox_Lan.SelectedIndexChanged += new System.EventHandler(this.comboBox_Lan_SelectedIndexChanged);
//
// textBox_Cdata
//
this.textBox_Cdata.Location = new System.Drawing.Point(248, 53);
this.textBox_Cdata.Name = "textBox_Cdata";
this.textBox_Cdata.ReadOnly = true;
this.textBox_Cdata.Size = new System.Drawing.Size(120, 21);
this.textBox_Cdata.TabIndex = 12;
this.textBox_Cdata.Text = "";
//
// textBox_sourceNum
//
this.textBox_sourceNum.ForeColor = System.Drawing.Color.Red;
this.textBox_sourceNum.Location = new System.Drawing.Point(80, 54);
this.textBox_sourceNum.Name = "textBox_sourceNum";
this.textBox_sourceNum.ReadOnly = true;
this.textBox_sourceNum.Size = new System.Drawing.Size(88, 21);
this.textBox_sourceNum.TabIndex = 11;
this.textBox_sourceNum.Text = "";
//
// label10
//
this.label10.Location = new System.Drawing.Point(16, 216);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(64, 16);
this.label10.TabIndex = 9;
this.label10.Text = "功能简述";
//
// label9
//
this.label9.Location = new System.Drawing.Point(176, 155);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(64, 21);
this.label9.TabIndex = 8;
this.label9.Text = "保存路径";
//
// label8
//
this.label8.Location = new System.Drawing.Point(176, 91);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(64, 24);
this.label8.TabIndex = 7;
this.label8.Text = "运行平台";
//
// label7
//
this.label7.Location = new System.Drawing.Point(16, 155);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 16);
this.label7.TabIndex = 6;
this.label7.Text = "类别";
//
// label6
//
this.label6.Location = new System.Drawing.Point(176, 123);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 13);
this.label6.TabIndex = 5;
this.label6.Text = "关键词";
//
// label4
//
this.label4.Location = new System.Drawing.Point(176, 58);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 24);
this.label4.TabIndex = 3;
this.label4.Text = "添加日期";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 123);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 13);
this.label3.TabIndex = 2;
this.label3.Text = "所属领域";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 91);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 24);
this.label2.TabIndex = 1;
this.label2.Text = "代码语言";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 24);
this.label1.TabIndex = 0;
this.label1.Text = "代码编号";
//
// button_OK
//
this.button_OK.Location = new System.Drawing.Point(136, 360);
this.button_OK.Name = "button_OK";
this.button_OK.Size = new System.Drawing.Size(80, 24);
this.button_OK.TabIndex = 1;
this.button_OK.Text = "添加";
this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
//
// button_close
//
this.button_close.Location = new System.Drawing.Point(216, 360);
this.button_close.Name = "button_close";
this.button_close.Size = new System.Drawing.Size(80, 24);
this.button_close.TabIndex = 2;
this.button_close.Text = "关闭";
this.button_close.Click += new System.EventHandler(this.button_close_Click);
//
// AddForm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -