initial commit
This commit is contained in:
6
sample/App.config
Normal file
6
sample/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
447
sample/Form1.Designer.cs
generated
Normal file
447
sample/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,447 @@
|
||||
namespace SampleProject
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <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 Form 디자이너에서 생성한 코드
|
||||
|
||||
/// <summary>
|
||||
/// 디자이너 지원에 필요한 메서드입니다.
|
||||
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.rtRx = new System.Windows.Forms.RichTextBox();
|
||||
this.rtTx = new System.Windows.Forms.RichTextBox();
|
||||
this.tbmsg = new System.Windows.Forms.TextBox();
|
||||
this.btsend = new System.Windows.Forms.Button();
|
||||
this.cmbport = new System.Windows.Forms.ComboBox();
|
||||
this.btconnect = new System.Windows.Forms.Button();
|
||||
this.tbbaud = new System.Windows.Forms.ComboBox();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.sbPort = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.cmbid = new System.Windows.Forms.ComboBox();
|
||||
this.btsim = new System.Windows.Forms.Button();
|
||||
this.rtMsg = new System.Windows.Forms.RichTextBox();
|
||||
this.tbCmd = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.rtCmd = new System.Windows.Forms.RichTextBox();
|
||||
this.btload = new System.Windows.Forms.Button();
|
||||
this.btSave = new System.Windows.Forms.Button();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// rtRx
|
||||
//
|
||||
this.rtRx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rtRx.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.rtRx.Location = new System.Drawing.Point(4, 5);
|
||||
this.rtRx.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.rtRx.Name = "rtRx";
|
||||
this.rtRx.Size = new System.Drawing.Size(462, 318);
|
||||
this.rtRx.TabIndex = 0;
|
||||
this.rtRx.Text = "";
|
||||
//
|
||||
// rtTx
|
||||
//
|
||||
this.rtTx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rtTx.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.rtTx.Location = new System.Drawing.Point(474, 5);
|
||||
this.rtTx.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.rtTx.Name = "rtTx";
|
||||
this.rtTx.Size = new System.Drawing.Size(462, 318);
|
||||
this.rtTx.TabIndex = 1;
|
||||
this.rtTx.Text = "";
|
||||
//
|
||||
// tbmsg
|
||||
//
|
||||
this.tbmsg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
||||
this.tbmsg.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbmsg.Font = new System.Drawing.Font("굴림", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.tbmsg.Location = new System.Drawing.Point(436, 5);
|
||||
this.tbmsg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbmsg.Name = "tbmsg";
|
||||
this.tbmsg.Size = new System.Drawing.Size(273, 44);
|
||||
this.tbmsg.TabIndex = 2;
|
||||
this.tbmsg.Text = "mesage";
|
||||
this.tbmsg.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.tbmsg.TextChanged += new System.EventHandler(this.tbmsg_TextChanged);
|
||||
//
|
||||
// btsend
|
||||
//
|
||||
this.btsend.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btsend.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.btsend.Location = new System.Drawing.Point(709, 5);
|
||||
this.btsend.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.btsend.Name = "btsend";
|
||||
this.btsend.Size = new System.Drawing.Size(120, 42);
|
||||
this.btsend.TabIndex = 3;
|
||||
this.btsend.Text = "Send";
|
||||
this.btsend.UseVisualStyleBackColor = true;
|
||||
this.btsend.Click += new System.EventHandler(this.btsend_Click);
|
||||
//
|
||||
// cmbport
|
||||
//
|
||||
this.cmbport.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.cmbport.Font = new System.Drawing.Font("굴림", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.cmbport.FormattingEnabled = true;
|
||||
this.cmbport.Location = new System.Drawing.Point(58, 3);
|
||||
this.cmbport.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.cmbport.Name = "cmbport";
|
||||
this.cmbport.Size = new System.Drawing.Size(218, 40);
|
||||
this.cmbport.TabIndex = 4;
|
||||
//
|
||||
// btconnect
|
||||
//
|
||||
this.btconnect.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btconnect.Location = new System.Drawing.Point(765, 3);
|
||||
this.btconnect.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.btconnect.Name = "btconnect";
|
||||
this.btconnect.Size = new System.Drawing.Size(186, 40);
|
||||
this.btconnect.TabIndex = 5;
|
||||
this.btconnect.Text = "connect";
|
||||
this.btconnect.UseVisualStyleBackColor = true;
|
||||
this.btconnect.Click += new System.EventHandler(this.btconnect_Click);
|
||||
//
|
||||
// tbbaud
|
||||
//
|
||||
this.tbbaud.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.tbbaud.Font = new System.Drawing.Font("굴림", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.tbbaud.FormattingEnabled = true;
|
||||
this.tbbaud.Location = new System.Drawing.Point(331, 3);
|
||||
this.tbbaud.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbbaud.Name = "tbbaud";
|
||||
this.tbbaud.Size = new System.Drawing.Size(171, 40);
|
||||
this.tbbaud.TabIndex = 6;
|
||||
this.tbbaud.Text = "9600";
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.sbPort});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 583);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 20, 0);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(954, 22);
|
||||
this.statusStrip1.TabIndex = 7;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// sbPort
|
||||
//
|
||||
this.sbPort.Name = "sbPort";
|
||||
this.sbPort.Size = new System.Drawing.Size(121, 17);
|
||||
this.sbPort.Text = "toolStripStatusLabel1";
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// cmbid
|
||||
//
|
||||
this.cmbid.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.cmbid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbid.Font = new System.Drawing.Font("굴림", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.cmbid.FormattingEnabled = true;
|
||||
this.cmbid.Location = new System.Drawing.Point(60, 5);
|
||||
this.cmbid.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.cmbid.Name = "cmbid";
|
||||
this.cmbid.Size = new System.Drawing.Size(183, 40);
|
||||
this.cmbid.TabIndex = 8;
|
||||
//
|
||||
// btsim
|
||||
//
|
||||
this.btsim.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btsim.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.btsim.Location = new System.Drawing.Point(829, 5);
|
||||
this.btsim.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.btsim.Name = "btsim";
|
||||
this.btsim.Size = new System.Drawing.Size(120, 42);
|
||||
this.btsim.TabIndex = 9;
|
||||
this.btsim.Text = "Test";
|
||||
this.btsim.UseVisualStyleBackColor = true;
|
||||
this.btsim.Click += new System.EventHandler(this.btsim_Click);
|
||||
//
|
||||
// rtMsg
|
||||
//
|
||||
this.rtMsg.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.rtMsg.Location = new System.Drawing.Point(3, 331);
|
||||
this.rtMsg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.rtMsg.Name = "rtMsg";
|
||||
this.rtMsg.Size = new System.Drawing.Size(940, 118);
|
||||
this.rtMsg.TabIndex = 10;
|
||||
this.rtMsg.Text = "";
|
||||
//
|
||||
// tbCmd
|
||||
//
|
||||
this.tbCmd.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.tbCmd.Font = new System.Drawing.Font("굴림", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.tbCmd.Location = new System.Drawing.Point(298, 5);
|
||||
this.tbCmd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.tbCmd.Name = "tbCmd";
|
||||
this.tbCmd.Size = new System.Drawing.Size(83, 44);
|
||||
this.tbCmd.TabIndex = 11;
|
||||
this.tbCmd.Text = "cmd";
|
||||
this.tbCmd.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.rtRx, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.rtTx, 1, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(940, 328);
|
||||
this.tableLayoutPanel1.TabIndex = 12;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.tbmsg);
|
||||
this.panel1.Controls.Add(this.label5);
|
||||
this.panel1.Controls.Add(this.tbCmd);
|
||||
this.panel1.Controls.Add(this.label4);
|
||||
this.panel1.Controls.Add(this.cmbid);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.btsend);
|
||||
this.panel1.Controls.Add(this.btsim);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 531);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.panel1.Size = new System.Drawing.Size(954, 52);
|
||||
this.panel1.TabIndex = 13;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.tbbaud);
|
||||
this.panel2.Controls.Add(this.label2);
|
||||
this.panel2.Controls.Add(this.cmbport);
|
||||
this.panel2.Controls.Add(this.btconnect);
|
||||
this.panel2.Controls.Add(this.label1);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.panel2.Size = new System.Drawing.Size(954, 46);
|
||||
this.panel2.TabIndex = 14;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(55, 40);
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "port";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.label2.Location = new System.Drawing.Point(276, 3);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(55, 40);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "baud";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.label3.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(5, 5);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(55, 42);
|
||||
this.label3.TabIndex = 12;
|
||||
this.label3.Text = "ID\r\n(1)";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.label4.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.Location = new System.Drawing.Point(243, 5);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(55, 42);
|
||||
this.label4.TabIndex = 13;
|
||||
this.label4.Text = "CMD\r\n(1)";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.label5.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point(381, 5);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(55, 42);
|
||||
this.label5.TabIndex = 14;
|
||||
this.label5.Text = "DATA\r\n(n)";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 46);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(954, 485);
|
||||
this.tabControl1.TabIndex = 15;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.tableLayoutPanel1);
|
||||
this.tabPage1.Controls.Add(this.rtMsg);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 29);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(946, 452);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Test";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.btSave);
|
||||
this.tabPage2.Controls.Add(this.btload);
|
||||
this.tabPage2.Controls.Add(this.rtCmd);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 29);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(946, 452);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Command";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rtCmd
|
||||
//
|
||||
this.rtCmd.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rtCmd.Location = new System.Drawing.Point(3, 3);
|
||||
this.rtCmd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.rtCmd.Name = "rtCmd";
|
||||
this.rtCmd.Size = new System.Drawing.Size(940, 446);
|
||||
this.rtCmd.TabIndex = 11;
|
||||
this.rtCmd.Text = "";
|
||||
//
|
||||
// btload
|
||||
//
|
||||
this.btload.Location = new System.Drawing.Point(820, 15);
|
||||
this.btload.Name = "btload";
|
||||
this.btload.Size = new System.Drawing.Size(113, 29);
|
||||
this.btload.TabIndex = 12;
|
||||
this.btload.Text = "Load";
|
||||
this.btload.UseVisualStyleBackColor = true;
|
||||
this.btload.Click += new System.EventHandler(this.btload_Click);
|
||||
//
|
||||
// btSave
|
||||
//
|
||||
this.btSave.Location = new System.Drawing.Point(820, 50);
|
||||
this.btSave.Name = "btSave";
|
||||
this.btSave.Size = new System.Drawing.Size(113, 29);
|
||||
this.btSave.TabIndex = 13;
|
||||
this.btSave.Text = "Save";
|
||||
this.btSave.UseVisualStyleBackColor = true;
|
||||
this.btSave.Click += new System.EventHandler(this.btSave_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 19F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(954, 605);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "!!";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RichTextBox rtRx;
|
||||
private System.Windows.Forms.RichTextBox rtTx;
|
||||
private System.Windows.Forms.TextBox tbmsg;
|
||||
private System.Windows.Forms.Button btsend;
|
||||
private System.Windows.Forms.ComboBox cmbport;
|
||||
private System.Windows.Forms.Button btconnect;
|
||||
private System.Windows.Forms.ComboBox tbbaud;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel sbPort;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.ComboBox cmbid;
|
||||
private System.Windows.Forms.Button btsim;
|
||||
private System.Windows.Forms.RichTextBox rtMsg;
|
||||
private System.Windows.Forms.TextBox tbCmd;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.RichTextBox rtCmd;
|
||||
private System.Windows.Forms.Button btSave;
|
||||
private System.Windows.Forms.Button btload;
|
||||
}
|
||||
}
|
||||
|
||||
216
sample/Form1.cs
Normal file
216
sample/Form1.cs
Normal file
@@ -0,0 +1,216 @@
|
||||
using AR;
|
||||
using ENIG;
|
||||
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 SampleProject
|
||||
{
|
||||
enum messageType
|
||||
{
|
||||
rx,
|
||||
tx,
|
||||
normal,
|
||||
error
|
||||
}
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
System.IO.Ports.SerialPort dev;
|
||||
EEProtocol proto;
|
||||
Dictionary<string, byte> idlist;
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = $"Amkor ENIG Protocol Test (PanID:46A5, CH:17)";
|
||||
proto = new EEProtocol();
|
||||
proto.OnDataReceived += Proto_OnDataReceived;
|
||||
proto.OnMessage += Proto_OnMessage;
|
||||
dev = new System.IO.Ports.SerialPort();
|
||||
dev.ReadTimeout = 2000;
|
||||
dev.WriteTimeout = 1000;
|
||||
dev.DataReceived += (s1, e1) =>
|
||||
{
|
||||
var buffer = new byte[dev.BytesToRead];
|
||||
dev.Read(buffer, 0, buffer.Length);
|
||||
proto.ProcessReceivedData(buffer);
|
||||
};
|
||||
|
||||
idlist = new Dictionary<string, byte>();
|
||||
idlist.Add("ACS", 0);
|
||||
idlist.Add("AGV1", 10);
|
||||
idlist.Add("AGV2", 11);
|
||||
idlist.Add("BUFFER1", 20);
|
||||
idlist.Add("BUFFER2", 21);
|
||||
idlist.Add("BUFFER3", 22);
|
||||
idlist.Add("BUFFER4", 23);
|
||||
idlist.Add("BUFFER5", 24);
|
||||
idlist.Add("DOOR", 30);
|
||||
|
||||
this.cmbid.Items.Clear();
|
||||
foreach (var item in idlist)
|
||||
cmbid.Items.Add($"{item.Key}");
|
||||
|
||||
tbCmd.Text = "FF";
|
||||
tbmsg.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void Proto_OnDataReceived(object sender, EEProtocol.DataEventArgs e)
|
||||
{
|
||||
var hexstrRaw = e.ReceivedPacket.RawData.HexString();
|
||||
var hexstr = e.ReceivedPacket.Data.HexString();
|
||||
var cmd = e.ReceivedPacket.Command.ToString("X2");
|
||||
var id = e.ReceivedPacket.ID.ToString("X2");
|
||||
AddMessage($"{hexstrRaw}\nID:{id},CMD:{cmd},DATA:{hexstr}", messageType.rx);
|
||||
}
|
||||
private void Proto_OnMessage(object sender, EEProtocol.MessageEventArgs e)
|
||||
{
|
||||
AddMessage(e.Message);
|
||||
}
|
||||
|
||||
void AddMessage(string msg, messageType type = messageType.normal)
|
||||
{
|
||||
if(this.InvokeRequired)
|
||||
{
|
||||
this.BeginInvoke(new Action(() => AddMessage(msg, type)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == messageType.rx)
|
||||
{
|
||||
rtRx.AppendText($"<{DateTime.Now.ToString("HH:mm:ss")} RX> {msg}\r\n");
|
||||
rtRx.ScrollToCaret();
|
||||
}
|
||||
else if (type == messageType.tx)
|
||||
{
|
||||
rtTx.AppendText($"<{DateTime.Now.ToString("HH:mm:ss")} TX> {msg}\r\n");
|
||||
rtTx.ScrollToCaret();
|
||||
}
|
||||
else
|
||||
{
|
||||
rtMsg.AppendText($"<{DateTime.Now.ToString("HH:mm:ss")} > {msg}\r\n");
|
||||
rtMsg.ScrollToCaret();
|
||||
}
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
cmbport.Items.Clear();
|
||||
foreach (var item in System.IO.Ports.SerialPort.GetPortNames())
|
||||
{
|
||||
cmbport.Items.Add(item);
|
||||
}
|
||||
cmbport.Text = "COM11";
|
||||
if (cmbport.Items.Count > 0) cmbport.SelectedIndex = 0;
|
||||
if (cmbid.Items.Count > 0) cmbid.SelectedIndex = 0;
|
||||
LoadCmds();
|
||||
this.timer1.Start();
|
||||
}
|
||||
|
||||
private void btconnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
var port = cmbport.Text.Trim();
|
||||
var buid = tbbaud.Text.toInt();
|
||||
if(dev.IsOpen)
|
||||
{
|
||||
dev.Close();
|
||||
AddMessage("port closed");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
this.dev.PortName = port;
|
||||
this.dev.BaudRate = buid;
|
||||
dev.Open();
|
||||
AddMessage("port opened");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddMessage(ex.Message, messageType.error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
sbPort.Text = $"{dev.PortName}:{dev.BaudRate} {(dev.IsOpen ? "Open" : "Closed")}";
|
||||
}
|
||||
|
||||
private void tbmsg_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btsend_Click(object sender, EventArgs e)
|
||||
{
|
||||
//send to device
|
||||
var msg = tbmsg.Text.Trim();
|
||||
var id = this.idlist[cmbid.Text];
|
||||
var cmdHex = this.tbCmd.Text.Trim();
|
||||
byte cmd = Convert.ToByte(cmdHex, 16);
|
||||
byte[] msgBytes = Encoding.ASCII.GetBytes(msg); // 메시지를 byte 배열로 변환
|
||||
|
||||
var data = proto.CreatePacket(id, cmd, msgBytes);
|
||||
SendToDevice(data);
|
||||
}
|
||||
|
||||
void SendToDevice(byte[] packet)
|
||||
{
|
||||
if (dev.IsOpen == false)
|
||||
{
|
||||
AddMessage("port closed", messageType.error);
|
||||
}
|
||||
else
|
||||
{
|
||||
dev.Write(packet, 0, packet.Length);
|
||||
var hexstring = packet.HexString();
|
||||
AddMessage(hexstring, messageType.tx);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btsim_Click(object sender, EventArgs e)
|
||||
{
|
||||
//packet test
|
||||
var msg = tbmsg.Text.Trim();
|
||||
var id = this.idlist[cmbid.Text];
|
||||
var cmdHex = this.tbCmd.Text.Trim();
|
||||
byte cmd = Convert.ToByte(cmdHex, 16); // 16진수 문자열을 byte로 변환
|
||||
byte[] msgBytes = Encoding.ASCII.GetBytes(msg); // 메시지를 byte 배열로 변환
|
||||
|
||||
var data = proto.CreatePacket(id, cmd, msgBytes);
|
||||
this.proto.PacketTest(data);
|
||||
}
|
||||
string fn = "cmds.rtf";
|
||||
private void btSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.IO.File.WriteAllText("cmds.rtf", rtCmd.Rtf, System.Text.Encoding.Default);
|
||||
}
|
||||
|
||||
private void btload_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadCmds();
|
||||
}
|
||||
|
||||
void LoadCmds()
|
||||
{
|
||||
var fi = new System.IO.FileInfo("cmds.rtf");
|
||||
if (fi.Exists == false)
|
||||
{
|
||||
AddMessage("no cmds file", messageType.error);
|
||||
return;
|
||||
}
|
||||
var data = System.IO.File.ReadAllText("cmds.rtf", System.Text.Encoding.Default);
|
||||
rtCmd.Rtf = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
126
sample/Form1.resx
Normal file
126
sample/Form1.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?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="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>134, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
22
sample/Program.cs
Normal file
22
sample/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SampleProject
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 해당 애플리케이션의 주 진입점입니다.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
sample/Properties/AssemblyInfo.cs
Normal file
36
sample/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
|
||||
// 이러한 특성 값을 변경하세요.
|
||||
[assembly: AssemblyTitle("SampleProject")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ATK")]
|
||||
[assembly: AssemblyProduct("SampleProject")]
|
||||
[assembly: AssemblyCopyright("Copyright © ATK 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
|
||||
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
|
||||
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||
[assembly: Guid("fab31c8a-7dcf-4152-8a82-76f3c10baba4")]
|
||||
|
||||
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||
//
|
||||
// 주 버전
|
||||
// 부 버전
|
||||
// 빌드 번호
|
||||
// 수정 버전
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
sample/Properties/Resources.Designer.cs
generated
Normal file
71
sample/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 도구를 사용하여 생성되었습니다.
|
||||
// 런타임 버전:4.0.30319.42000
|
||||
//
|
||||
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||
// 이러한 변경 내용이 손실됩니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SampleProject.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
|
||||
/// </summary>
|
||||
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
|
||||
// 클래스에서 자동으로 생성되었습니다.
|
||||
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
|
||||
// ResGen을 다시 실행하거나 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("SampleProject.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
sample/Properties/Resources.resx
Normal file
117
sample/Properties/Resources.resx
Normal 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>
|
||||
30
sample/Properties/Settings.Designer.cs
generated
Normal file
30
sample/Properties/Settings.Designer.cs
generated
Normal 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 SampleProject.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
sample/Properties/Settings.settings
Normal file
7
sample/Properties/Settings.settings
Normal 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>
|
||||
92
sample/SampleProject.csproj
Normal file
92
sample/SampleProject.csproj
Normal file
@@ -0,0 +1,92 @@
|
||||
<?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>{FAB31C8A-7DCF-4152-8A82-76F3C10BABA4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>SampleProject</RootNamespace>
|
||||
<AssemblyName>SampleProject</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</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>
|
||||
</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="arCommUtil">
|
||||
<HintPath>.\arCommUtil.dll</HintPath>
|
||||
</Reference>
|
||||
<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="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.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>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\enigprotocol\ENIGProtocol.csproj">
|
||||
<Project>{b6fca1b0-c9d1-4159-ab86-25e4bc598c01}</Project>
|
||||
<Name>ENIGProtocol</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
BIN
sample/arCommUtil.dll
Normal file
BIN
sample/arCommUtil.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user