pull/542/head
YFdyh000 2020-03-15 03:27:31 +08:00
parent edea40012c
commit cdc96817e8
5 changed files with 12 additions and 12 deletions

View File

@ -960,7 +960,7 @@ namespace v2rayN.Forms
private void notifyMain_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
if (e.Button == MouseButtons.Left)
{
ShowForm();
}
@ -1370,12 +1370,12 @@ namespace v2rayN.Forms
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)
{
System.Diagnostics.Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
}
#endregion
@ -1507,7 +1507,7 @@ namespace v2rayN.Forms
private void tsbV2rayWebsite_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(Global.v2rayWebsiteUrl);
Process.Start(Global.v2rayWebsiteUrl);
}
}
}

View File

@ -221,7 +221,7 @@ namespace v2rayN.Handler
try
{
if (!System.Net.IPAddress.TryParse(url, out IPAddress ipAddress))
if (!IPAddress.TryParse(url, out IPAddress ipAddress))
{
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
ipAddress = ipHostInfo.AddressList[0];

View File

@ -128,7 +128,7 @@ namespace v2rayN.HttpProxyHandler
public InternetConnectionOptionValue m_Value;
static InternetConnectionOption()
{
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
Size = Marshal.SizeOf(typeof(InternetConnectionOption));
}
// Nested Types

View File

@ -46,7 +46,7 @@ namespace v2rayN
//设置语言环境
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.SetCompatibleTextRenderingDefault(false);

View File

@ -124,7 +124,7 @@ namespace v2rayN
int result = -1;
try
{
using (StreamWriter file = System.IO.File.CreateText(filePath))
using (StreamWriter file = File.CreateText(filePath))
{
//JsonSerializer serializer = new JsonSerializer();
JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented };
@ -194,7 +194,7 @@ namespace v2rayN
{
try
{
byte[] plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
return Convert.ToBase64String(plainTextBytes);
}
catch (Exception ex)
@ -364,7 +364,7 @@ namespace v2rayN
{
try
{
int var1 = Utils.ToInt(oText);
int var1 = ToInt(oText);
return true;
}
catch
@ -533,7 +533,7 @@ namespace v2rayN
public static string GetPath(string fileName)
{
string startupPath = StartupPath();
if (Utils.IsNullOrEmpty(fileName))
if (IsNullOrEmpty(fileName))
{
return startupPath;
}
@ -833,7 +833,7 @@ namespace v2rayN
sb.Write(buffer, 0, n);
}
}
return System.Text.Encoding.UTF8.GetString(sb.ToArray());
return Encoding.UTF8.GetString(sb.ToArray());
}
}