mirror of https://github.com/2dust/v2rayN
IDE0018
parent
67b99c4c8b
commit
edea40012c
|
@ -121,8 +121,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
|
|
|
@ -110,8 +110,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
|
|
|
@ -258,8 +258,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
ClearServer();
|
||||
|
||||
string msg;
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
UI.Show(msg);
|
||||
|
|
|
@ -77,8 +77,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
//路由
|
||||
cmbdomainStrategy.Text = config.domainStrategy;
|
||||
int routingMode = 0;
|
||||
int.TryParse(config.routingMode, out routingMode);
|
||||
int.TryParse(config.routingMode, out int routingMode);
|
||||
cmbroutingMode.SelectedIndex = routingMode;
|
||||
|
||||
txtUseragent.Text = Utils.List2String(config.useragent, true);
|
||||
|
|
|
@ -753,7 +753,6 @@ namespace v2rayN.Handler
|
|||
string[] arrData = clipboardData.Split(Environment.NewLine.ToCharArray());
|
||||
foreach (string str in arrData)
|
||||
{
|
||||
string msg;
|
||||
//maybe sub
|
||||
if (str.StartsWith(Global.httpsProtocol) || str.StartsWith(Global.httpProtocol))
|
||||
{
|
||||
|
@ -763,7 +762,7 @@ namespace v2rayN.Handler
|
|||
}
|
||||
continue;
|
||||
}
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out msg);
|
||||
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out string msg);
|
||||
if (vmessItem == null)
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -102,8 +102,7 @@ namespace v2rayN.Handler
|
|||
}
|
||||
Config configCopy = Utils.DeepCopy(config);
|
||||
configCopy.index = index;
|
||||
string msg;
|
||||
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out msg) != 0)
|
||||
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out string msg) != 0)
|
||||
{
|
||||
UI.Show(msg);
|
||||
}
|
||||
|
@ -143,8 +142,7 @@ namespace v2rayN.Handler
|
|||
}
|
||||
Config configCopy = Utils.DeepCopy(config);
|
||||
configCopy.index = index;
|
||||
string msg;
|
||||
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out msg) != 0)
|
||||
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out string msg) != 0)
|
||||
{
|
||||
UI.Show(msg);
|
||||
}
|
||||
|
|
|
@ -221,8 +221,7 @@ namespace v2rayN.Handler
|
|||
|
||||
try
|
||||
{
|
||||
IPAddress ipAddress;
|
||||
if (!System.Net.IPAddress.TryParse(url, out ipAddress))
|
||||
if (!System.Net.IPAddress.TryParse(url, out IPAddress ipAddress))
|
||||
{
|
||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||
ipAddress = ipHostInfo.AddressList[0];
|
||||
|
|
|
@ -120,11 +120,9 @@ namespace v2rayN.Handler
|
|||
{
|
||||
string itemId = config_.getItemId();
|
||||
ServerStatItem serverStatItem = GetServerStatItem(itemId);
|
||||
ulong up = 0,
|
||||
down = 0;
|
||||
|
||||
//TODO: parse output
|
||||
ParseOutput(res.Stat, out up, out down);
|
||||
ParseOutput(res.Stat, out ulong up, out ulong down);
|
||||
|
||||
serverStatItem.todayUp += up;
|
||||
serverStatItem.todayDown += down;
|
||||
|
|
|
@ -314,9 +314,7 @@ namespace v2rayN
|
|||
|
||||
public static string HumanFy(ulong amount)
|
||||
{
|
||||
double result;
|
||||
string unit;
|
||||
ToHumanReadable(amount, out result, out unit);
|
||||
ToHumanReadable(amount, out double result, out string unit);
|
||||
return $"{string.Format("{0:f1}", result)} {unit}";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue