mirror of https://github.com/2dust/v2rayN
IDE0001-简化名称
parent
d8d8346d45
commit
56c3c22568
|
@ -22,7 +22,7 @@ namespace v2rayN.Base
|
||||||
int MaxWidth = 0;
|
int MaxWidth = 0;
|
||||||
Graphics graphics = this.CreateGraphics();
|
Graphics graphics = this.CreateGraphics();
|
||||||
Font font = this.Font;
|
Font font = this.Font;
|
||||||
ListView.ListViewItemCollection items = this.Items;
|
ListViewItemCollection items = this.Items;
|
||||||
|
|
||||||
string str;
|
string str;
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -436,7 +436,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||||
config.vmess.RemoveAt(index);
|
config.vmess.RemoveAt(index);
|
||||||
config.vmess.Insert(0, vmess);
|
config.vmess.Insert(0, vmess);
|
||||||
if (index < config.index)
|
if (index < config.index)
|
||||||
|
@ -459,7 +459,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||||
config.vmess.RemoveAt(index);
|
config.vmess.RemoveAt(index);
|
||||||
config.vmess.Insert(index - 1, vmess);
|
config.vmess.Insert(index - 1, vmess);
|
||||||
if (index == config.index + 1)
|
if (index == config.index + 1)
|
||||||
|
@ -479,7 +479,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||||
config.vmess.RemoveAt(index);
|
config.vmess.RemoveAt(index);
|
||||||
config.vmess.Insert(index + 1, vmess);
|
config.vmess.Insert(index + 1, vmess);
|
||||||
if (index == config.index - 1)
|
if (index == config.index - 1)
|
||||||
|
@ -498,7 +498,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
|
VmessItem vmess = Utils.DeepCopy(config.vmess[index]);
|
||||||
config.vmess.RemoveAt(index);
|
config.vmess.RemoveAt(index);
|
||||||
config.vmess.Add(vmess);
|
config.vmess.Add(vmess);
|
||||||
if (index < config.index)
|
if (index < config.index)
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
Config configCopy = Utils.DeepCopy(config);
|
||||||
configCopy.index = index;
|
configCopy.index = index;
|
||||||
string msg;
|
string msg;
|
||||||
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out msg) != 0)
|
if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out msg) != 0)
|
||||||
|
@ -141,7 +141,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
Config configCopy = Utils.DeepCopy(config);
|
||||||
configCopy.index = index;
|
configCopy.index = index;
|
||||||
string msg;
|
string msg;
|
||||||
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out msg) != 0)
|
if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out msg) != 0)
|
||||||
|
|
|
@ -660,9 +660,9 @@ namespace v2rayN.Handler
|
||||||
if (config.enableStatistics)
|
if (config.enableStatistics)
|
||||||
{
|
{
|
||||||
var tag = Global.InboundAPITagName;
|
var tag = Global.InboundAPITagName;
|
||||||
var apiObj = new Mode.API();
|
var apiObj = new API();
|
||||||
var policyObj = new Mode.Policy();
|
var policyObj = new Policy();
|
||||||
var policySystemSetting = new Mode.SystemPolicy();
|
var policySystemSetting = new SystemPolicy();
|
||||||
|
|
||||||
string[] services = { "StatsService" };
|
string[] services = { "StatsService" };
|
||||||
|
|
||||||
|
@ -679,8 +679,8 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
if (!v2rayConfig.inbounds.Exists(item => { return item.tag == tag; }))
|
if (!v2rayConfig.inbounds.Exists(item => { return item.tag == tag; }))
|
||||||
{
|
{
|
||||||
var apiInbound = new Mode.Inbounds();
|
var apiInbound = new Inbounds();
|
||||||
var apiInboundSettings = new Mode.Inboundsettings();
|
var apiInboundSettings = new Inboundsettings();
|
||||||
apiInbound.tag = tag;
|
apiInbound.tag = tag;
|
||||||
apiInbound.listen = Global.Loopback;
|
apiInbound.listen = Global.Loopback;
|
||||||
apiInbound.port = Global.statePort;
|
apiInbound.port = Global.statePort;
|
||||||
|
@ -692,7 +692,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
if (!v2rayConfig.routing.rules.Exists(item => { return item.outboundTag == tag; }))
|
if (!v2rayConfig.routing.rules.Exists(item => { return item.outboundTag == tag; }))
|
||||||
{
|
{
|
||||||
var apiRoutingRule = new Mode.RulesItem
|
var apiRoutingRule = new RulesItem
|
||||||
{
|
{
|
||||||
inboundTag = new List<string> { tag },
|
inboundTag = new List<string> { tag },
|
||||||
outboundTag = tag,
|
outboundTag = tag,
|
||||||
|
@ -1437,7 +1437,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
msg = UIRes.I18N("InitialConfiguration");
|
msg = UIRes.I18N("InitialConfiguration");
|
||||||
|
|
||||||
Config configCopy = Utils.DeepCopy<Config>(config);
|
Config configCopy = Utils.DeepCopy(config);
|
||||||
|
|
||||||
string result = Utils.GetEmbedText(SampleClient);
|
string result = Utils.GetEmbedText(SampleClient);
|
||||||
if (Utils.IsNullOrEmpty(result))
|
if (Utils.IsNullOrEmpty(result))
|
||||||
|
@ -1483,7 +1483,7 @@ namespace v2rayN.Handler
|
||||||
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
v2rayConfigCopy.outbounds[0].tag = Global.agentTag + inbound.port.ToString();
|
||||||
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
|
v2rayConfig.outbounds.Add(v2rayConfigCopy.outbounds[0]);
|
||||||
|
|
||||||
var rule = new Mode.RulesItem
|
var rule = new RulesItem
|
||||||
{
|
{
|
||||||
inboundTag = new List<string> { inbound.tag },
|
inboundTag = new List<string> { inbound.tag },
|
||||||
outboundTag = v2rayConfigCopy.outbounds[0].tag,
|
outboundTag = v2rayConfigCopy.outbounds[0].tag,
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace v2rayN
|
||||||
}
|
}
|
||||||
|
|
||||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||||
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
|
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
|
||||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace v2rayN
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
Utils.SaveLog("Application_ThreadException", e.Exception);
|
Utils.SaveLog("Application_ThreadException", e.Exception);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue