v1.0.6
This commit is contained in:
parent
16bf3ed339
commit
f0e08f50b0
|
@ -4,7 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{1B166039-E98C-404A-89A5-C981364B5546}</ProjectGuid>
|
<ProjectGuid>{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>PortProxyGUI</RootNamespace>
|
<RootNamespace>PortProxyGUI</RootNamespace>
|
||||||
<AssemblyName>PortProxyGUI</AssemblyName>
|
<AssemblyName>PortProxyGUI</AssemblyName>
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
@ -0,0 +1,77 @@
|
||||||
|
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.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";
|
||||||
|
//
|
||||||
|
// About
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this, "$this");
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
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
|
@ -0,0 +1,229 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="linkLabel1.Text" xml:space="preserve">
|
||||||
|
<value>https://github.com/zmjack/PortProxyGUI</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLabel1.Name" xml:space="preserve">
|
||||||
|
<value>linkLabel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLabel1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLabel1.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLabel1.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="label1.Text" xml:space="preserve">
|
||||||
|
<value>这是款免费软件,
|
||||||
|
您可以在 GitHub 上浏览项目源代码。</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=4.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>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="label_version.Text" xml:space="preserve">
|
||||||
|
<value>Port Proxy GUI</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label_version.Name" xml:space="preserve">
|
||||||
|
<value>label_version</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label_version.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label_version.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>label_version.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>About</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>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.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>296, 109</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="mscorlib" name="mscorlib, Version=2.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=2.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="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>10, 31</value>
|
||||||
|
</data>
|
||||||
|
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>275, 47</value>
|
||||||
|
</data>
|
||||||
|
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="label1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||||
|
<value>MiddleCenter</value>
|
||||||
|
</data>
|
||||||
|
<data name="label_version.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>10, 6</value>
|
||||||
|
</data>
|
||||||
|
<data name="label_version.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>275, 24</value>
|
||||||
|
</data>
|
||||||
|
<data name="label_version.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="label_version.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||||
|
<value>MiddleCenter</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>10, 78</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>275, 25</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLabel1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||||
|
<value>TopCenter</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,158 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{1B166039-E98C-404A-89A5-C981364B5546}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>PortProxyGUI</RootNamespace>
|
||||||
|
<AssemblyName>PortProxyGUI</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestCertificateThumbprint>BEF27898E4C102E806F3241497048E740EC39033</ManifestCertificateThumbprint>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestKeyFile>PortProxyGUI - NET_TemporaryKey.pfx</ManifestKeyFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<GenerateManifests>false</GenerateManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SignManifests>true</SignManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetZone>LocalIntranet</TargetZone>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="About.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="About.Designer.cs">
|
||||||
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SetProxyForm.cs">
|
||||||
|
<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">
|
||||||
|
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="About.resx">
|
||||||
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="About.zh-CN.resx">
|
||||||
|
<DependentUpon>About.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">
|
||||||
|
<DependentUpon>PortProxyGUI.cs</DependentUpon>
|
||||||
|
</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>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="app.manifest" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="..\PortProxyGUI.Shared\PortProxyGUI.Shared.projitems" Label="Shared" />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
|
@ -0,0 +1,168 @@
|
||||||
|
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.listView1 = new System.Windows.Forms.ListView();
|
||||||
|
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.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.contextMenuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// listView1
|
||||||
|
//
|
||||||
|
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
|
this.columnHeader1,
|
||||||
|
this.columnHeader2,
|
||||||
|
this.columnHeader3,
|
||||||
|
this.columnHeader4,
|
||||||
|
this.columnHeader5});
|
||||||
|
this.listView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
|
resources.ApplyResources(this.listView1, "listView1");
|
||||||
|
this.listView1.FullRowSelect = true;
|
||||||
|
this.listView1.HideSelection = false;
|
||||||
|
this.listView1.Name = "listView1";
|
||||||
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.listView1.View = System.Windows.Forms.View.Details;
|
||||||
|
this.listView1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
|
||||||
|
this.listView1.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
|
||||||
|
this.listView1.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");
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.toolStripMenuItem_New,
|
||||||
|
this.toolStripMenuItem_Modify,
|
||||||
|
this.toolStripMenuItem_Delete,
|
||||||
|
this.toolStripSeparator1,
|
||||||
|
this.toolStripMenuItem_Refresh,
|
||||||
|
this.toolStripSeparator2,
|
||||||
|
this.toolStripMenuItem_About});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||||
|
this.contextMenuStrip1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.contextMenuStrip1_MouseClick);
|
||||||
|
//
|
||||||
|
// 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");
|
||||||
|
//
|
||||||
|
// PortProxyGUI
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this, "$this");
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.listView1);
|
||||||
|
this.Name = "PortProxyGUI";
|
||||||
|
this.Load += new System.EventHandler(this.PortProxyGUI_Load);
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.ListView listView1;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||||
|
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 columnHeader3;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Refresh;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_About;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem_Modify;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,184 @@
|
||||||
|
using PortProxyGUI._extern.NStandard;
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
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();
|
||||||
|
listView1.ListViewItemSorter = lvwColumnSorter;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PortProxyGUI_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshProxyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeleteSelectedProxies()
|
||||||
|
{
|
||||||
|
var items = listView1.SelectedItems.OfType<ListViewItem>();
|
||||||
|
foreach (var item in items)
|
||||||
|
{
|
||||||
|
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||||
|
var type = subItems[0].Text;
|
||||||
|
var listenOn = subItems[1].Text;
|
||||||
|
var listenPort = subItems[2].Text;
|
||||||
|
var output = CmdRunner.Execute($"netsh interface portproxy delete {type} listenaddress={listenOn} listenport={listenPort}");
|
||||||
|
}
|
||||||
|
RefreshProxyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetProxyForUpdate(SetProxyForm form)
|
||||||
|
{
|
||||||
|
var item = listView1.SelectedItems.OfType<ListViewItem>().FirstOrDefault();
|
||||||
|
{
|
||||||
|
var subItems = item.SubItems.OfType<ListViewSubItem>().ToArray();
|
||||||
|
var type = subItems[0].Text;
|
||||||
|
var listenOn = subItems[1].Text;
|
||||||
|
var listenPort = subItems[2].Text;
|
||||||
|
var connectTo = subItems[3].Text;
|
||||||
|
var connectPort = subItems[4].Text;
|
||||||
|
form.UseUpdateMode(type, listenOn, listenPort, connectTo, connectPort);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshProxyList()
|
||||||
|
{
|
||||||
|
var output = CmdRunner.Execute("netsh interface portproxy show all");
|
||||||
|
var types = new[]
|
||||||
|
{
|
||||||
|
new ProxyType("ipv4", "ipv4"),
|
||||||
|
new ProxyType("ipv4", "ipv6"),
|
||||||
|
new ProxyType("ipv6", "ipv4"),
|
||||||
|
new ProxyType("ipv6", "ipv6"),
|
||||||
|
};
|
||||||
|
|
||||||
|
var proxies = types.SelectMany(type =>
|
||||||
|
{
|
||||||
|
var typeProxies = output
|
||||||
|
.Project(new Regex($@"{type.From}:[^\n]+?{type.To}:\r\n\r\n.+?\r\n--------------- ---------- --------------- ----------\r\n(.+?)\r\n\r\n", RegexOptions.Singleline))
|
||||||
|
?.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
|
||||||
|
.Select(line =>
|
||||||
|
{
|
||||||
|
var parts = line.Resolve(new Regex(@"^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)$"));
|
||||||
|
return new PortProxy
|
||||||
|
{
|
||||||
|
Type = type.Type,
|
||||||
|
ListenOn = parts[1].FirstOrDefault(),
|
||||||
|
ListenPort = parts[2].FirstOrDefault(),
|
||||||
|
ConnectTo = parts[3].FirstOrDefault(),
|
||||||
|
ConnectPort = parts[4].FirstOrDefault(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
return typeProxies ?? new PortProxy[0];
|
||||||
|
});
|
||||||
|
|
||||||
|
listView1.Items.Clear();
|
||||||
|
foreach (var proxy in proxies)
|
||||||
|
{
|
||||||
|
listView1.Items.Add(new ListViewItem(proxy.Type).Then(vitem =>
|
||||||
|
{
|
||||||
|
vitem.SubItems.AddRange(new[] { proxy.ListenOn, proxy.ListenPort, proxy.ConnectTo, proxy.ConnectPort });
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void contextMenuStrip1_MouseClick(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is ContextMenuStrip _sender)
|
||||||
|
{
|
||||||
|
var selected = _sender.Items.OfType<ToolStripItem>().Where(x => x.Selected).FirstOrDefault();
|
||||||
|
if (selected is null || !selected.Enabled) return;
|
||||||
|
|
||||||
|
switch (selected.Text)
|
||||||
|
{
|
||||||
|
case string s when s == toolStripMenuItem_New.Text:
|
||||||
|
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||||
|
SetProxyForm.UseNormalMode();
|
||||||
|
SetProxyForm.Show();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case string s when s == toolStripMenuItem_Modify.Text:
|
||||||
|
if (SetProxyForm == null) SetProxyForm = new SetProxyForm(this);
|
||||||
|
SetProxyForUpdate(SetProxyForm);
|
||||||
|
SetProxyForm.Show();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case string s when s == toolStripMenuItem_Refresh.Text: RefreshProxyList(); break;
|
||||||
|
case string s when s == toolStripMenuItem_Delete.Text: DeleteSelectedProxies(); break;
|
||||||
|
|
||||||
|
case string s when s == toolStripMenuItem_About.Text:
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
var selectAny = e.Button == MouseButtons.Right && _sender.SelectedItems.OfType<ListViewItem>().Any();
|
||||||
|
toolStripMenuItem_Delete.Enabled = selectAny;
|
||||||
|
toolStripMenuItem_Modify.Enabled = selectAny;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
listView1.Sort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,315 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name=">>columnHeader2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>contextMenuStrip1.Name" xml:space="preserve">
|
||||||
|
<value>contextMenuStrip1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem1.Name" xml:space="preserve">
|
||||||
|
<value>toolStripMenuItem1</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||||
|
<value>6, 12</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>listView1.Name" xml:space="preserve">
|
||||||
|
<value>listView1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripSeparator2.Name" xml:space="preserve">
|
||||||
|
<value>toolStripSeparator2</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="listView1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
|
<value>Fill</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader2.Text" xml:space="preserve">
|
||||||
|
<value>侦听地址</value>
|
||||||
|
</data>
|
||||||
|
<data name="listView1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>573, 262</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem3.Name" xml:space="preserve">
|
||||||
|
<value>toolStripMenuItem3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader5.Name" xml:space="preserve">
|
||||||
|
<value>columnHeader5</value>
|
||||||
|
</data>
|
||||||
|
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>121, 104</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>listView1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="listView1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 0</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem_Delete.Text" xml:space="preserve">
|
||||||
|
<value>删除</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>117, 6</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader5.Text" xml:space="preserve">
|
||||||
|
<value>连接端口</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem4.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>3, 2, 3, 2</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem_New.Text" xml:space="preserve">
|
||||||
|
<value>新建</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>contextMenuStrip1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader1.Name" xml:space="preserve">
|
||||||
|
<value>columnHeader1</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem_Refresh.Text" xml:space="preserve">
|
||||||
|
<value>刷新</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>573, 262</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||||
|
<value>CenterScreen</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>117, 6</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="columnHeader2.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>140</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader3.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>listView1.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripSeparator2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 22</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>
|
||||||
|
<data name=">>columnHeader4.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
<value>PortProxyGUI</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader5.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>100</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader2.Name" xml:space="preserve">
|
||||||
|
<value>columnHeader2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader4.Name" xml:space="preserve">
|
||||||
|
<value>columnHeader4</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripSeparator1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem_About.Text" xml:space="preserve">
|
||||||
|
<value>关于</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem2.Name" xml:space="preserve">
|
||||||
|
<value>toolStripMenuItem2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem4.Name" xml:space="preserve">
|
||||||
|
<value>toolStripMenuItem4</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem3.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader1.Text" xml:space="preserve">
|
||||||
|
<value>类型</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader4.Text" xml:space="preserve">
|
||||||
|
<value>连接地址</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader3.Text" xml:space="preserve">
|
||||||
|
<value>侦听端口</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader3.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>100</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader5.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="listView1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem4.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>listView1.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name="listView1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>3, 2, 3, 2</value>
|
||||||
|
</data>
|
||||||
|
<data name="columnHeader4.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>140</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripMenuItem2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Text" xml:space="preserve">
|
||||||
|
<value>Port Proxy GUI</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>columnHeader3.Name" xml:space="preserve">
|
||||||
|
<value>columnHeader3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>toolStripSeparator1.Name" xml:space="preserve">
|
||||||
|
<value>toolStripSeparator1</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Localizable" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib">
|
||||||
|
<value>zh-Hans</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripMenuItem_Modify.Text" xml:space="preserve">
|
||||||
|
<value>修改</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace PortProxyGUI
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new PortProxyGUI());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("PortProxyGUI - NET")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("nstandard.net")]
|
||||||
|
[assembly: AssemblyProduct("PortProxyGUI - NET")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © nstandard.net 2020")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("1b166039-e98c-404a-89a5-c981364b5546")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// 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.0.5.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.5.0")]
|
|
@ -0,0 +1,63 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PortProxyGUI.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PortProxyGUI.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,117 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
|
@ -0,0 +1,26 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PortProxyGUI.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
|
@ -0,0 +1,151 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
using PortProxyGUI._extern.NStandard;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace PortProxyGUI
|
||||||
|
{
|
||||||
|
public partial class SetProxyForm : Form
|
||||||
|
{
|
||||||
|
public readonly PortProxyGUI PortProxyGUI;
|
||||||
|
public bool UpdateMode { get; private set; }
|
||||||
|
private string AutoTypeString { get; }
|
||||||
|
|
||||||
|
public SetProxyForm(PortProxyGUI portProxyGUI)
|
||||||
|
{
|
||||||
|
PortProxyGUI = portProxyGUI;
|
||||||
|
InitializeComponent();
|
||||||
|
AutoTypeString = comboBox_type.Text = comboBox_type.Items.OfType<string>().First();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UseNormalMode()
|
||||||
|
{
|
||||||
|
comboBox_type.Enabled = true;
|
||||||
|
textBox_listenOn.Enabled = true;
|
||||||
|
textBox_listenPort.Enabled = true;
|
||||||
|
comboBox_type.Text = AutoTypeString;
|
||||||
|
textBox_listenOn.Text = "*";
|
||||||
|
textBox_listenPort.Text = "";
|
||||||
|
textBox_connectTo.Text = "";
|
||||||
|
textBox_connectPort.Text = "";
|
||||||
|
UpdateMode = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UseUpdateMode(string type, string listenOn, string listenPort, string connectTo, string connectPort)
|
||||||
|
{
|
||||||
|
comboBox_type.Enabled = false;
|
||||||
|
textBox_listenOn.Enabled = false;
|
||||||
|
textBox_listenPort.Enabled = false;
|
||||||
|
comboBox_type.Text = type;
|
||||||
|
textBox_listenOn.Text = listenOn;
|
||||||
|
textBox_listenPort.Text = listenPort;
|
||||||
|
textBox_connectTo.Text = connectTo;
|
||||||
|
textBox_connectPort.Text = connectPort;
|
||||||
|
UpdateMode = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetPortProxy(string type, string action, string listenOn, string listenPort, string connectTo, string connectPort)
|
||||||
|
{
|
||||||
|
var output = CmdRunner.Execute($"netsh interface portproxy {action} {type} listenaddress={listenOn} listenport={listenPort} connectaddress={connectTo} connectport={connectPort}");
|
||||||
|
Invoke((Action)(() => PortProxyGUI.RefreshProxyList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsIPv4(string ip)
|
||||||
|
{
|
||||||
|
return ip.IsMatch(new Regex(@"^(?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])(?:\.(?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])){3}$"));
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetPortProxy(type, UpdateMode ? "set" : "add", listenOn, listenPort, connectTo, connectPort);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetProxyForm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Top = PortProxyGUI.Top + (PortProxyGUI.Height - Height) / 2;
|
||||||
|
Left = PortProxyGUI.Left + (PortProxyGUI.Width - Width) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetProxyForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
PortProxyGUI.SetProxyForm = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,459 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<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=2.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=2.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=2.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>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC Manifest Options
|
||||||
|
If you want to change the Windows User Account Control level replace the
|
||||||
|
requestedExecutionLevel node with one of the following.
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
Specifying requestedExecutionLevel element will disable file and registry virtualization.
|
||||||
|
Remove this element if your application requires this virtualization for backwards
|
||||||
|
compatibility.
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
<applicationRequestMinimum>
|
||||||
|
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
|
||||||
|
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||||
|
</applicationRequestMinimum>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- A list of the Windows versions that this application has been tested on
|
||||||
|
and is designed to work with. Uncomment the appropriate elements
|
||||||
|
and Windows will automatically select the most compatible environment. -->
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||||
|
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
|
||||||
|
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
|
||||||
|
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
|
||||||
|
<!--
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
-->
|
||||||
|
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
</assembly>
|
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
|
@ -13,11 +13,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E48EF63C-7
|
||||||
docs\ui.png = docs\ui.png
|
docs\ui.png = docs\ui.png
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortProxyGUI - NET", "PortProxyGUI - NET\PortProxyGUI - NET.csproj", "{1B166039-E98C-404A-89A5-C981364B5546}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortProxyGUI - NET45", "PortProxyGUI - NET45\PortProxyGUI - NET45.csproj", "{1B166039-E98C-404A-89A5-C981364B5546}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortProxyGUI - NET35", "PortProxyGUI - NET35\PortProxyGUI - NET35.csproj", "{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||||
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{1b166039-e98c-404a-89a5-c981364b5546}*SharedItemsImports = 4
|
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{1b166039-e98c-404a-89a5-c981364b5546}*SharedItemsImports = 4
|
||||||
|
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{56fb1cbc-bd89-47d7-a9d5-86f02eef480f}*SharedItemsImports = 4
|
||||||
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{7459e9f4-8b98-42d6-92cf-e90961e05c90}*SharedItemsImports = 5
|
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{7459e9f4-8b98-42d6-92cf-e90961e05c90}*SharedItemsImports = 5
|
||||||
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{b38ef2b9-e38d-4d6d-bf0d-7c1934d6cfdc}*SharedItemsImports = 13
|
PortProxyGUI.Shared\PortProxyGUI.Shared.projitems*{b38ef2b9-e38d-4d6d-bf0d-7c1934d6cfdc}*SharedItemsImports = 13
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
@ -54,6 +57,18 @@ Global
|
||||||
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x64.Build.0 = Release|Any CPU
|
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x86.ActiveCfg = Release|Any CPU
|
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x86.Build.0 = Release|Any CPU
|
{1B166039-E98C-404A-89A5-C981364B5546}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{56FB1CBC-BD89-47D7-A9D5-86F02EEF480F}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<Authors>zmjack</Authors>
|
<Authors>zmjack</Authors>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<PackageTags>portproxy TCP/IP redirector</PackageTags>
|
<PackageTags>portproxy TCP/IP redirector</PackageTags>
|
||||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||||
<Copyright>Copyright © nstandard.net 2020</Copyright>
|
<Copyright>Copyright © nstandard.net 2020</Copyright>
|
||||||
<Version>1.0.5</Version>
|
<Version>1.0.6-alpha1</Version>
|
||||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue