PortProxyGUI.1.4.2

This commit is contained in:
zmjack 2024-06-13 19:39:58 +08:00
parent eb0d604421
commit ffeffca952
9 changed files with 38 additions and 28 deletions

View File

@ -1,5 +1,4 @@
using PortProxyGUI.Utils; using System;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Windows.Forms; using System.Windows.Forms;
@ -14,8 +13,6 @@ namespace PortProxyGUI
PortProxyGUI = portProxyGUI; PortProxyGUI = portProxyGUI;
InitializeComponent(); InitializeComponent();
Font = InterfaceUtil.UiFont;
label_version.Text = label_version.Text + " v" + Application.ProductVersion; label_version.Text = label_version.Text + " v" + Application.ProductVersion;
} }

View File

@ -36,6 +36,11 @@ namespace PortProxyGUI.Data
set => _realConnectPort = value; set => _realConnectPort = value;
} }
public override int GetHashCode()
{
return base.GetHashCode();
}
public bool Equals(Rule other) public bool Equals(Rule other)
{ {
return Id == other.Id return Id == other.Id

View File

@ -22,8 +22,6 @@ namespace PortProxyGUI
public PortProxyGUI() public PortProxyGUI()
{ {
InitializeComponent(); InitializeComponent();
Font = InterfaceUtil.UiFont;
listViewProxies.ListViewItemSorter = lvwColumnSorter; listViewProxies.ListViewItemSorter = lvwColumnSorter;
} }

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net6.0-windows;net35;net451</TargetFrameworks> <TargetFrameworks>net8.0-windows;net6.0-windows;net35;net451</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<Authors>zmjack</Authors> <Authors>zmjack</Authors>
@ -14,9 +14,9 @@
<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.4.1</Version> <Version>1.4.2</Version>
<ApplicationIcon>icon.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
<ApplicationDefaultFont>Microsoft Sans Serif, 8pt</ApplicationDefaultFont> <ApplicationDefaultFont>Arial, 8.25pt</ApplicationDefaultFont>
<AssemblyName>PPGUI</AssemblyName> <AssemblyName>PPGUI</AssemblyName>
<LangVersion>preview</LangVersion> <LangVersion>preview</LangVersion>
</PropertyGroup> </PropertyGroup>

View File

@ -23,9 +23,10 @@ namespace PortProxyGUI
{ {
// To customize application configuration such as set high DPI settings or default font, // To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration. // see https://aka.ms/applicationconfiguration.
#if NET6_0_OR_GREATER #if NET6_0_OR_GREATER
ApplicationConfiguration.Initialize(); ApplicationConfiguration.Initialize();
#elif NETCOREAPP3_1_OR_GREATER #elif NETCOREAPP3_1_OR_GREATER
Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
@ -33,6 +34,7 @@ namespace PortProxyGUI
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
#endif #endif
Application.Run(new PortProxyGUI()); Application.Run(new PortProxyGUI());
} }
} }

View File

@ -22,7 +22,6 @@ namespace PortProxyGUI
ParentWindow = parent; ParentWindow = parent;
InitializeComponent(); InitializeComponent();
Font = InterfaceUtil.UiFont;
AutoTypeString = comboBox_Type.Text = comboBox_Type.Items.OfType<string>().First(); AutoTypeString = comboBox_Type.Text = comboBox_Type.Items.OfType<string>().First();
var groupNames = ( var groupNames = (

View File

@ -1,15 +0,0 @@
using System.Drawing;
namespace PortProxyGUI.Utils
{
public class InterfaceUtil
{
/// <summary>
/// Compatibility between .NET Framework and .NET Core.
/// <see href="https://docs.microsoft.com/en-us/dotnet/core/compatibility/winforms" />
/// </summary>
public static readonly Font UiFont = new(new FontFamily("Microsoft Sans Serif"), 8f);
}
}

21
PortProxyGUI/publish.ps1 Normal file
View File

@ -0,0 +1,21 @@
Remove-Item -Path ".\bin\publish" -Recurse
dotnet publish -c Release -f "net8.0-windows" /p:PublishProfile="net8-x64"
dotnet publish -c Release -f "net8.0-windows" /p:PublishProfile="net8-x86"
dotnet publish -c Release -f "net6.0-windows" /p:PublishProfile="net6-x64"
dotnet publish -c Release -f "net6.0-windows" /p:PublishProfile="net6-x86"
Copy-Item -Path ".\bin\Release\net451\" ".\bin\Publish\" -Recurse -Force
Copy-Item -Path ".\bin\Release\net35\" ".\bin\Publish\" -Recurse -Force
$ver = "1.4.2"
Compress-Archive -Path ".\bin\publish\net8-x64\*" -DestinationPath ".\bin\publish\ppgui-net8-x64-$ver.zip" -Force
Compress-Archive -Path ".\bin\publish\net8-x86\*" -DestinationPath ".\bin\publish\ppgui-net8-x86-$ver.zip" -Force
Compress-Archive -Path ".\bin\publish\net6-x64\*" -DestinationPath ".\bin\publish\ppgui-net6-x64-$ver.zip" -Force
Compress-Archive -Path ".\bin\publish\net6-x86\*" -DestinationPath ".\bin\publish\ppgui-net6-x86-$ver.zip" -Force
Compress-Archive -Path ".\bin\publish\net451\*" -DestinationPath ".\bin\publish\ppgui-net451-$ver.zip" -Force
Compress-Archive -Path ".\bin\publish\net35\*" -DestinationPath ".\bin\publish\ppgui-net35-$ver.zip" -Force

View File

@ -14,9 +14,12 @@ A manager for netsh interface portproxy, which is to evaluate TCP/IP port redire
## Upgrade ## Upgrade
- **v1.4.2**
- Change the default font from ~~`Microsoft Sans Serif`~~ to **`Arial`**.
- This setting provides better compatibility on operating systems with fewer fonts.
- **v1.4.1** - **v1.4.1**
- Added a status strip at the bottom of the window. - Add a status strip at the bottom of the window.
- Added a check of the IP Helper service status, if the service is not running, a prompt will be displayed on the bottom status bar. - Add a check of the IP Helper service status, if the service is not running, a prompt will be displayed on the bottom status bar.
- **v1.4.0** - **v1.4.0**
- Command line calls have been removed to provide better performance. - Command line calls have been removed to provide better performance.
- New Feature Added: **Remember Window/Column Size**. - New Feature Added: **Remember Window/Column Size**.