1.修改依赖库的Framework版本为4.5.2
2.修复部分逻辑的crash问题 3.提升版本号为1.0.3
This commit is contained in:
parent
aa3482f033
commit
a4a80afe73
@ -6,6 +6,7 @@ using log4net;
|
||||
using WebSocketSharp;
|
||||
using WebSocketTool.Base;
|
||||
using WebSocketTool.Util;
|
||||
using WebSocketTool.View.Dialog;
|
||||
using LogManager = log4net.LogManager;
|
||||
|
||||
namespace WebSocketTool.Client
|
||||
@ -106,7 +107,7 @@ namespace WebSocketTool.Client
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
if (string.IsNullOrEmpty(WsUrl))
|
||||
if (string.IsNullOrEmpty(WsUrl) || (!WsUrl.StartsWith("wss://") && !WsUrl.StartsWith("ws://")))
|
||||
{
|
||||
view.AppendInfo($"Hint {TimeUtil.GetCurrentDateTime()} \n 请输入正确的WebSocket地址");
|
||||
return;
|
||||
@ -126,8 +127,16 @@ namespace WebSocketTool.Client
|
||||
view.AppendInfo($"Hint {TimeUtil.GetCurrentDateTime()} \n Start Connect Socket");
|
||||
if (IsProxyChecked)
|
||||
{
|
||||
view.AppendInfo($"use proxy: {ProxyAddress}");
|
||||
mClient.SetHttpProxy(ProxyAddress, ProxyUserName, ProxyPassword);
|
||||
if (!string.IsNullOrEmpty(ProxyAddress))
|
||||
{
|
||||
view.AppendInfo($"Hint use proxy: {ProxyAddress}");
|
||||
mClient.SetHttpProxy(ProxyAddress, ProxyUserName, ProxyPassword);
|
||||
}
|
||||
else
|
||||
{
|
||||
view.ShowToast("请输入代理地址!");
|
||||
view.AppendInfo($"use proxy address is empty!");
|
||||
}
|
||||
}
|
||||
mClient.ConnectAsync();
|
||||
}
|
||||
|
@ -75,11 +75,18 @@ namespace WebSocketTool.Client
|
||||
{
|
||||
viewModel.Close();
|
||||
}
|
||||
|
||||
public Window GetWindow()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IClientView
|
||||
{
|
||||
void ShowToast(string msg);
|
||||
void AppendInfo(string info);
|
||||
|
||||
Window GetWindow();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
set version=1.0.0
|
||||
set version=1.0.3
|
||||
|
||||
if not "%~1"=="" (
|
||||
set version=%1
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>WebSocketSharp</RootNamespace>
|
||||
<AssemblyName>websocket-sharp</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>websocket-sharp.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
|
Loading…
Reference in New Issue
Block a user