diff --git a/PortProxyGUI - FW/PortProxyGUI - FW.csproj b/PortProxyGUI - FW/PortProxyGUI - FW.csproj
index 729bd2a..2a1bf07 100644
--- a/PortProxyGUI - FW/PortProxyGUI - FW.csproj
+++ b/PortProxyGUI - FW/PortProxyGUI - FW.csproj
@@ -87,9 +87,15 @@
NewProxy.cs
+
+ PortProxyGUI.cs
+
PortProxyGUI.cs
+
+ PortProxyGUI.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/PortProxyGUI - FW/PortProxyGUI.Designer.cs b/PortProxyGUI - FW/PortProxyGUI.Designer.cs
index 0dca9fb..182071b 100644
--- a/PortProxyGUI - FW/PortProxyGUI.Designer.cs
+++ b/PortProxyGUI - FW/PortProxyGUI.Designer.cs
@@ -29,11 +29,13 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortProxyGUI));
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
@@ -41,7 +43,6 @@
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
- this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
@@ -54,36 +55,33 @@
this.columnHeader4,
this.columnHeader5});
this.listView1.ContextMenuStrip = this.contextMenuStrip1;
- this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ resources.ApplyResources(this.listView1, "listView1");
this.listView1.FullRowSelect = true;
this.listView1.HideSelection = false;
- this.listView1.Location = new System.Drawing.Point(0, 0);
- this.listView1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(573, 262);
- this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseUp);
//
// columnHeader1
//
- this.columnHeader1.Text = "Type";
+ resources.ApplyResources(this.columnHeader1, "columnHeader1");
//
// columnHeader2
//
- this.columnHeader2.Text = "Listen on";
- this.columnHeader2.Width = 140;
+ resources.ApplyResources(this.columnHeader2, "columnHeader2");
//
// columnHeader3
//
- this.columnHeader3.Text = "Listen port";
- this.columnHeader3.Width = 100;
+ resources.ApplyResources(this.columnHeader3, "columnHeader3");
//
// columnHeader4
//
- this.columnHeader4.Text = "Connect to";
- this.columnHeader4.Width = 140;
+ resources.ApplyResources(this.columnHeader4, "columnHeader4");
+ //
+ // columnHeader5
+ //
+ resources.ApplyResources(this.columnHeader5, "columnHeader5");
//
// contextMenuStrip1
//
@@ -95,58 +93,45 @@
this.toolStripSeparator2,
this.toolStripMenuItem4});
this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new System.Drawing.Size(121, 104);
+ resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
this.contextMenuStrip1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.contextMenuStrip1_MouseClick);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
- this.toolStripMenuItem1.Size = new System.Drawing.Size(120, 22);
- this.toolStripMenuItem1.Text = "New";
+ resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
- this.toolStripMenuItem2.Size = new System.Drawing.Size(120, 22);
- this.toolStripMenuItem2.Text = "Delete";
+ resources.ApplyResources(this.toolStripMenuItem2, "toolStripMenuItem2");
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(117, 6);
+ resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
- this.toolStripMenuItem3.Size = new System.Drawing.Size(120, 22);
- this.toolStripMenuItem3.Text = "Refresh";
+ resources.ApplyResources(this.toolStripMenuItem3, "toolStripMenuItem3");
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(117, 6);
+ resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
- this.toolStripMenuItem4.Size = new System.Drawing.Size(120, 22);
- this.toolStripMenuItem4.Text = "About";
- //
- // columnHeader5
- //
- this.columnHeader5.Text = "Connect port";
- this.columnHeader5.Width = 100;
+ resources.ApplyResources(this.toolStripMenuItem4, "toolStripMenuItem4");
//
// PortProxyGUI
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(573, 262);
this.Controls.Add(this.listView1);
- this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "PortProxyGUI";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "Port Proxy GUI";
this.Load += new System.EventHandler(this.PortProxyGUI_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
diff --git a/PortProxyGUI - FW/PortProxyGUI.cs b/PortProxyGUI - FW/PortProxyGUI.cs
index 9d6145a..0982806 100644
--- a/PortProxyGUI - FW/PortProxyGUI.cs
+++ b/PortProxyGUI - FW/PortProxyGUI.cs
@@ -88,7 +88,7 @@ namespace PortProxyGUI
switch (selected.Text)
{
- case "New":
+ case string s when s == toolStripMenuItem1.Text:
if (NewProxyForm == null)
{
NewProxyForm = new NewProxy(this);
@@ -97,10 +97,10 @@ namespace PortProxyGUI
else NewProxyForm.Show();
break;
- case "Refresh": RefreshProxyList(); break;
- case "Delete": DeleteSelectedProxies(); break;
+ case string s when s == toolStripMenuItem2.Text: DeleteSelectedProxies(); break;
+ case string s when s == toolStripMenuItem3.Text: RefreshProxyList(); break;
- case "About":
+ case string s when s == toolStripMenuItem4.Text:
if (AboutForm == null)
{
AboutForm = new About();
diff --git a/PortProxyGUI - FW/PortProxyGUI.en-US.resx b/PortProxyGUI - FW/PortProxyGUI.en-US.resx
new file mode 100644
index 0000000..4c51db8
--- /dev/null
+++ b/PortProxyGUI - FW/PortProxyGUI.en-US.resx
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ contextMenuStrip1
+
+
+ toolStripMenuItem1
+
+
+
+ 6, 12
+
+
+ listView1
+
+
+ toolStripSeparator2
+
+
+
+ Fill
+
+
+ Listen on
+
+
+ 573, 262
+
+
+ toolStripMenuItem3
+
+
+ columnHeader5
+
+
+ 121, 104
+
+
+ System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 120, 22
+
+
+ 0, 0
+
+
+ Delete
+
+
+ 117, 6
+
+
+ Connect port
+
+
+ 120, 22
+
+
+ 3, 2, 3, 2
+
+
+ New
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader1
+
+
+ Refresh
+
+
+ 573, 262
+
+
+ CenterScreen
+
+
+ 117, 6
+
+
+
+ 140
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 1
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 120, 22
+
+
+ System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ PortProxyGUI
+
+
+ 100
+
+
+ columnHeader2
+
+
+ columnHeader4
+
+
+ 120, 22
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ About
+
+
+ toolStripMenuItem2
+
+
+ toolStripMenuItem4
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Type
+
+
+ Connect to
+
+
+ Listen port
+
+
+ 100
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 0
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 3, 2, 3, 2
+
+
+ 140
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Port Proxy GUI
+
+
+ columnHeader3
+
+
+ toolStripSeparator1
+
+
+ True
+
+
+ 17, 17
+
+
+ zh-Hans
+
+
\ No newline at end of file
diff --git a/PortProxyGUI - FW/PortProxyGUI.resx b/PortProxyGUI - FW/PortProxyGUI.resx
index 73b0127..eef04db 100644
--- a/PortProxyGUI - FW/PortProxyGUI.resx
+++ b/PortProxyGUI - FW/PortProxyGUI.resx
@@ -117,7 +117,193 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Type
+
+
+ Listen on
+
+
+
+ 140
+
+
+ Listen port
+
+
+ 100
+
+
+ Connect to
+
+
+ 140
+
+
+ Connect port
+
+
+ 100
+
17, 17
+
+
+ 120, 22
+
+
+ New
+
+
+ 120, 22
+
+
+ Delete
+
+
+ 117, 6
+
+
+ 120, 22
+
+
+ Refresh
+
+
+ 117, 6
+
+
+ 120, 22
+
+
+ About
+
+
+ 121, 104
+
+
+ contextMenuStrip1
+
+
+ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ Fill
+
+
+ 0, 0
+
+
+ 3, 2, 3, 2
+
+
+ 573, 262
+
+
+ 0
+
+
+ listView1
+
+
+ System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 1
+
+
+ True
+
+
+ 6, 12
+
+
+ 573, 262
+
+
+ 3, 2, 3, 2
+
+
+ CenterScreen
+
+
+ Port Proxy GUI
+
+
+ columnHeader1
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader2
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader3
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader4
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader5
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripMenuItem1
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripMenuItem2
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripSeparator1
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripMenuItem3
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripSeparator2
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ toolStripMenuItem4
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ PortProxyGUI
+
+
+ System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/PortProxyGUI - FW/PortProxyGUI.zh-CN.resx b/PortProxyGUI - FW/PortProxyGUI.zh-CN.resx
new file mode 100644
index 0000000..6653a22
--- /dev/null
+++ b/PortProxyGUI - FW/PortProxyGUI.zh-CN.resx
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ contextMenuStrip1
+
+
+ toolStripMenuItem1
+
+
+
+ 6, 12
+
+
+ listView1
+
+
+ toolStripSeparator2
+
+
+
+ Fill
+
+
+ 侦听地址
+
+
+ 573, 262
+
+
+ toolStripMenuItem3
+
+
+ columnHeader5
+
+
+ 121, 104
+
+
+ System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 120, 22
+
+
+ 0, 0
+
+
+ 删除
+
+
+ 117, 6
+
+
+ 连接端口
+
+
+ 120, 22
+
+
+ 3, 2, 3, 2
+
+
+ 新建
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ columnHeader1
+
+
+ 刷新
+
+
+ 573, 262
+
+
+ CenterScreen
+
+
+ 117, 6
+
+
+
+ 140
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 1
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 120, 22
+
+
+ System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ PortProxyGUI
+
+
+ 100
+
+
+ columnHeader2
+
+
+ columnHeader4
+
+
+ 120, 22
+
+
+ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 关于
+
+
+ toolStripMenuItem2
+
+
+ toolStripMenuItem4
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 类型
+
+
+ 连接地址
+
+
+ 侦听端口
+
+
+ 100
+
+
+ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 0
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 3, 2, 3, 2
+
+
+ 140
+
+
+ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Port Proxy GUI
+
+
+ columnHeader3
+
+
+ toolStripSeparator1
+
+
+ True
+
+
+ 17, 17
+
+
+ zh-Hans
+
+
\ No newline at end of file