mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 20:42:10 +00:00
refine code
This commit is contained in:
parent
ca9840abf4
commit
28826cad1b
4 changed files with 18 additions and 45 deletions
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 15.0.28010.2050
|
VisualStudioVersion = 16.0.29926.136
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -35,7 +35,8 @@ Global
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
RESX_SortFileContentOnSave = True
|
RESX_ResXSortingComparison = CurrentCulture
|
||||||
SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E}
|
SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E}
|
||||||
|
RESX_SortFileContentOnSave = True
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|
1
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
1
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
|
@ -167,7 +167,6 @@
|
||||||
this.lvServers.UseCompatibleStateImageBehavior = false;
|
this.lvServers.UseCompatibleStateImageBehavior = false;
|
||||||
this.lvServers.View = System.Windows.Forms.View.Details;
|
this.lvServers.View = System.Windows.Forms.View.Details;
|
||||||
this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged);
|
this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged);
|
||||||
this.lvServers.Click += new System.EventHandler(this.lvServers_Click);
|
|
||||||
this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick);
|
this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick);
|
||||||
this.lvServers.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvServers_KeyDown);
|
this.lvServers.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvServers_KeyDown);
|
||||||
//
|
//
|
||||||
|
|
|
@ -312,24 +312,18 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void lvServers_SelectedIndexChanged(object sender, EventArgs e)
|
private void lvServers_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int index = -1;
|
RefreshQRCodePanel();
|
||||||
try
|
|
||||||
{
|
|
||||||
if (lvServers.SelectedIndices.Count > 0)
|
|
||||||
{
|
|
||||||
index = lvServers.SelectedIndices[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
if (index < 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//qrCodeControl.showQRCode(index, config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RefreshQRCodePanel()
|
||||||
|
{
|
||||||
|
if (scMain.Panel2Collapsed) return; // saving cpu.
|
||||||
|
if (lvServers.SelectedIndices.Count > 0)
|
||||||
|
{
|
||||||
|
int index = lvServers.SelectedIndices[0];
|
||||||
|
qrCodeControl.showQRCode(index, config);
|
||||||
|
}
|
||||||
|
}
|
||||||
private void RefreshTaryIcon()
|
private void RefreshTaryIcon()
|
||||||
{
|
{
|
||||||
notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
|
notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
|
||||||
|
@ -464,26 +458,6 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
#region 功能按钮
|
#region 功能按钮
|
||||||
|
|
||||||
private void lvServers_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
int index = -1;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (lvServers.SelectedIndices.Count > 0)
|
|
||||||
{
|
|
||||||
index = lvServers.SelectedIndices[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
if (index < 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
qrCodeControl.showQRCode(index, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void lvServers_DoubleClick(object sender, EventArgs e)
|
private void lvServers_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int index = GetLvSelectedIndex();
|
int index = GetLvSelectedIndex();
|
||||||
|
@ -1601,6 +1575,7 @@ namespace v2rayN.Forms
|
||||||
{
|
{
|
||||||
bool bShow = tsbQRCodeSwitch.Checked;
|
bool bShow = tsbQRCodeSwitch.Checked;
|
||||||
scMain.Panel2Collapsed = !bShow;
|
scMain.Panel2Collapsed = !bShow;
|
||||||
|
RefreshQRCodePanel();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -1629,8 +1604,6 @@ namespace v2rayN.Forms
|
||||||
RefreshTaryIcon();
|
RefreshTaryIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async void toolSslServerLatencyRefresh()
|
private async void toolSslServerLatencyRefresh()
|
||||||
{
|
{
|
||||||
toolSslServerLatencySet(UIRes.I18N("ServerLatencyChecking"));
|
toolSslServerLatencySet(UIRes.I18N("ServerLatencyChecking"));
|
||||||
|
|
|
@ -163,10 +163,10 @@
|
||||||
<data name="sub" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="sub" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in a new issue