Compare commits

...

8 Commits
5.11 ... 5.12

Author SHA1 Message Date
2dust
3aa48a9a3e Update AssemblyInfo.cs 2022-04-07 20:36:10 +08:00
2dust
09702b9bde fix bugs 2022-04-07 17:05:56 +08:00
2dust
35f6cd3d9c Merge pull request #2164 from Lemonawa/master
Update issue templates
2022-04-06 19:49:52 +08:00
Lemonawa
b62f1786a9 Update issue templates 2022-04-05 23:19:37 +08:00
Lemonawa
b21ad28d5b Delete config.yaml 2022-04-05 23:10:16 +08:00
Lemonawa
8d66c0d180 Delete issue_template.md 2022-04-05 23:10:08 +08:00
Lemonawa
ec8aa0df18 Update issue templates 2022-04-05 23:09:30 +08:00
Lemonawa
e824d8e91d Create config.yaml 2022-04-05 23:06:42 +08:00
7 changed files with 67 additions and 79 deletions

View File

@@ -1,3 +1,12 @@
---
name: Bug 报告
about: 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
title: "[BUG]"
labels: bug
assignees: ''
---
在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
### 预期行为
@@ -22,4 +31,3 @@
### 环境信息(客户端请升级至最新正式版)
### 额外信息(可选)

20
.github/ISSUE_TEMPLATE/feature---.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Feature 请求
about: 为这个项目提出一个建议
title: "[Feature request]"
labels: enhancement
assignees: ''
---
**你的功能请求是否与一个问题有关?请描述。**
清楚而简洁地描述问题是什么。例如。我总是感到沮丧,当 [...]
**描述你希望的解决方案**
对你希望发生的事情进行清晰、简明的描述。
**描述你所考虑的替代方案**
对你考虑过的任何替代解决方案或功能进行清晰、简洁的描述。
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -273,7 +273,7 @@ namespace v2rayN.Forms
/// </summary>
private void RefreshServersView()
{
int index = lvServers.SelectedIndices.Count > 0 ? lvServers.SelectedIndices[0] : -1;
int index = GetLvSelectedIndex(false);
lvServers.BeginUpdate();
lvServers.Items.Clear();
@@ -281,29 +281,12 @@ namespace v2rayN.Forms
for (int k = 0; k < lstVmess.Count; k++)
{
string def = string.Empty;
string totalUp = string.Empty,
totalDown = string.Empty,
todayUp = string.Empty,
todayDown = string.Empty;
VmessItem item = lstVmess[k];
if (config.IsActiveNode(item))
{
def = "√";
}
bool stats = statistics != null && statistics.Enable;
if (stats)
{
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.indexId);
if (sItem != null)
{
totalUp = Utils.HumanFy(sItem.totalUp);
totalDown = Utils.HumanFy(sItem.totalDown);
todayUp = Utils.HumanFy(sItem.todayUp);
todayDown = Utils.HumanFy(sItem.todayDown);
}
}
ListViewItem lvItem = new ListViewItem(def);
Utils.AddSubItem(lvItem, EServerColName.configType.ToString(), (item.configType).ToString());
Utils.AddSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks);
@@ -314,8 +297,22 @@ namespace v2rayN.Forms
Utils.AddSubItem(lvItem, EServerColName.streamSecurity.ToString(), item.streamSecurity);
Utils.AddSubItem(lvItem, EServerColName.subRemarks.ToString(), item.GetSubRemarks(config));
Utils.AddSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult);
if (stats)
if (statistics != null && statistics.Enable)
{
string totalUp = string.Empty,
totalDown = string.Empty,
todayUp = string.Empty,
todayDown = string.Empty;
ServerStatItem sItem = statistics.Statistic.Find(item_ => item_.itemId == item.indexId);
if (sItem != null)
{
totalUp = Utils.HumanFy(sItem.totalUp);
totalDown = Utils.HumanFy(sItem.totalDown);
todayUp = Utils.HumanFy(sItem.todayUp);
todayDown = Utils.HumanFy(sItem.todayDown);
}
Utils.AddSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown);
Utils.AddSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp);
Utils.AddSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown);
@@ -416,23 +413,7 @@ namespace v2rayN.Forms
}
private void lvServers_SelectedIndexChanged(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 ssMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
@@ -603,17 +584,7 @@ namespace v2rayN.Forms
private void lvServers_Click(object sender, EventArgs e)
{
int index = -1;
try
{
if (lvServers.SelectedIndices.Count > 0)
{
index = lvServers.SelectedIndices[0];
}
}
catch
{
}
int index = GetLvSelectedIndex(false);
if (index < 0)
{
return;
@@ -966,7 +937,7 @@ namespace v2rayN.Forms
/// 取得ListView选中的行
/// </summary>
/// <returns></returns>
private int GetLvSelectedIndex()
private int GetLvSelectedIndex(bool show = true)
{
int index = -1;
lstSelecteds.Clear();
@@ -974,7 +945,10 @@ namespace v2rayN.Forms
{
if (lvServers.SelectedIndices.Count <= 0)
{
UI.Show(ResUI.PleaseSelectServer);
if (show)
{
UI.Show(ResUI.PleaseSelectServer);
}
return index;
}
@@ -1190,11 +1164,13 @@ namespace v2rayN.Forms
this.ShowInTaskbar = true;
//this.notifyIcon1.Visible = false;
this.txtMsgBox.ScrollToCaret();
//if (config.index >= 0 && config.index < lvServers.Items.Count)
//{
// lvServers.Items[config.index].Selected = true;
// lvServers.EnsureVisible(config.index); // workaround
//}
int index = GetLvSelectedIndex(false);
if (index >= 0 && index < lvServers.Items.Count && lvServers.Items.Count > 0)
{
lvServers.Items[index].Selected = true;
lvServers.EnsureVisible(index); // workaround
}
SetVisibleCore(true);
}
@@ -1272,27 +1248,7 @@ namespace v2rayN.Forms
lvServers.EndUpdate();
});
}
for (int i = 0; i < lstVmess.Count; i++)
{
int index = statistics.FindIndex(item_ => item_.itemId == lstVmess[i].indexId);
if (index != -1)
{
lvServers.Invoke((MethodInvoker)delegate
{
lvServers.BeginUpdate();
lvServers.Items[i].SubItems["todayDown"].Text = Utils.HumanFy(statistics[index].todayDown);
lvServers.Items[i].SubItems["todayUp"].Text = Utils.HumanFy(statistics[index].todayUp);
lvServers.Items[i].SubItems["totalDown"].Text = Utils.HumanFy(statistics[index].totalDown);
lvServers.Items[i].SubItems["totalUp"].Text = Utils.HumanFy(statistics[index].totalUp);
lvServers.EndUpdate();
});
}
}
}
catch (Exception ex)
{

View File

@@ -15,7 +15,7 @@ namespace v2rayN.Handler
class ConfigHandler
{
private static string configRes = Global.ConfigFileName;
private static object objLock = new object();
private static readonly object objLock = new object();
#region ConfigHandler

View File

@@ -109,6 +109,10 @@ namespace v2rayN.Handler
}
else
{
if (coreInfo == null || coreInfo.coreExes == null)
{
return;
}
foreach (string vName in coreInfo.coreExes)
{
Process[] existing = Process.GetProcessesByName(vName);

View File

@@ -32,4 +32,4 @@ using System.Runtime.InteropServices;
// 方法是按如下所示使用“*”:
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("5.11")]
[assembly: AssemblyFileVersion("5.12")]

View File

@@ -33,7 +33,7 @@ namespace v2rayN.Tool
memory.ActivateOptions();
hierarchy.Root.AddAppender(memory);
hierarchy.Root.Level = Level.Info;
hierarchy.Root.Level = Level.Debug;
hierarchy.Configured = true;
}