v1.2.0
This commit is contained in:
parent
8a5ee63ad3
commit
922d0f93ea
PortProxyGUI - NET35
About.Designer.csAbout.csAbout.resxAbout.zh-CN.resxPortProxyGUI - NET35.csprojPortProxyGUI.Designer.csPortProxyGUI.csPortProxyGUI.resxPortProxyGUI.zh-CN.resx
Properties
SetProxyForm.Designer.csSetProxyForm.csSetProxyForm.resxSetProxyForm.zh-CN.resxPortProxyGUI - NET45
About.Designer.csAbout.csAbout.resxAbout.zh-CN.resxPortProxyGUI - NET45.csprojPortProxyGUI.Designer.csPortProxyGUI.csPortProxyGUI.resxPortProxyGUI.zh-CN.resx
Properties
SetProxyForm.Designer.csSetProxyForm.csSetProxyForm.resxSetProxyForm.zh-CN.resxPortProxyGUI.Shared
PortProxyGUI
|
@ -1,85 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class About
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label_version = new System.Windows.Forms.Label();
|
||||
this.label_Star = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
resources.ApplyResources(this.linkLabel1, "linkLabel1");
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Click += new System.EventHandler(this.linkLabel1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label_version
|
||||
//
|
||||
resources.ApplyResources(this.label_version, "label_version");
|
||||
this.label_version.Name = "label_version";
|
||||
//
|
||||
// label_Star
|
||||
//
|
||||
resources.ApplyResources(this.label_Star, "label_Star");
|
||||
this.label_Star.Name = "label_Star";
|
||||
//
|
||||
// About
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.label_Star);
|
||||
this.Controls.Add(this.label_version);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "About";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.About_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label_version;
|
||||
private System.Windows.Forms.Label label_Star;
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class About : Form
|
||||
{
|
||||
public readonly PortProxyGUI PortProxyGUI;
|
||||
|
||||
public About(PortProxyGUI portProxyGUI)
|
||||
{
|
||||
PortProxyGUI = portProxyGUI;
|
||||
InitializeComponent();
|
||||
label_version.Text = label_version.Text + " v" + Application.ProductVersion;
|
||||
}
|
||||
|
||||
private void linkLabel1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is LinkLabel _sender)
|
||||
{
|
||||
Process.Start("explorer", _sender.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void About_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
PortProxyGUI.AboutForm = null;
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -95,45 +95,56 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="About.cs">
|
||||
<Compile Include="..\PortProxyGUI\About.cs">
|
||||
<Link>About.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="About.Designer.cs">
|
||||
<Compile Include="..\PortProxyGUI\About.designer.cs">
|
||||
<Link>About.designer.cs</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetProxyForm.cs">
|
||||
<Compile Include="..\PortProxyGUI\PortProxyGUI.cs">
|
||||
<Link>PortProxyGUI.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SetProxyForm.Designer.cs">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PortProxyGUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PortProxyGUI.Designer.cs">
|
||||
<Compile Include="..\PortProxyGUI\PortProxyGUI.designer.cs">
|
||||
<Link>PortProxyGUI.designer.cs</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\PortProxyGUI\SetProxyForm.cs">
|
||||
<Link>SetProxyForm.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="..\PortProxyGUI\SetProxyForm.designer.cs">
|
||||
<Link>SetProxyForm.designer.cs</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="About.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\About.resx">
|
||||
<Link>About.resx</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="About.zh-CN.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\About.zh-CN.resx">
|
||||
<Link>About.zh-CN.resx</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SetProxyForm.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\PortProxyGUI.resx">
|
||||
<Link>PortProxyGUI.resx</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="..\PortProxyGUI\PortProxyGUI.zh-CN.resx">
|
||||
<Link>PortProxyGUI.zh-CN.resx</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="..\PortProxyGUI\SetProxyForm.resx">
|
||||
<Link>SetProxyForm.resx</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SetProxyForm.zh-CN.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\SetProxyForm.zh-CN.resx">
|
||||
<Link>SetProxyForm.zh-CN.resx</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PortProxyGUI.resx">
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PortProxyGUI.zh-CN.resx">
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
|
|
@ -1,211 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class PortProxyGUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortProxyGUI));
|
||||
this.listViewProxies = 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.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItem_Enable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Disable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_New = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Modify = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Delete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_Refresh = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_About = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageListProxies = new System.Windows.Forms.ImageList(this.components);
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listViewProxies
|
||||
//
|
||||
this.listViewProxies.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.listViewProxies.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2,
|
||||
this.columnHeader3,
|
||||
this.columnHeader4,
|
||||
this.columnHeader5,
|
||||
this.columnHeader6});
|
||||
this.listViewProxies.ContextMenuStrip = this.contextMenuStrip1;
|
||||
resources.ApplyResources(this.listViewProxies, "listViewProxies");
|
||||
this.listViewProxies.FullRowSelect = true;
|
||||
this.listViewProxies.HideSelection = false;
|
||||
this.listViewProxies.Name = "listViewProxies";
|
||||
this.listViewProxies.SmallImageList = this.imageListProxies;
|
||||
this.listViewProxies.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewProxies.View = System.Windows.Forms.View.Details;
|
||||
this.listViewProxies.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
|
||||
this.listViewProxies.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
|
||||
this.listViewProxies.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseUp);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader1, "columnHeader1");
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader2, "columnHeader2");
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader3, "columnHeader3");
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader4, "columnHeader4");
|
||||
//
|
||||
// columnHeader5
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader5, "columnHeader5");
|
||||
//
|
||||
// columnHeader6
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader6, "columnHeader6");
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem_Enable,
|
||||
this.toolStripMenuItem_Disable,
|
||||
this.toolStripSeparator3,
|
||||
this.toolStripMenuItem_Refresh,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem_New,
|
||||
this.toolStripMenuItem_Modify,
|
||||
this.toolStripMenuItem_Delete,
|
||||
this.toolStripSeparator1,
|
||||
this.toolStripMenuItem_About});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
this.contextMenuStrip1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.contextMenuStrip1_MouseClick);
|
||||
//
|
||||
// toolStripMenuItem_Enable
|
||||
//
|
||||
this.toolStripMenuItem_Enable.Name = "toolStripMenuItem_Enable";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Enable, "toolStripMenuItem_Enable");
|
||||
//
|
||||
// toolStripMenuItem_Disable
|
||||
//
|
||||
this.toolStripMenuItem_Disable.Name = "toolStripMenuItem_Disable";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Disable, "toolStripMenuItem_Disable");
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||
//
|
||||
// toolStripMenuItem_New
|
||||
//
|
||||
this.toolStripMenuItem_New.Name = "toolStripMenuItem_New";
|
||||
resources.ApplyResources(this.toolStripMenuItem_New, "toolStripMenuItem_New");
|
||||
//
|
||||
// toolStripMenuItem_Modify
|
||||
//
|
||||
this.toolStripMenuItem_Modify.Name = "toolStripMenuItem_Modify";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Modify, "toolStripMenuItem_Modify");
|
||||
//
|
||||
// toolStripMenuItem_Delete
|
||||
//
|
||||
this.toolStripMenuItem_Delete.Name = "toolStripMenuItem_Delete";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Delete, "toolStripMenuItem_Delete");
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
//
|
||||
// toolStripMenuItem_Refresh
|
||||
//
|
||||
this.toolStripMenuItem_Refresh.Name = "toolStripMenuItem_Refresh";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Refresh, "toolStripMenuItem_Refresh");
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
//
|
||||
// toolStripMenuItem_About
|
||||
//
|
||||
this.toolStripMenuItem_About.Name = "toolStripMenuItem_About";
|
||||
resources.ApplyResources(this.toolStripMenuItem_About, "toolStripMenuItem_About");
|
||||
//
|
||||
// imageListProxies
|
||||
//
|
||||
this.imageListProxies.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListProxies.ImageStream")));
|
||||
this.imageListProxies.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageListProxies.Images.SetKeyName(0, "disable.png");
|
||||
this.imageListProxies.Images.SetKeyName(1, "enable.png");
|
||||
//
|
||||
// PortProxyGUI
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.listViewProxies);
|
||||
this.Name = "PortProxyGUI";
|
||||
this.Load += new System.EventHandler(this.PortProxyGUI_Load);
|
||||
this.Shown += new System.EventHandler(this.PortProxyGUI_Shown);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView listViewProxies;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_New;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Delete;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Refresh;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_About;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader6;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Modify;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ImageList imageListProxies;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Enable;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Disable;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
using NStandard;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.ListViewItem;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class PortProxyGUI : Form
|
||||
{
|
||||
public SetProxyForm SetProxyForm;
|
||||
public About AboutForm;
|
||||
private ListViewColumnSorter lvwColumnSorter;
|
||||
|
||||
public PortProxyGUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
lvwColumnSorter = new ListViewColumnSorter();
|
||||
listViewProxies.ListViewItemSorter = lvwColumnSorter;
|
||||
}
|
||||
|
||||
private void PortProxyGUI_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void PortProxyGUI_Shown(object sender, EventArgs e)
|
||||
{
|
||||
RefreshProxyList();
|
||||
}
|
||||
|
||||
private void EnableSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 1;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.AddProxy("add", subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text), subItems[4].Text, int.Parse(subItems[5].Text));
|
||||
}
|
||||
}
|
||||
|
||||
private void DisableSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 0;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.DeleteProxy(subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text));
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
DisableSelectedProxies();
|
||||
Program.SqliteDbScope.RemoveRange(items.Select(x => new Data.Rule { Id = x.Tag.ToString() }));
|
||||
foreach (var item in items) listViewProxies.Items.Remove(item);
|
||||
}
|
||||
|
||||
private void SetProxyForUpdate(SetProxyForm form)
|
||||
{
|
||||
var item = listViewProxies.SelectedItems.OfType<ListViewItem>().FirstOrDefault();
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
|
||||
if (int.TryParse(subItems[3].Text, out var listenPort) && 0 < listenPort && listenPort < 65536)
|
||||
{
|
||||
form.UseUpdateMode(item, subItems[1].Text, subItems[2].Text, listenPort, subItems[4].Text, subItems[5].Text);
|
||||
}
|
||||
else MessageBox.Show("无效端口号。", "无效端口号", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
public void RefreshProxyList()
|
||||
{
|
||||
var proxies = CmdUtil.GetProxies();
|
||||
var rules = Program.SqliteDbScope.Rules;
|
||||
foreach (var proxy in proxies)
|
||||
{
|
||||
var matchedRule = rules.FirstOrDefault(r => r.EqualsWithKeys(proxy));
|
||||
proxy.Id = matchedRule?.Id;
|
||||
}
|
||||
|
||||
var pendingAdds = proxies.Where(x => x.Id == null);
|
||||
var pendingUpdates = proxies.Where(x => x.Id != null && !x.Equals(rules.First(r => r.Id == x.Id)));
|
||||
|
||||
Program.SqliteDbScope.AddRange(pendingAdds);
|
||||
Program.SqliteDbScope.UpdateRange(pendingUpdates);
|
||||
|
||||
listViewProxies.Items.Clear();
|
||||
rules = Program.SqliteDbScope.Rules;
|
||||
foreach (var rule in rules)
|
||||
{
|
||||
var imageIndex = proxies.Any(p => p.EqualsWithKeys(rule)) ? 1 : 0;
|
||||
var item = new ListViewItem { ImageIndex = imageIndex, Tag = rule.Id }.Then(vitem =>
|
||||
{
|
||||
vitem.SubItems.AddRange(new[] { rule.Type, rule.ListenOn, rule.ListenPort.ToString(), rule.ConnectTo, rule.ConnectPort.ToString() });
|
||||
});
|
||||
listViewProxies.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void contextMenuStrip1_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender is ContextMenuStrip _sender)
|
||||
{
|
||||
var selected = _sender.Items.OfType<ToolStripMenuItem>().Where(x => x.Selected).FirstOrDefault();
|
||||
if (selected is null || !selected.Enabled) return;
|
||||
|
||||
switch (selected)
|
||||
{
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Enable: EnableSelectedProxies(); break;
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Disable: DisableSelectedProxies(); break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_New:
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForm.UseNormalMode();
|
||||
SetProxyForm.ShowDialog();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Modify:
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForUpdate(SetProxyForm);
|
||||
SetProxyForm.ShowDialog();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Refresh:
|
||||
RefreshProxyList();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Delete: DeleteSelectedProxies(); break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_About:
|
||||
if (AboutForm == null)
|
||||
{
|
||||
AboutForm = new About(this);
|
||||
AboutForm.Show();
|
||||
}
|
||||
else AboutForm.Show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender is ListView _sender)
|
||||
{
|
||||
toolStripMenuItem_Enable.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any(x => x.ImageIndex == 0);
|
||||
toolStripMenuItem_Disable.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any(x => x.ImageIndex == 1);
|
||||
|
||||
toolStripMenuItem_Delete.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any();
|
||||
toolStripMenuItem_Modify.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Count() == 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is ListView _sender)
|
||||
{
|
||||
var selectAny = _sender.SelectedItems.OfType<ListViewItem>().Any();
|
||||
if (selectAny)
|
||||
{
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForUpdate(SetProxyForm);
|
||||
SetProxyForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
// Determine if clicked column is already the column that is being sorted.
|
||||
if (e.Column == lvwColumnSorter.SortColumn)
|
||||
{
|
||||
// Reverse the current sort direction for this column.
|
||||
if (lvwColumnSorter.Order == SortOrder.Ascending)
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the column number that is to be sorted; default to ascending.
|
||||
lvwColumnSorter.SortColumn = e.Column;
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
// Perform the sort with these new sort options.
|
||||
listViewProxies.Sort();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.2.0")]
|
||||
[assembly: AssemblyVersion("1.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.0.0")]
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class SetProxyForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetProxyForm));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenOn = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox_connectTo = new System.Windows.Forms.TextBox();
|
||||
this.textBox_connectPort = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button_submit = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenPort = new System.Windows.Forms.TextBox();
|
||||
this.comboBox_type = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// textBox_listenOn
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenOn, "textBox_listenOn");
|
||||
this.textBox_listenOn.Name = "textBox_listenOn";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// textBox_connectTo
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectTo, "textBox_connectTo");
|
||||
this.textBox_connectTo.Name = "textBox_connectTo";
|
||||
//
|
||||
// textBox_connectPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectPort, "textBox_connectPort");
|
||||
this.textBox_connectPort.Name = "textBox_connectPort";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// button_submit
|
||||
//
|
||||
resources.ApplyResources(this.button_submit, "button_submit");
|
||||
this.button_submit.Name = "button_submit";
|
||||
this.button_submit.UseVisualStyleBackColor = true;
|
||||
this.button_submit.Click += new System.EventHandler(this.button_submit_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// textBox_listenPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenPort, "textBox_listenPort");
|
||||
this.textBox_listenPort.Name = "textBox_listenPort";
|
||||
//
|
||||
// comboBox_type
|
||||
//
|
||||
resources.ApplyResources(this.comboBox_type, "comboBox_type");
|
||||
this.comboBox_type.FormattingEnabled = true;
|
||||
this.comboBox_type.Items.AddRange(new object[] {
|
||||
resources.GetString("comboBox_type.Items"),
|
||||
resources.GetString("comboBox_type.Items1"),
|
||||
resources.GetString("comboBox_type.Items2"),
|
||||
resources.GetString("comboBox_type.Items3"),
|
||||
resources.GetString("comboBox_type.Items4")});
|
||||
this.comboBox_type.Name = "comboBox_type";
|
||||
//
|
||||
// SetProxyForm
|
||||
//
|
||||
this.AcceptButton = this.button_submit;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.comboBox_type);
|
||||
this.Controls.Add(this.textBox_listenPort);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.button_submit);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox_connectPort);
|
||||
this.Controls.Add(this.textBox_connectTo);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox_listenOn);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SetProxyForm";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SetProxyForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.SetProxyForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox_listenOn;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox_connectTo;
|
||||
private System.Windows.Forms.TextBox textBox_connectPort;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button_submit;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox_listenPort;
|
||||
private System.Windows.Forms.ComboBox comboBox_type;
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
using NStandard;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class SetProxyForm : Form
|
||||
{
|
||||
public readonly PortProxyGUI ParentWindow;
|
||||
private string AutoTypeString { get; }
|
||||
|
||||
private bool _updateMode;
|
||||
private ListViewItem _updateLiveViewItem;
|
||||
private string _oldType;
|
||||
private string _oldListenOn;
|
||||
private int _oldListenPort;
|
||||
|
||||
public SetProxyForm(PortProxyGUI parent)
|
||||
{
|
||||
ParentWindow = parent;
|
||||
InitializeComponent();
|
||||
AutoTypeString = comboBox_type.Text = comboBox_type.Items.OfType<string>().First();
|
||||
}
|
||||
|
||||
public void UseNormalMode()
|
||||
{
|
||||
_updateMode = false;
|
||||
_updateLiveViewItem = null;
|
||||
_oldType = null;
|
||||
_oldListenOn = null;
|
||||
_oldListenPort = 0;
|
||||
|
||||
comboBox_type.Text = AutoTypeString;
|
||||
textBox_listenOn.Text = "*";
|
||||
textBox_listenPort.Text = "";
|
||||
textBox_connectTo.Text = "";
|
||||
textBox_connectPort.Text = "";
|
||||
}
|
||||
|
||||
public void UseUpdateMode(ListViewItem item, string type, string listenOn, int listenPort, string connectTo, string connectPort)
|
||||
{
|
||||
_updateMode = true;
|
||||
_updateLiveViewItem = item;
|
||||
_oldType = type;
|
||||
_oldListenOn = listenOn.Trim().ToLower();
|
||||
_oldListenPort = listenPort;
|
||||
|
||||
comboBox_type.Text = type;
|
||||
textBox_listenOn.Text = listenOn.ToString();
|
||||
textBox_listenPort.Text = listenPort.ToString();
|
||||
textBox_connectTo.Text = connectTo;
|
||||
textBox_connectPort.Text = connectPort;
|
||||
}
|
||||
|
||||
private bool IsIPv6(string ip)
|
||||
{
|
||||
return ip.IsMatch(new Regex(@"^[\dABCDEF]{2}(?::(?:[\dABCDEF]{2})){5}$"));
|
||||
}
|
||||
|
||||
private string GetPassType(string listenOn, string connectTo)
|
||||
{
|
||||
var from = IsIPv6(listenOn) ? "v6" : "v4";
|
||||
var to = IsIPv6(connectTo) ? "v6" : "v4";
|
||||
return $"{from}to{to}";
|
||||
}
|
||||
|
||||
private void button_submit_Click(object sender, EventArgs e)
|
||||
{
|
||||
var type = comboBox_type.Text.Trim();
|
||||
var listenOn = textBox_listenOn.Text.Trim().ToLower();
|
||||
var connectTo = textBox_connectTo.Text.Trim().ToLower();
|
||||
var listenPort = textBox_listenPort.Text.Trim();
|
||||
var connectPort = textBox_connectPort.Text.Trim();
|
||||
|
||||
if (!int.TryParse(listenPort, out var _listenPort) || _listenPort < 0 || _listenPort > 65535)
|
||||
{
|
||||
MessageBox.Show($"The listen port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(connectPort, out var _connectPort) || _connectPort < 0 || _connectPort > 65535)
|
||||
{
|
||||
MessageBox.Show($"The connect port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == AutoTypeString) type = GetPassType(listenOn, connectTo);
|
||||
|
||||
if (!new[] { "v4tov4", "v4tov6", "v6tov4", "v6tov6" }.Contains(type))
|
||||
{
|
||||
MessageBox.Show($"Unknow type for ({listenOn} -> {connectTo}).", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_updateMode)
|
||||
{
|
||||
var rule = Program.SqliteDbScope.GetRule(_oldType, _oldListenOn, _oldListenPort);
|
||||
CmdUtil.DeleteProxy(_oldType, _oldListenOn, _oldListenPort);
|
||||
Program.SqliteDbScope.Remove(rule);
|
||||
|
||||
rule.Type = type;
|
||||
rule.ListenOn = listenOn;
|
||||
rule.ListenPort = _listenPort;
|
||||
rule.ConnectTo = connectTo;
|
||||
rule.ConnectPort = _connectPort;
|
||||
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
Program.SqliteDbScope.Add(rule);
|
||||
|
||||
_updateLiveViewItem.ImageIndex = 1;
|
||||
var subItems = _updateLiveViewItem.SubItems;
|
||||
subItems[1].Text = type;
|
||||
subItems[2].Text = listenOn;
|
||||
subItems[3].Text = _listenPort.ToString();
|
||||
subItems[4].Text = connectTo;
|
||||
subItems[5].Text = _connectPort.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
ParentWindow.RefreshProxyList();
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SetProxyForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Top = ParentWindow.Top + (ParentWindow.Height - Height) / 2;
|
||||
Left = ParentWindow.Left + (ParentWindow.Width - Width) / 2;
|
||||
}
|
||||
|
||||
private void SetProxyForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
ParentWindow.SetProxyForm = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,459 +0,0 @@
|
|||
<?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>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>监听地址</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Name" xml:space="preserve">
|
||||
<value>textBox_listenOn</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>连接地址</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Name" xml:space="preserve">
|
||||
<value>textBox_connectTo</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Name" xml:space="preserve">
|
||||
<value>textBox_connectPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="button_submit.Text" xml:space="preserve">
|
||||
<value>设置</value>
|
||||
</data>
|
||||
<data name=">>button1.Name" xml:space="preserve">
|
||||
<value>button1</value>
|
||||
</data>
|
||||
<data name=">>button1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>button1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>类型</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Name" xml:space="preserve">
|
||||
<value>textBox_listenPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items1" xml:space="preserve">
|
||||
<value>v4tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items2" xml:space="preserve">
|
||||
<value>v4tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items3" xml:space="preserve">
|
||||
<value>v6tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items4" xml:space="preserve">
|
||||
<value>v6tov6</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Name" xml:space="preserve">
|
||||
<value>comboBox_type</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>设置映射</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>NewProxy</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>313, 95</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>227, 62</value>
|
||||
</data>
|
||||
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>74, 22</value>
|
||||
</data>
|
||||
<data name="button1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Popup</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>78, 64</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 20</value>
|
||||
</data>
|
||||
<data name="comboBox_type.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 11</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 35</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 35</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 66</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 11</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 8</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 8</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items" xml:space="preserve">
|
||||
<value>(自动)</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,85 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class About
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label_version = new System.Windows.Forms.Label();
|
||||
this.label_Star = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
resources.ApplyResources(this.linkLabel1, "linkLabel1");
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Click += new System.EventHandler(this.linkLabel1_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label_version
|
||||
//
|
||||
resources.ApplyResources(this.label_version, "label_version");
|
||||
this.label_version.Name = "label_version";
|
||||
//
|
||||
// label_Star
|
||||
//
|
||||
resources.ApplyResources(this.label_Star, "label_Star");
|
||||
this.label_Star.Name = "label_Star";
|
||||
//
|
||||
// About
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.label_Star);
|
||||
this.Controls.Add(this.label_version);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "About";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.About_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label_version;
|
||||
private System.Windows.Forms.Label label_Star;
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class About : Form
|
||||
{
|
||||
public readonly PortProxyGUI PortProxyGUI;
|
||||
|
||||
public About(PortProxyGUI portProxyGUI)
|
||||
{
|
||||
PortProxyGUI = portProxyGUI;
|
||||
InitializeComponent();
|
||||
label_version.Text = label_version.Text + " v" + Application.ProductVersion;
|
||||
}
|
||||
|
||||
private void linkLabel1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is LinkLabel _sender)
|
||||
{
|
||||
Process.Start("explorer", _sender.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void About_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
PortProxyGUI.AboutForm = null;
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -100,44 +100,55 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="About.cs">
|
||||
<Compile Include="..\PortProxyGUI\About.cs">
|
||||
<Link>About.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="About.Designer.cs">
|
||||
<Compile Include="..\PortProxyGUI\About.designer.cs">
|
||||
<Link>About.designer.cs</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetProxyForm.cs">
|
||||
<Compile Include="..\PortProxyGUI\PortProxyGUI.cs">
|
||||
<Link>PortProxyGUI.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SetProxyForm.Designer.cs">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PortProxyGUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PortProxyGUI.Designer.cs">
|
||||
<Compile Include="..\PortProxyGUI\PortProxyGUI.designer.cs">
|
||||
<Link>PortProxyGUI.designer.cs</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\PortProxyGUI\SetProxyForm.cs">
|
||||
<Link>SetProxyForm.cs</Link>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="..\PortProxyGUI\SetProxyForm.designer.cs">
|
||||
<Link>SetProxyForm.designer.cs</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="About.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\About.resx">
|
||||
<Link>About.resx</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="About.zh-CN.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\About.zh-CN.resx">
|
||||
<Link>About.zh-CN.resx</Link>
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PortProxyGUI.zh-CN.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\PortProxyGUI.resx">
|
||||
<Link>PortProxyGUI.resx</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SetProxyForm.resx">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SetProxyForm.zh-CN.resx">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PortProxyGUI.resx">
|
||||
<EmbeddedResource Include="..\PortProxyGUI\PortProxyGUI.zh-CN.resx">
|
||||
<Link>PortProxyGUI.zh-CN.resx</Link>
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="..\PortProxyGUI\SetProxyForm.resx">
|
||||
<Link>SetProxyForm.resx</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="..\PortProxyGUI\SetProxyForm.zh-CN.resx">
|
||||
<Link>SetProxyForm.zh-CN.resx</Link>
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
|
|
|
@ -1,211 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class PortProxyGUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortProxyGUI));
|
||||
this.listViewProxies = 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.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItem_Enable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Disable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_New = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Modify = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Delete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_Refresh = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_About = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageListProxies = new System.Windows.Forms.ImageList(this.components);
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listViewProxies
|
||||
//
|
||||
this.listViewProxies.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.listViewProxies.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2,
|
||||
this.columnHeader3,
|
||||
this.columnHeader4,
|
||||
this.columnHeader5,
|
||||
this.columnHeader6});
|
||||
this.listViewProxies.ContextMenuStrip = this.contextMenuStrip1;
|
||||
resources.ApplyResources(this.listViewProxies, "listViewProxies");
|
||||
this.listViewProxies.FullRowSelect = true;
|
||||
this.listViewProxies.HideSelection = false;
|
||||
this.listViewProxies.Name = "listViewProxies";
|
||||
this.listViewProxies.SmallImageList = this.imageListProxies;
|
||||
this.listViewProxies.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewProxies.View = System.Windows.Forms.View.Details;
|
||||
this.listViewProxies.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
|
||||
this.listViewProxies.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
|
||||
this.listViewProxies.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseUp);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader1, "columnHeader1");
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader2, "columnHeader2");
|
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader3, "columnHeader3");
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader4, "columnHeader4");
|
||||
//
|
||||
// columnHeader5
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader5, "columnHeader5");
|
||||
//
|
||||
// columnHeader6
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader6, "columnHeader6");
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem_Enable,
|
||||
this.toolStripMenuItem_Disable,
|
||||
this.toolStripSeparator3,
|
||||
this.toolStripMenuItem_Refresh,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem_New,
|
||||
this.toolStripMenuItem_Modify,
|
||||
this.toolStripMenuItem_Delete,
|
||||
this.toolStripSeparator1,
|
||||
this.toolStripMenuItem_About});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
this.contextMenuStrip1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.contextMenuStrip1_MouseClick);
|
||||
//
|
||||
// toolStripMenuItem_Enable
|
||||
//
|
||||
this.toolStripMenuItem_Enable.Name = "toolStripMenuItem_Enable";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Enable, "toolStripMenuItem_Enable");
|
||||
//
|
||||
// toolStripMenuItem_Disable
|
||||
//
|
||||
this.toolStripMenuItem_Disable.Name = "toolStripMenuItem_Disable";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Disable, "toolStripMenuItem_Disable");
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||
//
|
||||
// toolStripMenuItem_New
|
||||
//
|
||||
this.toolStripMenuItem_New.Name = "toolStripMenuItem_New";
|
||||
resources.ApplyResources(this.toolStripMenuItem_New, "toolStripMenuItem_New");
|
||||
//
|
||||
// toolStripMenuItem_Modify
|
||||
//
|
||||
this.toolStripMenuItem_Modify.Name = "toolStripMenuItem_Modify";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Modify, "toolStripMenuItem_Modify");
|
||||
//
|
||||
// toolStripMenuItem_Delete
|
||||
//
|
||||
this.toolStripMenuItem_Delete.Name = "toolStripMenuItem_Delete";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Delete, "toolStripMenuItem_Delete");
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
//
|
||||
// toolStripMenuItem_Refresh
|
||||
//
|
||||
this.toolStripMenuItem_Refresh.Name = "toolStripMenuItem_Refresh";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Refresh, "toolStripMenuItem_Refresh");
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
//
|
||||
// toolStripMenuItem_About
|
||||
//
|
||||
this.toolStripMenuItem_About.Name = "toolStripMenuItem_About";
|
||||
resources.ApplyResources(this.toolStripMenuItem_About, "toolStripMenuItem_About");
|
||||
//
|
||||
// imageListProxies
|
||||
//
|
||||
this.imageListProxies.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListProxies.ImageStream")));
|
||||
this.imageListProxies.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageListProxies.Images.SetKeyName(0, "disable.png");
|
||||
this.imageListProxies.Images.SetKeyName(1, "enable.png");
|
||||
//
|
||||
// PortProxyGUI
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.listViewProxies);
|
||||
this.Name = "PortProxyGUI";
|
||||
this.Load += new System.EventHandler(this.PortProxyGUI_Load);
|
||||
this.Shown += new System.EventHandler(this.PortProxyGUI_Shown);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView listViewProxies;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_New;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Delete;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Refresh;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_About;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader6;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Modify;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ImageList imageListProxies;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Enable;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Disable;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
using NStandard;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.ListViewItem;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class PortProxyGUI : Form
|
||||
{
|
||||
public SetProxyForm SetProxyForm;
|
||||
public About AboutForm;
|
||||
private ListViewColumnSorter lvwColumnSorter;
|
||||
|
||||
public PortProxyGUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
lvwColumnSorter = new ListViewColumnSorter();
|
||||
listViewProxies.ListViewItemSorter = lvwColumnSorter;
|
||||
}
|
||||
|
||||
private void PortProxyGUI_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void PortProxyGUI_Shown(object sender, EventArgs e)
|
||||
{
|
||||
RefreshProxyList();
|
||||
}
|
||||
|
||||
private void EnableSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 1;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.AddProxy("add", subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text), subItems[4].Text, int.Parse(subItems[5].Text));
|
||||
}
|
||||
}
|
||||
|
||||
private void DisableSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 0;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.DeleteProxy(subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text));
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
DisableSelectedProxies();
|
||||
Program.SqliteDbScope.RemoveRange(items.Select(x => new Data.Rule { Id = x.Tag.ToString() }));
|
||||
foreach (var item in items) listViewProxies.Items.Remove(item);
|
||||
}
|
||||
|
||||
private void SetProxyForUpdate(SetProxyForm form)
|
||||
{
|
||||
var item = listViewProxies.SelectedItems.OfType<ListViewItem>().FirstOrDefault();
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
|
||||
if (int.TryParse(subItems[3].Text, out var listenPort) && 0 < listenPort && listenPort < 65536)
|
||||
{
|
||||
form.UseUpdateMode(item, subItems[1].Text, subItems[2].Text, listenPort, subItems[4].Text, subItems[5].Text);
|
||||
}
|
||||
else MessageBox.Show("无效端口号。", "无效端口号", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
public void RefreshProxyList()
|
||||
{
|
||||
var proxies = CmdUtil.GetProxies();
|
||||
var rules = Program.SqliteDbScope.Rules;
|
||||
foreach (var proxy in proxies)
|
||||
{
|
||||
var matchedRule = rules.FirstOrDefault(r => r.EqualsWithKeys(proxy));
|
||||
proxy.Id = matchedRule?.Id;
|
||||
}
|
||||
|
||||
var pendingAdds = proxies.Where(x => x.Id == null);
|
||||
var pendingUpdates = proxies.Where(x => x.Id != null && !x.Equals(rules.First(r => r.Id == x.Id)));
|
||||
|
||||
Program.SqliteDbScope.AddRange(pendingAdds);
|
||||
Program.SqliteDbScope.UpdateRange(pendingUpdates);
|
||||
|
||||
listViewProxies.Items.Clear();
|
||||
rules = Program.SqliteDbScope.Rules;
|
||||
foreach (var rule in rules)
|
||||
{
|
||||
var imageIndex = proxies.Any(p => p.EqualsWithKeys(rule)) ? 1 : 0;
|
||||
var item = new ListViewItem { ImageIndex = imageIndex, Tag = rule.Id }.Then(vitem =>
|
||||
{
|
||||
vitem.SubItems.AddRange(new[] { rule.Type, rule.ListenOn, rule.ListenPort.ToString(), rule.ConnectTo, rule.ConnectPort.ToString() });
|
||||
});
|
||||
listViewProxies.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void contextMenuStrip1_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender is ContextMenuStrip _sender)
|
||||
{
|
||||
var selected = _sender.Items.OfType<ToolStripMenuItem>().Where(x => x.Selected).FirstOrDefault();
|
||||
if (selected is null || !selected.Enabled) return;
|
||||
|
||||
switch (selected)
|
||||
{
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Enable: EnableSelectedProxies(); break;
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Disable: DisableSelectedProxies(); break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_New:
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForm.UseNormalMode();
|
||||
SetProxyForm.ShowDialog();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Modify:
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForUpdate(SetProxyForm);
|
||||
SetProxyForm.ShowDialog();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Refresh:
|
||||
RefreshProxyList();
|
||||
break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_Delete: DeleteSelectedProxies(); break;
|
||||
|
||||
case ToolStripMenuItem item when item == toolStripMenuItem_About:
|
||||
if (AboutForm == null)
|
||||
{
|
||||
AboutForm = new About(this);
|
||||
AboutForm.Show();
|
||||
}
|
||||
else AboutForm.Show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender is ListView _sender)
|
||||
{
|
||||
toolStripMenuItem_Enable.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any(x => x.ImageIndex == 0);
|
||||
toolStripMenuItem_Disable.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any(x => x.ImageIndex == 1);
|
||||
|
||||
toolStripMenuItem_Delete.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any();
|
||||
toolStripMenuItem_Modify.Enabled = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Count() == 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is ListView _sender)
|
||||
{
|
||||
var selectAny = _sender.SelectedItems.OfType<ListViewItem>().Any();
|
||||
if (selectAny)
|
||||
{
|
||||
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||
SetProxyForUpdate(SetProxyForm);
|
||||
SetProxyForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
// Determine if clicked column is already the column that is being sorted.
|
||||
if (e.Column == lvwColumnSorter.SortColumn)
|
||||
{
|
||||
// Reverse the current sort direction for this column.
|
||||
if (lvwColumnSorter.Order == SortOrder.Ascending)
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the column number that is to be sorted; default to ascending.
|
||||
lvwColumnSorter.SortColumn = e.Column;
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
// Perform the sort with these new sort options.
|
||||
listViewProxies.Sort();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.2.0")]
|
||||
[assembly: AssemblyVersion("1.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.0.0")]
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
namespace PortProxyGUI
|
||||
{
|
||||
partial class SetProxyForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetProxyForm));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenOn = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox_connectTo = new System.Windows.Forms.TextBox();
|
||||
this.textBox_connectPort = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button_submit = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenPort = new System.Windows.Forms.TextBox();
|
||||
this.comboBox_type = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// textBox_listenOn
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenOn, "textBox_listenOn");
|
||||
this.textBox_listenOn.Name = "textBox_listenOn";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// textBox_connectTo
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectTo, "textBox_connectTo");
|
||||
this.textBox_connectTo.Name = "textBox_connectTo";
|
||||
//
|
||||
// textBox_connectPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectPort, "textBox_connectPort");
|
||||
this.textBox_connectPort.Name = "textBox_connectPort";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// button_submit
|
||||
//
|
||||
resources.ApplyResources(this.button_submit, "button_submit");
|
||||
this.button_submit.Name = "button_submit";
|
||||
this.button_submit.UseVisualStyleBackColor = true;
|
||||
this.button_submit.Click += new System.EventHandler(this.button_submit_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// textBox_listenPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenPort, "textBox_listenPort");
|
||||
this.textBox_listenPort.Name = "textBox_listenPort";
|
||||
//
|
||||
// comboBox_type
|
||||
//
|
||||
resources.ApplyResources(this.comboBox_type, "comboBox_type");
|
||||
this.comboBox_type.FormattingEnabled = true;
|
||||
this.comboBox_type.Items.AddRange(new object[] {
|
||||
resources.GetString("comboBox_type.Items"),
|
||||
resources.GetString("comboBox_type.Items1"),
|
||||
resources.GetString("comboBox_type.Items2"),
|
||||
resources.GetString("comboBox_type.Items3"),
|
||||
resources.GetString("comboBox_type.Items4")});
|
||||
this.comboBox_type.Name = "comboBox_type";
|
||||
//
|
||||
// SetProxyForm
|
||||
//
|
||||
this.AcceptButton = this.button_submit;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.comboBox_type);
|
||||
this.Controls.Add(this.textBox_listenPort);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.button_submit);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox_connectPort);
|
||||
this.Controls.Add(this.textBox_connectTo);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox_listenOn);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SetProxyForm";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SetProxyForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.SetProxyForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox_listenOn;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox_connectTo;
|
||||
private System.Windows.Forms.TextBox textBox_connectPort;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button_submit;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox_listenPort;
|
||||
private System.Windows.Forms.ComboBox comboBox_type;
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
using NStandard;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PortProxyGUI
|
||||
{
|
||||
public partial class SetProxyForm : Form
|
||||
{
|
||||
public readonly PortProxyGUI ParentWindow;
|
||||
private string AutoTypeString { get; }
|
||||
|
||||
private bool _updateMode;
|
||||
private ListViewItem _updateLiveViewItem;
|
||||
private string _oldType;
|
||||
private string _oldListenOn;
|
||||
private int _oldListenPort;
|
||||
|
||||
public SetProxyForm(PortProxyGUI parent)
|
||||
{
|
||||
ParentWindow = parent;
|
||||
InitializeComponent();
|
||||
AutoTypeString = comboBox_type.Text = comboBox_type.Items.OfType<string>().First();
|
||||
}
|
||||
|
||||
public void UseNormalMode()
|
||||
{
|
||||
_updateMode = false;
|
||||
_updateLiveViewItem = null;
|
||||
_oldType = null;
|
||||
_oldListenOn = null;
|
||||
_oldListenPort = 0;
|
||||
|
||||
comboBox_type.Text = AutoTypeString;
|
||||
textBox_listenOn.Text = "*";
|
||||
textBox_listenPort.Text = "";
|
||||
textBox_connectTo.Text = "";
|
||||
textBox_connectPort.Text = "";
|
||||
}
|
||||
|
||||
public void UseUpdateMode(ListViewItem item, string type, string listenOn, int listenPort, string connectTo, string connectPort)
|
||||
{
|
||||
_updateMode = true;
|
||||
_updateLiveViewItem = item;
|
||||
_oldType = type;
|
||||
_oldListenOn = listenOn.Trim().ToLower();
|
||||
_oldListenPort = listenPort;
|
||||
|
||||
comboBox_type.Text = type;
|
||||
textBox_listenOn.Text = listenOn.ToString();
|
||||
textBox_listenPort.Text = listenPort.ToString();
|
||||
textBox_connectTo.Text = connectTo;
|
||||
textBox_connectPort.Text = connectPort;
|
||||
}
|
||||
|
||||
private bool IsIPv6(string ip)
|
||||
{
|
||||
return ip.IsMatch(new Regex(@"^[\dABCDEF]{2}(?::(?:[\dABCDEF]{2})){5}$"));
|
||||
}
|
||||
|
||||
private string GetPassType(string listenOn, string connectTo)
|
||||
{
|
||||
var from = IsIPv6(listenOn) ? "v6" : "v4";
|
||||
var to = IsIPv6(connectTo) ? "v6" : "v4";
|
||||
return $"{from}to{to}";
|
||||
}
|
||||
|
||||
private void button_submit_Click(object sender, EventArgs e)
|
||||
{
|
||||
var type = comboBox_type.Text.Trim();
|
||||
var listenOn = textBox_listenOn.Text.Trim().ToLower();
|
||||
var connectTo = textBox_connectTo.Text.Trim().ToLower();
|
||||
var listenPort = textBox_listenPort.Text.Trim();
|
||||
var connectPort = textBox_connectPort.Text.Trim();
|
||||
|
||||
if (!int.TryParse(listenPort, out var _listenPort) || _listenPort < 0 || _listenPort > 65535)
|
||||
{
|
||||
MessageBox.Show($"The listen port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(connectPort, out var _connectPort) || _connectPort < 0 || _connectPort > 65535)
|
||||
{
|
||||
MessageBox.Show($"The connect port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == AutoTypeString) type = GetPassType(listenOn, connectTo);
|
||||
|
||||
if (!new[] { "v4tov4", "v4tov6", "v6tov4", "v6tov6" }.Contains(type))
|
||||
{
|
||||
MessageBox.Show($"Unknow type for ({listenOn} -> {connectTo}).", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_updateMode)
|
||||
{
|
||||
var rule = Program.SqliteDbScope.GetRule(_oldType, _oldListenOn, _oldListenPort);
|
||||
CmdUtil.DeleteProxy(_oldType, _oldListenOn, _oldListenPort);
|
||||
Program.SqliteDbScope.Remove(rule);
|
||||
|
||||
rule.Type = type;
|
||||
rule.ListenOn = listenOn;
|
||||
rule.ListenPort = _listenPort;
|
||||
rule.ConnectTo = connectTo;
|
||||
rule.ConnectPort = _connectPort;
|
||||
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
Program.SqliteDbScope.Add(rule);
|
||||
|
||||
_updateLiveViewItem.ImageIndex = 1;
|
||||
var subItems = _updateLiveViewItem.SubItems;
|
||||
subItems[1].Text = type;
|
||||
subItems[2].Text = listenOn;
|
||||
subItems[3].Text = _listenPort.ToString();
|
||||
subItems[4].Text = connectTo;
|
||||
subItems[5].Text = _connectPort.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
ParentWindow.RefreshProxyList();
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void SetProxyForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Top = ParentWindow.Top + (ParentWindow.Height - Height) / 2;
|
||||
Left = ParentWindow.Left + (ParentWindow.Width - Width) / 2;
|
||||
}
|
||||
|
||||
private void SetProxyForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
ParentWindow.SetProxyForm = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,459 +0,0 @@
|
|||
<?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>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>监听地址</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Name" xml:space="preserve">
|
||||
<value>textBox_listenOn</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>连接地址</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Name" xml:space="preserve">
|
||||
<value>textBox_connectTo</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Name" xml:space="preserve">
|
||||
<value>textBox_connectPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="button_submit.Text" xml:space="preserve">
|
||||
<value>设置</value>
|
||||
</data>
|
||||
<data name=">>button1.Name" xml:space="preserve">
|
||||
<value>button1</value>
|
||||
</data>
|
||||
<data name=">>button1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>button1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>类型</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>端口</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Name" xml:space="preserve">
|
||||
<value>textBox_listenPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items1" xml:space="preserve">
|
||||
<value>v4tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items2" xml:space="preserve">
|
||||
<value>v4tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items3" xml:space="preserve">
|
||||
<value>v6tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items4" xml:space="preserve">
|
||||
<value>v6tov6</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Name" xml:space="preserve">
|
||||
<value>comboBox_type</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>设置映射</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>NewProxy</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>313, 95</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>227, 62</value>
|
||||
</data>
|
||||
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>74, 22</value>
|
||||
</data>
|
||||
<data name="button1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Popup</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>78, 64</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 20</value>
|
||||
</data>
|
||||
<data name="comboBox_type.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 11</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 35</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 35</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 66</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 11</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 8</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 8</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items" xml:space="preserve">
|
||||
<value>(自动)</value>
|
||||
</data>
|
||||
</root>
|
|
@ -55,14 +55,14 @@ namespace PortProxyGUI
|
|||
return proxies.ToArray();
|
||||
}
|
||||
|
||||
public static void AddProxy(string action, string type, string listenOn, int listenPort, string connectTo, int connectPort)
|
||||
public static void AddOrUpdateProxy(Rule rule)
|
||||
{
|
||||
CmdRunner.Execute($"netsh interface portproxy {action} {type} listenaddress={listenOn} listenport={listenPort} connectaddress={connectTo} connectport={connectPort}");
|
||||
CmdRunner.Execute($"netsh interface portproxy add {rule.Type} listenaddress={rule.ListenOn} listenport={rule.ListenPort} connectaddress={rule.ConnectTo} connectport={rule.ConnectPort}");
|
||||
}
|
||||
|
||||
public static void DeleteProxy(string type, string listenOn, int listenPort)
|
||||
public static void DeleteProxy(Rule rule)
|
||||
{
|
||||
CmdRunner.Execute($"netsh interface portproxy delete {type} listenaddress={listenOn} listenport={listenPort}");
|
||||
CmdRunner.Execute($"netsh interface portproxy delete {rule.Type} listenaddress={rule.ListenOn} listenport={rule.ListenPort}");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,6 +71,12 @@ namespace PortProxyGUI.Data
|
|||
);",
|
||||
"CREATE UNIQUE INDEX IX_Rules_Type_ListenOn_ListenPort ON Rules(Type, ListenOn, ListenPort);",
|
||||
},
|
||||
|
||||
[new MigrationKey { MigrationId = "202201172103", ProductVersion = "1.2.0" }] = new[]
|
||||
{
|
||||
"ALTER TABLE rules ADD Note text;",
|
||||
"ALTER TABLE rules ADD `Group` text;",
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,12 +41,10 @@ namespace PortProxyGUI.Data
|
|||
public void Add<T>(T obj) where T : class
|
||||
{
|
||||
var newid = Guid.NewGuid().ToString();
|
||||
switch (obj)
|
||||
{
|
||||
case Rule rule:
|
||||
Sql($"INSERT INTO Rules (Id, Type, ListenOn, ListenPort, ConnectTo, ConnectPort) VALUES ({newid}, {rule.Type}, {rule.ListenOn}, {rule.ListenPort}, {rule.ConnectTo}, {rule.ConnectPort});");
|
||||
break;
|
||||
}
|
||||
|
||||
if (obj is Rule rule)
|
||||
Sql($"INSERT INTO Rules (Id, Type, ListenOn, ListenPort, ConnectTo, ConnectPort, Note, `Group`) VALUES ({newid}, {rule.Type}, {rule.ListenOn}, {rule.ListenPort}, {rule.ConnectTo}, {rule.ConnectPort}, {rule.Note ?? ""}, {rule.Group ?? ""});");
|
||||
else throw new NotSupportedException($"Adding {obj.GetType().FullName} is not supported.");
|
||||
}
|
||||
public void AddRange<T>(IEnumerable<T> objs) where T : class
|
||||
{
|
||||
|
@ -55,12 +53,8 @@ namespace PortProxyGUI.Data
|
|||
|
||||
public void Update<T>(T obj) where T : class
|
||||
{
|
||||
switch (obj)
|
||||
{
|
||||
case Rule rule:
|
||||
Sql($"UPDATE Rules SET Type={rule.Type}, ListenOn={rule.ListenOn}, ListenPort={rule.ListenPort}, ConnectTo={rule.ConnectTo}, ConnectPort={rule.ConnectPort} WHERE Id={rule.Id};");
|
||||
break;
|
||||
}
|
||||
if (obj is Rule rule) Sql($"UPDATE Rules SET Type={rule.Type}, ListenOn={rule.ListenOn}, ListenPort={rule.ListenPort}, ConnectTo={rule.ConnectTo}, ConnectPort={rule.ConnectPort}, Note={rule.Note ?? ""}, `Group`={rule.Group ?? ""} WHERE Id={rule.Id};");
|
||||
else throw new NotSupportedException($"Updating {obj.GetType().FullName} is not supported.");
|
||||
}
|
||||
public void UpdateRange<T>(IEnumerable<T> objs) where T : class
|
||||
{
|
||||
|
@ -69,12 +63,8 @@ namespace PortProxyGUI.Data
|
|||
|
||||
public void Remove<T>(T obj) where T : class
|
||||
{
|
||||
switch (obj)
|
||||
{
|
||||
case Rule rule:
|
||||
Sql($"DELETE FROM Rules WHERE Id={rule.Id};");
|
||||
break;
|
||||
}
|
||||
if (obj is Rule rule) Sql($"DELETE FROM Rules WHERE Id={rule.Id};");
|
||||
else throw new NotSupportedException($"Removing {obj.GetType().FullName} is not supported.");
|
||||
}
|
||||
public void RemoveRange<T>(IEnumerable<T> objs) where T : class
|
||||
{
|
||||
|
|
|
@ -10,7 +10,9 @@ namespace PortProxyGUI.Data
|
|||
public string ListenOn { get; set; }
|
||||
public int ListenPort { get; set; }
|
||||
public string ConnectTo { get; set; }
|
||||
public long ConnectPort { get; set; }
|
||||
public int ConnectPort { get; set; }
|
||||
public string Note { get; set; }
|
||||
public string Group { get; set; }
|
||||
|
||||
public bool Equals(Rule other)
|
||||
{
|
||||
|
@ -19,7 +21,9 @@ namespace PortProxyGUI.Data
|
|||
&& ListenOn == other.ListenOn
|
||||
&& ListenPort == other.ListenPort
|
||||
&& ConnectTo == other.ConnectTo
|
||||
&& ConnectPort == other.ConnectPort;
|
||||
&& ConnectPort == other.ConnectPort
|
||||
&& Note == other.Note
|
||||
&& Group == other.Group;
|
||||
}
|
||||
|
||||
public bool EqualsWithKeys(Rule other)
|
||||
|
@ -29,5 +33,10 @@ namespace PortProxyGUI.Data
|
|||
&& ListenPort == other.ListenPort;
|
||||
}
|
||||
|
||||
public static int ParsePort(string portString)
|
||||
{
|
||||
if (int.TryParse(portString, out var port) && 0 < port && port < 65536) return port;
|
||||
else throw new NotSupportedException($"Invalid port string. ({portString})");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
<value>2</value>
|
||||
</data>
|
||||
<data name="label_Star.Text" xml:space="preserve">
|
||||
<value>为我点星:</value>
|
||||
<value>点星鼓励:</value>
|
||||
</data>
|
||||
<data name="label_Star.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleCenter</value>
|
||||
|
|
|
@ -31,22 +31,23 @@
|
|||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortProxyGUI));
|
||||
this.listViewProxies = 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.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
|
||||
this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItem_Enable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Disable = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_Refresh = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_New = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Modify = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem_Delete = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_Refresh = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem_About = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageListProxies = new System.Windows.Forms.ImageList(this.components);
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
|
@ -61,7 +62,8 @@
|
|||
this.columnHeader3,
|
||||
this.columnHeader4,
|
||||
this.columnHeader5,
|
||||
this.columnHeader6});
|
||||
this.columnHeader6,
|
||||
this.columnHeader7});
|
||||
this.listViewProxies.ContextMenuStrip = this.contextMenuStrip1;
|
||||
resources.ApplyResources(this.listViewProxies, "listViewProxies");
|
||||
this.listViewProxies.FullRowSelect = true;
|
||||
|
@ -98,6 +100,10 @@
|
|||
//
|
||||
resources.ApplyResources(this.columnHeader6, "columnHeader6");
|
||||
//
|
||||
// columnHeader7
|
||||
//
|
||||
resources.ApplyResources(this.columnHeader7, "columnHeader7");
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -130,6 +136,16 @@
|
|||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||
//
|
||||
// toolStripMenuItem_Refresh
|
||||
//
|
||||
this.toolStripMenuItem_Refresh.Name = "toolStripMenuItem_Refresh";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Refresh, "toolStripMenuItem_Refresh");
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
//
|
||||
// toolStripMenuItem_New
|
||||
//
|
||||
this.toolStripMenuItem_New.Name = "toolStripMenuItem_New";
|
||||
|
@ -150,16 +166,6 @@
|
|||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||
//
|
||||
// toolStripMenuItem_Refresh
|
||||
//
|
||||
this.toolStripMenuItem_Refresh.Name = "toolStripMenuItem_Refresh";
|
||||
resources.ApplyResources(this.toolStripMenuItem_Refresh, "toolStripMenuItem_Refresh");
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||
//
|
||||
// toolStripMenuItem_About
|
||||
//
|
||||
this.toolStripMenuItem_About.Name = "toolStripMenuItem_About";
|
||||
|
@ -167,6 +173,7 @@
|
|||
//
|
||||
// imageListProxies
|
||||
//
|
||||
this.imageListProxies.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
|
||||
this.imageListProxies.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListProxies.ImageStream")));
|
||||
this.imageListProxies.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageListProxies.Images.SetKeyName(0, "disable.png");
|
||||
|
@ -186,8 +193,6 @@
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView listViewProxies;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader3;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
|
@ -206,6 +211,8 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Enable;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Disable;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader7;
|
||||
internal System.Windows.Forms.ListView listViewProxies;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,14 +29,44 @@ namespace PortProxyGUI
|
|||
RefreshProxyList();
|
||||
}
|
||||
|
||||
private Data.Rule ParseRule(ListViewItem item)
|
||||
{
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
int listenPort, connectPort;
|
||||
|
||||
listenPort = Data.Rule.ParsePort(subItems[3].Text);
|
||||
connectPort = Data.Rule.ParsePort(subItems[5].Text);
|
||||
|
||||
var rule = new Data.Rule
|
||||
{
|
||||
Type = subItems[1].Text.Trim(),
|
||||
ListenOn = subItems[2].Text.Trim(),
|
||||
ListenPort = listenPort,
|
||||
ConnectTo = subItems[4].Text.Trim(),
|
||||
ConnectPort = connectPort,
|
||||
Note = subItems[6].Text.Trim(),
|
||||
Group = item.Group?.Header.Trim(),
|
||||
};
|
||||
return rule;
|
||||
}
|
||||
|
||||
private void EnableSelectedProxies()
|
||||
{
|
||||
var items = listViewProxies.SelectedItems.OfType<ListViewItem>();
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 1;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.AddProxy("add", subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text), subItems[4].Text, int.Parse(subItems[5].Text));
|
||||
|
||||
try
|
||||
{
|
||||
var rule = ParseRule(item);
|
||||
CmdUtil.AddOrUpdateProxy(rule);
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exclamation", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,8 +76,17 @@ namespace PortProxyGUI
|
|||
foreach (var item in items)
|
||||
{
|
||||
item.ImageIndex = 0;
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
CmdUtil.DeleteProxy(subItems[1].Text, subItems[2].Text, int.Parse(subItems[3].Text));
|
||||
|
||||
try
|
||||
{
|
||||
var rule = ParseRule(item);
|
||||
CmdUtil.DeleteProxy(rule);
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exclamation", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,19 +101,57 @@ namespace PortProxyGUI
|
|||
private void SetProxyForUpdate(SetProxyForm form)
|
||||
{
|
||||
var item = listViewProxies.SelectedItems.OfType<ListViewItem>().FirstOrDefault();
|
||||
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||
|
||||
if (int.TryParse(subItems[3].Text, out var listenPort) && 0 < listenPort && listenPort < 65536)
|
||||
try
|
||||
{
|
||||
form.UseUpdateMode(item, subItems[1].Text, subItems[2].Text, listenPort, subItems[4].Text, subItems[5].Text);
|
||||
var rule = ParseRule(item);
|
||||
form.UseUpdateMode(item, rule);
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exclamation", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitProxyGroups(Data.Rule[] rules)
|
||||
{
|
||||
listViewProxies.Groups.Clear();
|
||||
var groups = rules.GroupBy(x => x.Group).Select(x => new ListViewGroup(x.Key)).ToArray();
|
||||
listViewProxies.Groups.AddRange(groups);
|
||||
listViewProxies.ShowGroups = groups.Any(x => !x.Name.IsNullOrEmpty());
|
||||
}
|
||||
|
||||
private void InitProxyItems(Data.Rule[] rules, Data.Rule[] proxies)
|
||||
{
|
||||
listViewProxies.Items.Clear();
|
||||
foreach (var rule in rules)
|
||||
{
|
||||
var imageIndex = proxies.Any(p => p.EqualsWithKeys(rule)) ? 1 : 0;
|
||||
var group = listViewProxies.Groups.OfType<ListViewGroup>().FirstOrDefault(x => x.Header == rule.Group);
|
||||
|
||||
var item = new ListViewItem
|
||||
{
|
||||
ImageIndex = imageIndex,
|
||||
Tag = rule.Id,
|
||||
Group = group,
|
||||
};
|
||||
item.SubItems.AddRange(new[]
|
||||
{
|
||||
rule.Type,
|
||||
rule.ListenOn,
|
||||
rule.ListenPort.ToString(),
|
||||
rule.ConnectTo,
|
||||
rule.ConnectPort.ToString(),
|
||||
rule.Note ?? "",
|
||||
});
|
||||
listViewProxies.Items.Add(item);
|
||||
}
|
||||
else MessageBox.Show("无效端口号。", "无效端口号", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
public void RefreshProxyList()
|
||||
{
|
||||
var proxies = CmdUtil.GetProxies();
|
||||
var rules = Program.SqliteDbScope.Rules;
|
||||
var rules = Program.SqliteDbScope.Rules.ToArray();
|
||||
foreach (var proxy in proxies)
|
||||
{
|
||||
var matchedRule = rules.FirstOrDefault(r => r.EqualsWithKeys(proxy));
|
||||
|
@ -87,17 +164,9 @@ namespace PortProxyGUI
|
|||
Program.SqliteDbScope.AddRange(pendingAdds);
|
||||
Program.SqliteDbScope.UpdateRange(pendingUpdates);
|
||||
|
||||
listViewProxies.Items.Clear();
|
||||
rules = Program.SqliteDbScope.Rules;
|
||||
foreach (var rule in rules)
|
||||
{
|
||||
var imageIndex = proxies.Any(p => p.EqualsWithKeys(rule)) ? 1 : 0;
|
||||
var item = new ListViewItem { ImageIndex = imageIndex, Tag = rule.Id }.Then(vitem =>
|
||||
{
|
||||
vitem.SubItems.AddRange(new[] { rule.Type, rule.ListenOn, rule.ListenPort.ToString(), rule.ConnectTo, rule.ConnectPort.ToString() });
|
||||
});
|
||||
listViewProxies.Items.Add(item);
|
||||
}
|
||||
rules = Program.SqliteDbScope.Rules.ToArray();
|
||||
InitProxyGroups(rules);
|
||||
InitProxyItems(rules, proxies);
|
||||
}
|
||||
|
||||
private void contextMenuStrip1_MouseClick(object sender, MouseEventArgs e)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<PackageTags>portproxy TCP/IP redirector</PackageTags>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<Copyright>Copyright © nstandard.net 2020</Copyright>
|
||||
<Version>1.1.2</Version>
|
||||
<Version>1.2.0</Version>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -43,42 +43,21 @@
|
|||
<Compile Update="About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="PortProxyGUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PortProxyGUI.Designer.cs">
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="SetProxyForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="SetProxyForm.Designer.cs">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="About.zh-CN.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="PortProxyGUI.resx">
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="PortProxyGUI.zh-CN.resx">
|
||||
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="SetProxyForm.resx">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="SetProxyForm.zh-CN.resx">
|
||||
<DependentUpon>SetProxyForm.cs</DependentUpon>
|
||||
<LastGenOutput>SetProxyForm.Designer.cs</LastGenOutput>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,64 +1,4 @@
|
|||
<?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.
|
||||
-->
|
||||
<root>
|
||||
<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">
|
||||
|
@ -154,95 +94,16 @@
|
|||
<data name="columnHeader6.Width" type="System.Int32, mscorlib">
|
||||
<value>100</value>
|
||||
</data>
|
||||
<data name="columnHeader7.Text" xml:space="preserve">
|
||||
<value>Note</value>
|
||||
</data>
|
||||
<data name="columnHeader7.Width" type="System.Int32, mscorlib">
|
||||
<value>104</value>
|
||||
</data>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>155, 176</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="listViewProxies.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>624, 361</value>
|
||||
</data>
|
||||
<metadata name="imageListProxies.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>182, 17</value>
|
||||
</metadata>
|
||||
<data name="imageListProxies.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wQACvQ0AAH/AZQKFwGU
|
||||
Af8CAAH/AboKlQG6Af8iAAGUDBcBlAIAAboMlQG6IgAOFwIADpUiAAQXARYB9AL/AfQBFgQXAgAOlSIA
|
||||
AxcBFgH/Ab0BFgGUAfQB/wEWAxcCAAWVArsHlSIAAxcB9AG9AhcBlAH/AvQDFwIABJUBugL/AcEGlSIA
|
||||
AxcB/wEWARcBlAH/ApQB/wMXAgADlQG6Af8BwQG6Af8BwQWVIgADFwH/ApQB/wGUARcBFgH/AxcCAAOV
|
||||
Af8BwQKVAboB/wHBBJUiAAMXAvQB/wGUAhcBvQH0AxcCAAiVAboB/wHBA5UiAAMXARYB/wH0AZQBFgG9
|
||||
Af8BFgMXAgAJlQG6Af8DlSIABBcBFgH0Av8B9AEWBBcB/wEADpUB/yEADhcB/wEADpUB/yEAAZQMFwGU
|
||||
AgABugyVAboiAAH/AZQKFwGUAf8CAAH/AboKlQG6Af80AAH/CPQkAAFCAU0BPgcAAT4DAAEoAwABQAMA
|
||||
ARADAAEBAQABAQUAAYAXAAP/AQAB4AEHAv8EAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGA
|
||||
AQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGA
|
||||
AQEBgAEBBAABgAEAAYAFAAGAAQABgAUAAYABAQGAAQEEAAGAAQEBgAEBBAAC/wHgAQ8EAAs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="listViewProxies.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Name" xml:space="preserve">
|
||||
<value>listViewProxies</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_Enable.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 22</value>
|
||||
</data>
|
||||
|
@ -258,6 +119,15 @@
|
|||
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>151, 6</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_Refresh.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_Refresh.Text" xml:space="preserve">
|
||||
<value>Refresh (&F)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>151, 6</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_New.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 22</value>
|
||||
</data>
|
||||
|
@ -279,29 +149,105 @@
|
|||
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>151, 6</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_Refresh.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_Refresh.Text" xml:space="preserve">
|
||||
<value>Refresh (&F)</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>151, 6</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_About.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem_About.Text" xml:space="preserve">
|
||||
<value>About</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>155, 176</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip1</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="listViewProxies.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>4, 3, 4, 3</value>
|
||||
</data>
|
||||
<data name="listViewProxies.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>284, 261</value>
|
||||
</data>
|
||||
<metadata name="imageListProxies.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>182, 17</value>
|
||||
</metadata>
|
||||
<data name="imageListProxies.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
|
||||
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
|
||||
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA3AgAAAJNU0Z0AUkBTAIBAQIB
|
||||
AAGUAQABlAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMAAUADAAEQAwABAQEAAQgG
|
||||
AAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEAAfABygGmAQABMwUAATMB
|
||||
AAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEAAYABfAH/AQACUAH/AQAB
|
||||
kwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFmAwABmQMAAcwCAAEzAwAC
|
||||
MwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZAgABZgHMAgABZgH/AgAB
|
||||
mQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFmAgABzAGZAgACzAIAAcwB
|
||||
/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEzAQABmQEAATMBAAHMAQAB
|
||||
MwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFmAgABMwFmATMBAAEzAmYB
|
||||
AAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFmAQABMwKZAQABMwGZAcwB
|
||||
AAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEAATMBzAH/AQABMwH/ATMB
|
||||
AAEzAf8BZgEAATMB/wGZAQABMwH/AcwBAAEzAv8BAAFmAwABZgEAATMBAAFmAQABZgEAAWYBAAGZAQAB
|
||||
ZgEAAcwBAAFmAQAB/wEAAWYBMwIAAWYCMwEAAWYBMwFmAQABZgEzAZkBAAFmATMBzAEAAWYBMwH/AQAC
|
||||
ZgIAAmYBMwEAA2YBAAJmAZkBAAJmAcwBAAFmAZkCAAFmAZkBMwEAAWYBmQFmAQABZgKZAQABZgGZAcwB
|
||||
AAFmAZkB/wEAAWYBzAIAAWYBzAEzAQABZgHMAZkBAAFmAswBAAFmAcwB/wEAAWYB/wIAAWYB/wEzAQAB
|
||||
ZgH/AZkBAAFmAf8BzAEAAcwBAAH/AQAB/wEAAcwBAAKZAgABmQEzAZkBAAGZAQABmQEAAZkBAAHMAQAB
|
||||
mQMAAZkCMwEAAZkBAAFmAQABmQEzAcwBAAGZAQAB/wEAAZkBZgIAAZkBZgEzAQABmQEzAWYBAAGZAWYB
|
||||
mQEAAZkBZgHMAQABmQEzAf8BAAKZATMBAAKZAWYBAAOZAQACmQHMAQACmQH/AQABmQHMAgABmQHMATMB
|
||||
AAFmAcwBZgEAAZkBzAGZAQABmQLMAQABmQHMAf8BAAGZAf8CAAGZAf8BMwEAAZkBzAFmAQABmQH/AZkB
|
||||
AAGZAf8BzAEAAZkC/wEAAcwDAAGZAQABMwEAAcwBAAFmAQABzAEAAZkBAAHMAQABzAEAAZkBMwIAAcwC
|
||||
MwEAAcwBMwFmAQABzAEzAZkBAAHMATMBzAEAAcwBMwH/AQABzAFmAgABzAFmATMBAAGZAmYBAAHMAWYB
|
||||
mQEAAcwBZgHMAQABmQFmAf8BAAHMAZkCAAHMAZkBMwEAAcwBmQFmAQABzAKZAQABzAGZAcwBAAHMAZkB
|
||||
/wEAAswCAALMATMBAALMAWYBAALMAZkBAAPMAQACzAH/AQABzAH/AgABzAH/ATMBAAGZAf8BZgEAAcwB
|
||||
/wGZAQABzAH/AcwBAAHMAv8BAAHMAQABMwEAAf8BAAFmAQAB/wEAAZkBAAHMATMCAAH/AjMBAAH/ATMB
|
||||
ZgEAAf8BMwGZAQAB/wEzAcwBAAH/ATMB/wEAAf8BZgIAAf8BZgEzAQABzAJmAQAB/wFmAZkBAAH/AWYB
|
||||
zAEAAcwBZgH/AQAB/wGZAgAB/wGZATMBAAH/AZkBZgEAAf8CmQEAAf8BmQHMAQAB/wGZAf8BAAH/AcwC
|
||||
AAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEAAcwB/wFmAQAC/wGZAQAC
|
||||
/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEAASEBAAGlAQADXwEAA3cB
|
||||
AAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7Af8BAAGkAqABAAOAAwAB
|
||||
/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/8EAAr0NAAB/wGUChcBlAH/AgAB/wG6CpUBugH/IgAB
|
||||
lAwXAZQCAAG6DJUBuiIADhcCAA6VIgAEFwEWAfQC/wH0ARYEFwIADpUiAAMXARYB/wG9ARYBlAH0Af8B
|
||||
FgMXAgAFlQK7B5UiAAMXAfQBvQIXAZQB/wL0AxcCAASVAboC/wHBBpUiAAMXAf8BFgEXAZQB/wKUAf8D
|
||||
FwIAA5UBugH/AcEBugH/AcEFlSIAAxcB/wKUAf8BlAEXARYB/wMXAgADlQH/AcEClQG6Af8BwQSVIgAD
|
||||
FwL0Af8BlAIXAb0B9AMXAgAIlQG6Af8BwQOVIgADFwEWAf8B9AGUARYBvQH/ARYDFwIACZUBugH/A5Ui
|
||||
AAQXARYB9AL/AfQBFgQXAf8BAA6VAf8hAA4XAf8BAA6VAf8hAAGUDBcBlAIAAboMlQG6IgAB/wGUChcB
|
||||
lAH/AgAB/wG6CpUBugH/NAAB/wj0JAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD
|
||||
/wEAAeABBwL/BAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEE
|
||||
AAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAAGABQAB
|
||||
gAEAAYAFAAGAAQEBgAEBBAABgAEBAYABAQQAAv8B4AEPBAAL
|
||||
</value>
|
||||
</data>
|
||||
<data name="listViewProxies.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Name" xml:space="preserve">
|
||||
<value>listViewProxies</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>listViewProxies.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 12</value>
|
||||
<value>7, 17</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>624, 361</value>
|
||||
<value>284, 261</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -2462,7 +2408,7 @@
|
|||
</value>
|
||||
</data>
|
||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
<value>4, 3, 4, 3</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
|
@ -2474,108 +2420,114 @@
|
|||
<value>columnHeader1</value>
|
||||
</data>
|
||||
<data name=">>columnHeader1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader2.Name" xml:space="preserve">
|
||||
<value>columnHeader2</value>
|
||||
</data>
|
||||
<data name=">>columnHeader2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader3.Name" xml:space="preserve">
|
||||
<value>columnHeader3</value>
|
||||
</data>
|
||||
<data name=">>columnHeader3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader4.Name" xml:space="preserve">
|
||||
<value>columnHeader4</value>
|
||||
</data>
|
||||
<data name=">>columnHeader4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader5.Name" xml:space="preserve">
|
||||
<value>columnHeader5</value>
|
||||
</data>
|
||||
<data name=">>columnHeader5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader6.Name" xml:space="preserve">
|
||||
<value>columnHeader6</value>
|
||||
</data>
|
||||
<data name=">>columnHeader6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>columnHeader7.Name" xml:space="preserve">
|
||||
<value>columnHeader7</value>
|
||||
</data>
|
||||
<data name=">>columnHeader7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Enable.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Enable</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Enable.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Disable.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Disable</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Disable.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator3.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator3</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_New.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_New</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_New.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Modify.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Modify</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Modify.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Delete.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Delete</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Delete.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator1.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator1</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Refresh.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Refresh</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Refresh.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator2.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator2</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_New.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_New</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_New.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Modify.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Modify</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Modify.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Delete.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_Delete</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_Delete.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator1.Name" xml:space="preserve">
|
||||
<value>toolStripSeparator1</value>
|
||||
</data>
|
||||
<data name=">>toolStripSeparator1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_About.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem_About</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem_About.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>imageListProxies.Name" xml:space="preserve">
|
||||
<value>imageListProxies</value>
|
||||
</data>
|
||||
<data name=">>imageListProxies.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PortProxyGUI</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
|
@ -188,7 +188,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFEAQABEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAUABAAFYAQABEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -2578,4 +2578,13 @@
|
|||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="columnHeader7.Text" xml:space="preserve">
|
||||
<value>备注</value>
|
||||
</data>
|
||||
<data name=">>columnHeader7.Name" xml:space="preserve">
|
||||
<value>columnHeader7</value>
|
||||
</data>
|
||||
<data name=">>columnHeader7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
|
@ -29,99 +29,128 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetProxyForm));
|
||||
this.label_ListenOn = new System.Windows.Forms.Label();
|
||||
this.textBox_ListenOn = new System.Windows.Forms.TextBox();
|
||||
this.label_ConnectTo = new System.Windows.Forms.Label();
|
||||
this.textBox_ConnectTo = new System.Windows.Forms.TextBox();
|
||||
this.textBox_ConnectPort = new System.Windows.Forms.TextBox();
|
||||
this.label_ConnectPort = new System.Windows.Forms.Label();
|
||||
this.button_Set = new System.Windows.Forms.Button();
|
||||
this.label_Type = new System.Windows.Forms.Label();
|
||||
this.label_ListenPort = new System.Windows.Forms.Label();
|
||||
this.textBox_ListenPort = new System.Windows.Forms.TextBox();
|
||||
this.comboBox_Type = new System.Windows.Forms.ComboBox();
|
||||
this.label_Note = new System.Windows.Forms.Label();
|
||||
this.textBox_Note = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenOn = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox_connectTo = new System.Windows.Forms.TextBox();
|
||||
this.textBox_connectPort = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button_submit = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox_listenPort = new System.Windows.Forms.TextBox();
|
||||
this.comboBox_type = new System.Windows.Forms.ComboBox();
|
||||
this.comboBox_Group = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_ListenOn
|
||||
//
|
||||
resources.ApplyResources(this.label_ListenOn, "label_ListenOn");
|
||||
this.label_ListenOn.Name = "label_ListenOn";
|
||||
//
|
||||
// textBox_ListenOn
|
||||
//
|
||||
resources.ApplyResources(this.textBox_ListenOn, "textBox_ListenOn");
|
||||
this.textBox_ListenOn.Name = "textBox_ListenOn";
|
||||
//
|
||||
// label_ConnectTo
|
||||
//
|
||||
resources.ApplyResources(this.label_ConnectTo, "label_ConnectTo");
|
||||
this.label_ConnectTo.Name = "label_ConnectTo";
|
||||
//
|
||||
// textBox_ConnectTo
|
||||
//
|
||||
resources.ApplyResources(this.textBox_ConnectTo, "textBox_ConnectTo");
|
||||
this.textBox_ConnectTo.Name = "textBox_ConnectTo";
|
||||
//
|
||||
// textBox_ConnectPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_ConnectPort, "textBox_ConnectPort");
|
||||
this.textBox_ConnectPort.Name = "textBox_ConnectPort";
|
||||
//
|
||||
// label_ConnectPort
|
||||
//
|
||||
resources.ApplyResources(this.label_ConnectPort, "label_ConnectPort");
|
||||
this.label_ConnectPort.Name = "label_ConnectPort";
|
||||
//
|
||||
// button_Set
|
||||
//
|
||||
resources.ApplyResources(this.button_Set, "button_Set");
|
||||
this.button_Set.Name = "button_Set";
|
||||
this.button_Set.UseVisualStyleBackColor = true;
|
||||
this.button_Set.Click += new System.EventHandler(this.button_Set_Click);
|
||||
//
|
||||
// label_Type
|
||||
//
|
||||
resources.ApplyResources(this.label_Type, "label_Type");
|
||||
this.label_Type.Name = "label_Type";
|
||||
//
|
||||
// label_ListenPort
|
||||
//
|
||||
resources.ApplyResources(this.label_ListenPort, "label_ListenPort");
|
||||
this.label_ListenPort.Name = "label_ListenPort";
|
||||
//
|
||||
// textBox_ListenPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_ListenPort, "textBox_ListenPort");
|
||||
this.textBox_ListenPort.Name = "textBox_ListenPort";
|
||||
//
|
||||
// comboBox_Type
|
||||
//
|
||||
resources.ApplyResources(this.comboBox_Type, "comboBox_Type");
|
||||
this.comboBox_Type.FormattingEnabled = true;
|
||||
this.comboBox_Type.Items.AddRange(new object[] {
|
||||
resources.GetString("comboBox_Type.Items"),
|
||||
resources.GetString("comboBox_Type.Items1"),
|
||||
resources.GetString("comboBox_Type.Items2"),
|
||||
resources.GetString("comboBox_Type.Items3"),
|
||||
resources.GetString("comboBox_Type.Items4")});
|
||||
this.comboBox_Type.Name = "comboBox_Type";
|
||||
//
|
||||
// label_Note
|
||||
//
|
||||
resources.ApplyResources(this.label_Note, "label_Note");
|
||||
this.label_Note.Name = "label_Note";
|
||||
//
|
||||
// textBox_Note
|
||||
//
|
||||
resources.ApplyResources(this.textBox_Note, "textBox_Note");
|
||||
this.textBox_Note.Name = "textBox_Note";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// textBox_listenOn
|
||||
// comboBox_Group
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenOn, "textBox_listenOn");
|
||||
this.textBox_listenOn.Name = "textBox_listenOn";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// textBox_connectTo
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectTo, "textBox_connectTo");
|
||||
this.textBox_connectTo.Name = "textBox_connectTo";
|
||||
//
|
||||
// textBox_connectPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_connectPort, "textBox_connectPort");
|
||||
this.textBox_connectPort.Name = "textBox_connectPort";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// button_submit
|
||||
//
|
||||
resources.ApplyResources(this.button_submit, "button_submit");
|
||||
this.button_submit.Name = "button_submit";
|
||||
this.button_submit.UseVisualStyleBackColor = true;
|
||||
this.button_submit.Click += new System.EventHandler(this.button_submit_Click);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// textBox_listenPort
|
||||
//
|
||||
resources.ApplyResources(this.textBox_listenPort, "textBox_listenPort");
|
||||
this.textBox_listenPort.Name = "textBox_listenPort";
|
||||
//
|
||||
// comboBox_type
|
||||
//
|
||||
resources.ApplyResources(this.comboBox_type, "comboBox_type");
|
||||
this.comboBox_type.FormattingEnabled = true;
|
||||
this.comboBox_type.Items.AddRange(new object[] {
|
||||
resources.GetString("comboBox_type.Items"),
|
||||
resources.GetString("comboBox_type.Items1"),
|
||||
resources.GetString("comboBox_type.Items2"),
|
||||
resources.GetString("comboBox_type.Items3"),
|
||||
resources.GetString("comboBox_type.Items4")});
|
||||
this.comboBox_type.Name = "comboBox_type";
|
||||
resources.ApplyResources(this.comboBox_Group, "comboBox_Group");
|
||||
this.comboBox_Group.FormattingEnabled = true;
|
||||
this.comboBox_Group.Name = "comboBox_Group";
|
||||
//
|
||||
// SetProxyForm
|
||||
//
|
||||
this.AcceptButton = this.button_submit;
|
||||
this.AcceptButton = this.button_Set;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.comboBox_type);
|
||||
this.Controls.Add(this.textBox_listenPort);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.button_submit);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox_connectPort);
|
||||
this.Controls.Add(this.textBox_connectTo);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox_listenOn);
|
||||
this.Controls.Add(this.comboBox_Group);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox_Note);
|
||||
this.Controls.Add(this.label_Note);
|
||||
this.Controls.Add(this.comboBox_Type);
|
||||
this.Controls.Add(this.textBox_ListenPort);
|
||||
this.Controls.Add(this.label_ListenPort);
|
||||
this.Controls.Add(this.label_Type);
|
||||
this.Controls.Add(this.button_Set);
|
||||
this.Controls.Add(this.label_ConnectPort);
|
||||
this.Controls.Add(this.textBox_ConnectPort);
|
||||
this.Controls.Add(this.textBox_ConnectTo);
|
||||
this.Controls.Add(this.label_ConnectTo);
|
||||
this.Controls.Add(this.textBox_ListenOn);
|
||||
this.Controls.Add(this.label_ListenOn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
|
@ -136,16 +165,20 @@
|
|||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_ListenOn;
|
||||
private System.Windows.Forms.TextBox textBox_ListenOn;
|
||||
private System.Windows.Forms.Label label_ConnectTo;
|
||||
private System.Windows.Forms.TextBox textBox_ConnectTo;
|
||||
private System.Windows.Forms.TextBox textBox_ConnectPort;
|
||||
private System.Windows.Forms.Label label_ConnectPort;
|
||||
private System.Windows.Forms.Button button_Set;
|
||||
private System.Windows.Forms.Label label_Type;
|
||||
private System.Windows.Forms.Label label_ListenPort;
|
||||
private System.Windows.Forms.TextBox textBox_ListenPort;
|
||||
private System.Windows.Forms.ComboBox comboBox_Type;
|
||||
private System.Windows.Forms.Label label_Note;
|
||||
private System.Windows.Forms.TextBox textBox_Note;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox_listenOn;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox_connectTo;
|
||||
private System.Windows.Forms.TextBox textBox_connectPort;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button_submit;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox_listenPort;
|
||||
private System.Windows.Forms.ComboBox comboBox_type;
|
||||
private System.Windows.Forms.ComboBox comboBox_Group;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
using NStandard;
|
||||
using PortProxyGUI.Data;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -12,46 +13,47 @@ namespace PortProxyGUI
|
|||
private string AutoTypeString { get; }
|
||||
|
||||
private bool _updateMode;
|
||||
private ListViewItem _updateLiveViewItem;
|
||||
private string _oldType;
|
||||
private string _oldListenOn;
|
||||
private int _oldListenPort;
|
||||
private ListViewItem _listViewItem;
|
||||
private Rule _itemRule;
|
||||
|
||||
public SetProxyForm(PortProxyGUI parent)
|
||||
{
|
||||
ParentWindow = parent;
|
||||
InitializeComponent();
|
||||
AutoTypeString = comboBox_type.Text = comboBox_type.Items.OfType<string>().First();
|
||||
AutoTypeString = comboBox_Type.Text = comboBox_Type.Items.OfType<string>().First();
|
||||
}
|
||||
|
||||
public void UseNormalMode()
|
||||
{
|
||||
_updateMode = false;
|
||||
_updateLiveViewItem = null;
|
||||
_oldType = null;
|
||||
_oldListenOn = null;
|
||||
_oldListenPort = 0;
|
||||
_listViewItem = null;
|
||||
_itemRule = null;
|
||||
|
||||
comboBox_type.Text = AutoTypeString;
|
||||
textBox_listenOn.Text = "*";
|
||||
textBox_listenPort.Text = "";
|
||||
textBox_connectTo.Text = "";
|
||||
textBox_connectPort.Text = "";
|
||||
comboBox_Type.Text = AutoTypeString;
|
||||
comboBox_Group.Text = "";
|
||||
|
||||
textBox_ListenOn.Text = "*";
|
||||
textBox_ListenPort.Text = "";
|
||||
textBox_ConnectTo.Text = "";
|
||||
textBox_ConnectPort.Text = "";
|
||||
textBox_Note.Text = "";
|
||||
}
|
||||
|
||||
public void UseUpdateMode(ListViewItem item, string type, string listenOn, int listenPort, string connectTo, string connectPort)
|
||||
public void UseUpdateMode(ListViewItem item, Rule rule)
|
||||
{
|
||||
_updateMode = true;
|
||||
_updateLiveViewItem = item;
|
||||
_oldType = type;
|
||||
_oldListenOn = listenOn.Trim().ToLower();
|
||||
_oldListenPort = listenPort;
|
||||
_listViewItem = item;
|
||||
|
||||
comboBox_type.Text = type;
|
||||
textBox_listenOn.Text = listenOn.ToString();
|
||||
textBox_listenPort.Text = listenPort.ToString();
|
||||
textBox_connectTo.Text = connectTo;
|
||||
textBox_connectPort.Text = connectPort;
|
||||
_itemRule = rule;
|
||||
|
||||
comboBox_Type.Text = rule.Type;
|
||||
comboBox_Group.Text = rule.Group;
|
||||
|
||||
textBox_ListenOn.Text = rule.ListenOn;
|
||||
textBox_ListenPort.Text = rule.ListenPort.ToString();
|
||||
textBox_ConnectTo.Text = rule.ConnectTo;
|
||||
textBox_ConnectPort.Text = rule.ConnectPort.ToString();
|
||||
textBox_Note.Text = rule.Note;
|
||||
}
|
||||
|
||||
private bool IsIPv6(string ip)
|
||||
|
@ -66,60 +68,75 @@ namespace PortProxyGUI
|
|||
return $"{from}to{to}";
|
||||
}
|
||||
|
||||
private void button_submit_Click(object sender, EventArgs e)
|
||||
private void button_Set_Click(object sender, EventArgs e)
|
||||
{
|
||||
var type = comboBox_type.Text.Trim();
|
||||
var listenOn = textBox_listenOn.Text.Trim().ToLower();
|
||||
var connectTo = textBox_connectTo.Text.Trim().ToLower();
|
||||
var listenPort = textBox_listenPort.Text.Trim();
|
||||
var connectPort = textBox_connectPort.Text.Trim();
|
||||
int listenPort, connectPort;
|
||||
|
||||
if (!int.TryParse(listenPort, out var _listenPort) || _listenPort < 0 || _listenPort > 65535)
|
||||
try
|
||||
{
|
||||
MessageBox.Show($"The listen port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
listenPort = Rule.ParsePort(textBox_ListenPort.Text);
|
||||
connectPort = Rule.ParsePort(textBox_ConnectPort.Text);
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Invalid port", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(connectPort, out var _connectPort) || _connectPort < 0 || _connectPort > 65535)
|
||||
var rule = new Rule
|
||||
{
|
||||
MessageBox.Show($"The connect port is invalid.", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
Type = comboBox_Type.Text.Trim(),
|
||||
ListenOn = textBox_ListenOn.Text.Trim(),
|
||||
ListenPort = listenPort,
|
||||
ConnectTo = textBox_ConnectTo.Text.Trim(),
|
||||
ConnectPort = connectPort,
|
||||
Note = textBox_Note.Text.Trim(),
|
||||
Group = comboBox_Group.Text.Trim(),
|
||||
};
|
||||
|
||||
if (type == AutoTypeString) type = GetPassType(listenOn, connectTo);
|
||||
if (rule.Type == AutoTypeString) rule.Type = GetPassType(rule.ListenOn, rule.ConnectTo);
|
||||
|
||||
if (!new[] { "v4tov4", "v4tov6", "v6tov4", "v6tov6" }.Contains(type))
|
||||
if (!new[] { "v4tov4", "v4tov6", "v6tov4", "v6tov6" }.Contains(rule.Type))
|
||||
{
|
||||
MessageBox.Show($"Unknow type for ({listenOn} -> {connectTo}).", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
MessageBox.Show($"Unknow type for ({rule.ListenOn} -> {rule.ConnectTo}).", "Exclamation", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_updateMode)
|
||||
{
|
||||
var rule = Program.SqliteDbScope.GetRule(_oldType, _oldListenOn, _oldListenPort);
|
||||
CmdUtil.DeleteProxy(_oldType, _oldListenOn, _oldListenPort);
|
||||
Program.SqliteDbScope.Remove(rule);
|
||||
var oldRule = Program.SqliteDbScope.GetRule(_itemRule.Type, _itemRule.ListenOn, _itemRule.ListenPort);
|
||||
CmdUtil.DeleteProxy(oldRule);
|
||||
Program.SqliteDbScope.Remove(oldRule);
|
||||
|
||||
rule.Type = type;
|
||||
rule.ListenOn = listenOn;
|
||||
rule.ListenPort = _listenPort;
|
||||
rule.ConnectTo = connectTo;
|
||||
rule.ConnectPort = _connectPort;
|
||||
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
CmdUtil.AddOrUpdateProxy(rule);
|
||||
Program.SqliteDbScope.Add(rule);
|
||||
|
||||
_updateLiveViewItem.ImageIndex = 1;
|
||||
var subItems = _updateLiveViewItem.SubItems;
|
||||
subItems[1].Text = type;
|
||||
subItems[2].Text = listenOn;
|
||||
subItems[3].Text = _listenPort.ToString();
|
||||
subItems[4].Text = connectTo;
|
||||
subItems[5].Text = _connectPort.ToString();
|
||||
_listViewItem.ImageIndex = 1;
|
||||
var subItems = _listViewItem.SubItems;
|
||||
subItems[1].Text = rule.Type;
|
||||
subItems[2].Text = rule.ListenOn;
|
||||
subItems[3].Text = rule.ListenPort.ToString();
|
||||
subItems[4].Text = rule.ConnectTo;
|
||||
subItems[5].Text = rule.ConnectPort.ToString();
|
||||
subItems[6].Text = rule.Note;
|
||||
|
||||
if (rule.Group == null) _listViewItem.Group = null;
|
||||
else
|
||||
{
|
||||
var listView = ParentWindow.listViewProxies;
|
||||
var group = listView.Groups.OfType<ListViewGroup>().FirstOrDefault(x => x.Name == rule.Group);
|
||||
if (group == null)
|
||||
{
|
||||
group = new ListViewGroup(rule.Group);
|
||||
listView.Groups.Add(group);
|
||||
}
|
||||
|
||||
_listViewItem.Group = group;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmdUtil.AddProxy("add", type, listenOn, _listenPort, connectTo, _connectPort);
|
||||
CmdUtil.AddOrUpdateProxy(rule);
|
||||
ParentWindow.RefreshProxyList();
|
||||
}
|
||||
|
||||
|
|
|
@ -118,22 +118,395 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="label_ListenOn.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 11</value>
|
||||
<data name="label_ListenOn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 41</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="label_ListenOn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<data name="label_ListenOn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<data name="label_ListenOn.Text" xml:space="preserve">
|
||||
<value>Listen on</value>
|
||||
</data>
|
||||
<data name=">>label_ListenOn.Name" xml:space="preserve">
|
||||
<value>label_ListenOn</value>
|
||||
</data>
|
||||
<data name=">>label_ListenOn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_ListenOn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_ListenOn.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="textBox_ListenOn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>83, 38</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="textBox_ListenOn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_ListenOn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 21</value>
|
||||
</data>
|
||||
<data name="textBox_ListenOn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_ListenOn.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="textBox_ListenOn.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenOn.Name" xml:space="preserve">
|
||||
<value>textBox_ListenOn</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenOn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenOn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenOn.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="label_ConnectTo.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label_ConnectTo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 66</value>
|
||||
</data>
|
||||
<data name="label_ConnectTo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label_ConnectTo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label_ConnectTo.Text" xml:space="preserve">
|
||||
<value>Connect to</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectTo.Name" xml:space="preserve">
|
||||
<value>label_ConnectTo</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectTo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectTo.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectTo.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectTo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>83, 63</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectTo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectTo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 21</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectTo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectTo.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectTo.Name" xml:space="preserve">
|
||||
<value>textBox_ConnectTo</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectTo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectTo.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectTo.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>256, 63</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 21</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="textBox_ConnectPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectPort.Name" xml:space="preserve">
|
||||
<value>textBox_ConnectPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_ConnectPort.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label_ConnectPort.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label_ConnectPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 66</value>
|
||||
</data>
|
||||
<data name="label_ConnectPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label_ConnectPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label_ConnectPort.Text" xml:space="preserve">
|
||||
<value>Port</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectPort.Name" xml:space="preserve">
|
||||
<value>label_ConnectPort</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_ConnectPort.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="button_Set.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>217, 98</value>
|
||||
</data>
|
||||
<data name="button_Set.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 21</value>
|
||||
</data>
|
||||
<data name="button_Set.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="button_Set.Text" xml:space="preserve">
|
||||
<value>Set</value>
|
||||
</data>
|
||||
<data name=">>button_Set.Name" xml:space="preserve">
|
||||
<value>button_Set</value>
|
||||
</data>
|
||||
<data name=">>button_Set.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button_Set.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>button_Set.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label_Type.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label_Type.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
</data>
|
||||
<data name="label_Type.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label_Type.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label_Type.Text" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name=">>label_Type.Name" xml:space="preserve">
|
||||
<value>label_Type</value>
|
||||
</data>
|
||||
<data name=">>label_Type.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_Type.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_Type.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="label_ListenPort.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label_ListenPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 41</value>
|
||||
</data>
|
||||
<data name="label_ListenPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label_ListenPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label_ListenPort.Text" xml:space="preserve">
|
||||
<value>Port</value>
|
||||
</data>
|
||||
<data name=">>label_ListenPort.Name" xml:space="preserve">
|
||||
<value>label_ListenPort</value>
|
||||
</data>
|
||||
<data name=">>label_ListenPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_ListenPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_ListenPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="textBox_ListenPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>256, 38</value>
|
||||
</data>
|
||||
<data name="textBox_ListenPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_ListenPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 21</value>
|
||||
</data>
|
||||
<data name="textBox_ListenPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="textBox_ListenPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenPort.Name" xml:space="preserve">
|
||||
<value>textBox_ListenPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_ListenPort.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Popup</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Items" xml:space="preserve">
|
||||
<value>(Auto)</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Items1" xml:space="preserve">
|
||||
<value>v4tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Items2" xml:space="preserve">
|
||||
<value>v4tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Items3" xml:space="preserve">
|
||||
<value>v6tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Items4" xml:space="preserve">
|
||||
<value>v6tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>83, 6</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 20</value>
|
||||
</data>
|
||||
<data name="comboBox_Type.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>comboBox_Type.Name" xml:space="preserve">
|
||||
<value>comboBox_Type</value>
|
||||
</data>
|
||||
<data name=">>comboBox_Type.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox_Type.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox_Type.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label_Note.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label_Note.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label_Note.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 102</value>
|
||||
</data>
|
||||
<data name="label_Note.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label_Note.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="label_Note.Text" xml:space="preserve">
|
||||
<value>Note</value>
|
||||
</data>
|
||||
<data name=">>label_Note.Name" xml:space="preserve">
|
||||
<value>label_Note</value>
|
||||
</data>
|
||||
<data name=">>label_Note.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label_Note.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label_Note.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="textBox_Note.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>83, 98</value>
|
||||
</data>
|
||||
<data name="textBox_Note.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_Note.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 21</value>
|
||||
</data>
|
||||
<data name="textBox_Note.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="textBox_Note.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_Note.Name" xml:space="preserve">
|
||||
<value>textBox_Note</value>
|
||||
</data>
|
||||
<data name=">>textBox_Note.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_Note.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_Note.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>215, 9</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>35, 12</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
|
@ -144,292 +517,33 @@
|
|||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 8</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="textBox_listenOn.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="textBox_listenOn.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Name" xml:space="preserve">
|
||||
<value>textBox_listenOn</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenOn.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 35</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>65, 12</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Connect to</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>79, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>125, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="textBox_connectTo.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Name" xml:space="preserve">
|
||||
<value>textBox_connectTo</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectTo.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 32</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="textBox_connectPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Name" xml:space="preserve">
|
||||
<value>textBox_connectPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_connectPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 35</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Port</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="button_submit.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>227, 62</value>
|
||||
</data>
|
||||
<data name="button_submit.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>74, 22</value>
|
||||
</data>
|
||||
<data name="button_submit.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="button_submit.Text" xml:space="preserve">
|
||||
<value>Set</value>
|
||||
</data>
|
||||
<data name=">>button_submit.Name" xml:space="preserve">
|
||||
<value>button_submit</value>
|
||||
</data>
|
||||
<data name=">>button_submit.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button_submit.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>button_submit.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 66</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>210, 11</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>29, 12</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Port</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>244, 8</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>57, 21</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="textBox_listenPort.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
|
||||
<value>Center</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Name" xml:space="preserve">
|
||||
<value>textBox_listenPort</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>textBox_listenPort.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="comboBox_type.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<data name="comboBox_Group.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Popup</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items" xml:space="preserve">
|
||||
<value>(Auto)</value>
|
||||
<data name="comboBox_Group.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>256, 6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items1" xml:space="preserve">
|
||||
<value>v4tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items2" xml:space="preserve">
|
||||
<value>v4tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items3" xml:space="preserve">
|
||||
<value>v6tov4</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Items4" xml:space="preserve">
|
||||
<value>v6tov6</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>78, 64</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<data name="comboBox_Group.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 2, 3, 2</value>
|
||||
</data>
|
||||
<data name="comboBox_type.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 20</value>
|
||||
<data name="comboBox_Group.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 20</value>
|
||||
</data>
|
||||
<data name="comboBox_type.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
<data name="comboBox_Group.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Name" xml:space="preserve">
|
||||
<value>comboBox_type</value>
|
||||
<data name=">>comboBox_Group.Name" xml:space="preserve">
|
||||
<value>comboBox_Group</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Type" xml:space="preserve">
|
||||
<data name=">>comboBox_Group.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.Parent" xml:space="preserve">
|
||||
<data name=">>comboBox_Group.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBox_type.ZOrder" xml:space="preserve">
|
||||
<data name=">>comboBox_Group.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
|
@ -439,7 +553,7 @@
|
|||
<value>6, 12</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>313, 95</value>
|
||||
<value>344, 131</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue