mirror of https://github.com/2dust/v2rayN
IDE0002
parent
edea40012c
commit
cdc96817e8
|
@ -960,7 +960,7 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void notifyMain_MouseClick(object sender, MouseEventArgs e)
|
private void notifyMain_MouseClick(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Button == System.Windows.Forms.MouseButtons.Left)
|
if (e.Button == MouseButtons.Left)
|
||||||
{
|
{
|
||||||
ShowForm();
|
ShowForm();
|
||||||
}
|
}
|
||||||
|
@ -1370,12 +1370,12 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void tsbAbout_Click(object sender, EventArgs e)
|
private void tsbAbout_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start(Global.AboutUrl);
|
Process.Start(Global.AboutUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tsbPromotion_Click(object sender, EventArgs e)
|
private void tsbPromotion_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
|
Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -1507,7 +1507,7 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
|
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start(Global.v2rayWebsiteUrl);
|
Process.Start(Global.v2rayWebsiteUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!System.Net.IPAddress.TryParse(url, out IPAddress ipAddress))
|
if (!IPAddress.TryParse(url, out IPAddress ipAddress))
|
||||||
{
|
{
|
||||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||||
ipAddress = ipHostInfo.AddressList[0];
|
ipAddress = ipHostInfo.AddressList[0];
|
||||||
|
|
|
@ -128,7 +128,7 @@ namespace v2rayN.HttpProxyHandler
|
||||||
public InternetConnectionOptionValue m_Value;
|
public InternetConnectionOptionValue m_Value;
|
||||||
static InternetConnectionOption()
|
static InternetConnectionOption()
|
||||||
{
|
{
|
||||||
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
Size = Marshal.SizeOf(typeof(InternetConnectionOption));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nested Types
|
// Nested Types
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace v2rayN
|
||||||
|
|
||||||
//设置语言环境
|
//设置语言环境
|
||||||
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
|
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
|
||||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace v2rayN
|
||||||
int result = -1;
|
int result = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (StreamWriter file = System.IO.File.CreateText(filePath))
|
using (StreamWriter file = File.CreateText(filePath))
|
||||||
{
|
{
|
||||||
//JsonSerializer serializer = new JsonSerializer();
|
//JsonSerializer serializer = new JsonSerializer();
|
||||||
JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented };
|
JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented };
|
||||||
|
@ -194,7 +194,7 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
byte[] plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
|
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||||
return Convert.ToBase64String(plainTextBytes);
|
return Convert.ToBase64String(plainTextBytes);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -364,7 +364,7 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int var1 = Utils.ToInt(oText);
|
int var1 = ToInt(oText);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -533,7 +533,7 @@ namespace v2rayN
|
||||||
public static string GetPath(string fileName)
|
public static string GetPath(string fileName)
|
||||||
{
|
{
|
||||||
string startupPath = StartupPath();
|
string startupPath = StartupPath();
|
||||||
if (Utils.IsNullOrEmpty(fileName))
|
if (IsNullOrEmpty(fileName))
|
||||||
{
|
{
|
||||||
return startupPath;
|
return startupPath;
|
||||||
}
|
}
|
||||||
|
@ -833,7 +833,7 @@ namespace v2rayN
|
||||||
sb.Write(buffer, 0, n);
|
sb.Write(buffer, 0, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return System.Text.Encoding.UTF8.GetString(sb.ToArray());
|
return Encoding.UTF8.GetString(sb.ToArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue