1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-25 14:46:08 +03:00

优化代码结构

This commit is contained in:
ProxySU 2020-10-12 19:00:45 +08:00
parent 6508808dde
commit 3724028af8
7 changed files with 2107 additions and 4278 deletions

View File

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProxySU"
mc:Ignorable="d"
Title="ProxySU - v2.4.1" Height="675" Width="650">
Title="ProxySU - v2.4.3" Height="675" Width="650">
<!--以下样式参考自https://yq.aliyun.com/articles/331878
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
<Window.Resources>

File diff suppressed because it is too large Load Diff

View File

@ -51,5 +51,5 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.1.0")]
[assembly: AssemblyFileVersion("2.4.1.0")]
[assembly: AssemblyVersion("2.4.3.0")]
[assembly: AssemblyFileVersion("2.4.3.0")]

View File

@ -226,12 +226,14 @@
<sys:String x:Key="TextBlockURLMtgTmeIpv4">T.ME format URL (double-click to copy to the clipboard)</sys:String>
<!--The following is in the program-->
<sys:String x:Key="MessageBoxShow_ErrorHostPortUserNotEmpty">Host address, host port, and user name are required and cannot be empty!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPortErr">The connection port contains non-numeric characters!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPasswordNotEmpty">The login password is required and cannot be empty!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostKeyNotEmpty">The key file is required and cannot be empty!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyAddressPortNotEmpty">If a proxy is selected, the proxy address and port cannot be empty!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyUserPasswordNotEmpty">If the proxy needs to log in, the user name and password for proxy login cannot be empty!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostConnection">The remote host connection information is wrong, please check!</sys:String>
<sys:String x:Key="MessageBoxShow_ChooseTemplate">Please select a configuration template first!</sys:String>
<sys:String x:Key="DisplayInstallInfo_FunctionResultErr">An error occurred, the installation was interrupted...</sys:String>
<sys:String x:Key="DisplayInstallInfo_Login">Logging in to the remote host...</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginSuccessful">The host login is successful!</sys:String>
<sys:String x:Key="DisplayInstallInfo_DetectionRootPermission">Detect whether it is running under root permissions...</sys:String>
@ -265,6 +267,9 @@
<sys:String x:Key="DisplayInstallInfo_ErrorPortUsedFail">The port is occupied and the installation failed...</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePort">is releasing port 80/443...</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOK">The release of port 80/443 is complete!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorPortUsedOther">The port is occupied, will the program occupying this port be forcibly stopped?</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOther">Release the port...</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOKOther">The port is released!</sys:String>
<sys:String x:Key="DisplayInstallInfo_PortNotUsed">Test result: Not occupied!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartInstalling">The system environment has been tested and the installation requirements are met, and the deployment begins...</sys:String>
<sys:String x:Key="DisplayInstallInfo_OpenFireWallPort">Open the corresponding port of the firewall...</sys:String>
@ -301,7 +306,7 @@
<sys:String x:Key="DisplayInstallInfo_StartSoftFail">Startup failed!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecond">is trying to start the second time</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecondFail">failed to start (second time)! Exit the installation!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">Start failed, the reason is unknown! Please ask the developer!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">Startup failed, the reason is as above! Please troubleshoot the reason!</sys:String>
<sys:String x:Key="DisplayInstallInfo_TestBBR">BBR test...</sys:String>
<sys:String x:Key="DisplayInstallInfo_EnableBBR">Enable BBR...</sys:String>
<sys:String x:Key="DisplayInstallInfo_BBRisEnabled">BBR has been enabled!</sys:String>
@ -309,7 +314,7 @@
<sys:String x:Key="DisplayInstallInfo_BBREnabledSuccess">BBR is successfully activated!</sys:String>
<sys:String x:Key="DisplayInstallInfo_GenerateClientConfig">Generate client configuration...</sys:String>
<sys:String x:Key="DisplayInstallInfo_ProxyInstalledOK">The installation is successful, Enjoy it!!</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">Host login failed!</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">Installation Failed!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginOccurred">An error occurred!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginUserOrPassword">Wrong password or wrong username!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginHostOrPort">Please check whether the host address and port are correct, if it passes the proxy, please check whether the proxy is working properly</sys:String>

View File

@ -235,12 +235,14 @@
<!--以下为程序内的-->
<sys:String x:Key="MessageBoxShow_ErrorHostPortUserNotEmpty">主机地址、主机端口、用户名为必填项,不能为空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPortErr">连接端口含有非数字字符!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPasswordNotEmpty">登录密码为必填项,不能为空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostKeyNotEmpty">密钥文件为必填项,不能为空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyAddressPortNotEmpty">如果选择了代理,则代理地址与端口不能为空!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyUserPasswordNotEmpty">如果代理需要登录,则代理登录的用户名与密码不能为空!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostConnection">远程主机连接信息有误,请检查!</sys:String>
<sys:String x:Key="MessageBoxShow_ChooseTemplate">请先选择配置模板!</sys:String>
<sys:String x:Key="DisplayInstallInfo_FunctionResultErr">发生错误,安装中断......</sys:String>
<sys:String x:Key="DisplayInstallInfo_Login">正在登录远程主机......</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginSuccessful">主机登录成功!</sys:String>
<sys:String x:Key="DisplayInstallInfo_DetectionRootPermission">检测是否运行在root权限下...</sys:String>
@ -274,6 +276,9 @@
<sys:String x:Key="DisplayInstallInfo_ErrorPortUsedFail">端口被占用,安装失败......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePort">正在释放80/443端口......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOK">80/443端口释放完毕</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorPortUsedOther">端口被占用,将强制停止占用此端口的程序?</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOther">正在释放端口......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOKOther">端口释放完毕!</sys:String>
<sys:String x:Key="DisplayInstallInfo_PortNotUsed">检测结果:未被占用!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartInstalling">系统环境检测完毕,符合安装要求,开始布署......</sys:String>
<sys:String x:Key="DisplayInstallInfo_OpenFireWallPort">开启防火墙相应端口......</sys:String>
@ -310,7 +315,7 @@
<sys:String x:Key="DisplayInstallInfo_StartSoftFail">启动失败!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecond">正在第二次尝试启动</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecondFail">启动失败(第二次)!退出安装!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">启动失败,原因未知!请向开发者问询</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">启动失败,原因如上!请排查原因</sys:String>
<sys:String x:Key="DisplayInstallInfo_TestBBR">BBR测试......</sys:String>
<sys:String x:Key="DisplayInstallInfo_EnableBBR">正在启用BBR......</sys:String>
<sys:String x:Key="DisplayInstallInfo_BBRisEnabled">BBR已经启用了</sys:String>
@ -318,7 +323,7 @@
<sys:String x:Key="DisplayInstallInfo_BBREnabledSuccess">BBR 启用成功!</sys:String>
<sys:String x:Key="DisplayInstallInfo_GenerateClientConfig">生成客户端配置......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ProxyInstalledOK">安装成功,祝你玩的愉快!!</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">主机登录失败!</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">安装失败!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginOccurred">发生错误!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginUserOrPassword">密码错误或用户名错误!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginHostOrPort">请检查主机地址及端口是否正确,如果通过代理,请检查代理是否正常工作</sys:String>

View File

@ -228,12 +228,14 @@
<sys:String x:Key="TextBlockURLMtgTmeIpv4">T.ME格式URL(雙擊複製到剪切板中)</sys:String>
<!--以下為程序內的-->
<sys:String x:Key="MessageBoxShow_ErrorHostPortUserNotEmpty">主機地址、主機端口、用戶名為必填項,不能為空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPortErr">連接端口含有非數字字符!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostPasswordNotEmpty">登錄密碼為必填項,不能為空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostKeyNotEmpty">密鑰文件為必填項,不能為空!!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyAddressPortNotEmpty">如果選擇了代理,則代理地址與端口不能為空!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorProxyUserPasswordNotEmpty">如果代理需要登錄,則代理登錄的用戶名與密碼不能為空!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorHostConnection">遠程主機連接信息有誤,請檢查!</sys:String>
<sys:String x:Key="MessageBoxShow_ChooseTemplate">請先選擇配置模板!</sys:String>
<sys:String x:Key="DisplayInstallInfo_FunctionResultErr">發生錯誤,安裝中斷......</sys:String>
<sys:String x:Key="DisplayInstallInfo_Login">正在登錄遠程主機......</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginSuccessful">主機登錄成功!</sys:String>
<sys:String x:Key="DisplayInstallInfo_DetectionRootPermission">檢測是否運行在root權限下...</sys:String>
@ -267,6 +269,9 @@
<sys:String x:Key="DisplayInstallInfo_ErrorPortUsedFail">端口被佔用,安裝失敗......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePort">正在釋放80/443端口......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOK">80/443端口釋放完畢</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorPortUsedOther">端口被佔用,將強制停止佔用此端口的程序?</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOther">正在釋放端口......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ReleasePortOKOther">端口釋放完畢!</sys:String>
<sys:String x:Key="DisplayInstallInfo_PortNotUsed">檢測結果:未被佔用!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartInstalling">系統環境檢測完畢,符合安裝要求,開始佈署......</sys:String>
<sys:String x:Key="DisplayInstallInfo_OpenFireWallPort">開啟防火牆相應端口......</sys:String>
@ -303,7 +308,7 @@
<sys:String x:Key="DisplayInstallInfo_StartSoftFail">啟動失敗!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecond">正在第二次嘗試啟動</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftSecondFail">啟動失敗(第二次)!退出安裝!</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">啟動失敗,原因未知!請向開發者問詢</sys:String>
<sys:String x:Key="DisplayInstallInfo_StartSoftFailedExit">啟動失敗,原因如上!請排查原因</sys:String>
<sys:String x:Key="DisplayInstallInfo_TestBBR">BBR測試......</sys:String>
<sys:String x:Key="DisplayInstallInfo_EnableBBR">正在啟用BBR......</sys:String>
<sys:String x:Key="DisplayInstallInfo_BBRisEnabled">BBR已經啟用了</sys:String>
@ -311,7 +316,7 @@
<sys:String x:Key="DisplayInstallInfo_BBREnabledSuccess">BBR 啟用成功!</sys:String>
<sys:String x:Key="DisplayInstallInfo_GenerateClientConfig">生成客戶端配置......</sys:String>
<sys:String x:Key="DisplayInstallInfo_ProxyInstalledOK">安裝成功,祝你玩的愉快! </sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">主機登錄失敗!</sys:String>
<sys:String x:Key="DisplayInstallInfo_LoginFailed">安裝失敗!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginOccurred">發生錯誤!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginUserOrPassword">密碼錯誤或用戶名錯誤!</sys:String>
<sys:String x:Key="MessageBoxShow_ErrorLoginHostOrPort">請檢查主機地址及端口是否正確,如果通過代理,請檢查代理是否正常工作</sys:String>

Binary file not shown.