bug fixes for ErrorDataReceived

pull/3756/head
2dust 2023-04-21 14:49:33 +08:00
parent fed7e7764e
commit 38ae669070
3 changed files with 26 additions and 8 deletions

View File

@ -189,6 +189,14 @@ namespace v2rayN.Handler
if (displayLog)
{
p.OutputDataReceived += (sender, e) =>
{
if (!string.IsNullOrEmpty(e.Data))
{
string msg = e.Data + Environment.NewLine;
ShowMsg(false, msg);
}
};
p.ErrorDataReceived += (sender, e) =>
{
if (!string.IsNullOrEmpty(e.Data))
{
@ -201,6 +209,7 @@ namespace v2rayN.Handler
if (displayLog)
{
p.BeginOutputReadLine();
p.BeginErrorReadLine();
}
_process = p;
@ -254,8 +263,17 @@ namespace v2rayN.Handler
ShowMsg(false, msg);
}
};
p.ErrorDataReceived += (sender, e) =>
{
if (!string.IsNullOrEmpty(e.Data))
{
string msg = e.Data + Environment.NewLine;
ShowMsg(false, msg);
}
};
p.Start();
p.BeginOutputReadLine();
p.BeginErrorReadLine();
p.StandardInput.Write(configStr);
p.StandardInput.Close();

View File

@ -1060,7 +1060,7 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 Rule Setting 的本地化字符串。
/// 查找类似 Rule Settings 的本地化字符串。
/// </summary>
public static string menuRoutingRuleSetting {
get {
@ -1141,7 +1141,7 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 Setting 的本地化字符串。
/// 查找类似 Settings 的本地化字符串。
/// </summary>
public static string menuSetting {
get {
@ -1231,7 +1231,7 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 Subscription group Setting 的本地化字符串。
/// 查找类似 Subscription group Settings 的本地化字符串。
/// </summary>
public static string menuSubSetting {
get {
@ -2006,7 +2006,7 @@ namespace v2rayN.Resx {
}
/// <summary>
/// 查找类似 GlobalHotkey Setting 的本地化字符串。
/// 查找类似 GlobalHotkey Settings 的本地化字符串。
/// </summary>
public static string TbGlobalHotkeySetting {
get {

View File

@ -467,7 +467,7 @@
<value>Servers</value>
</data>
<data name="menuSetting" xml:space="preserve">
<value>Setting</value>
<value>Settings</value>
</data>
<data name="menuSubGroupUpdate" xml:space="preserve">
<value>Update current subscription without proxy</value>
@ -479,7 +479,7 @@
<value>Subscription group</value>
</data>
<data name="menuSubSetting" xml:space="preserve">
<value>Subscription group Setting</value>
<value>Subscription group Settings</value>
</data>
<data name="menuSubUpdate" xml:space="preserve">
<value>Update subscription without proxy</value>
@ -827,7 +827,7 @@
<value>Display GUI</value>
</data>
<data name="TbGlobalHotkeySetting" xml:space="preserve">
<value>GlobalHotkey Setting</value>
<value>GlobalHotkey Settings</value>
</data>
<data name="TbGlobalHotkeySettingTip" xml:space="preserve">
<value>Set directly by pressing the keyboard, Take effect after restart</value>
@ -929,7 +929,7 @@
<value>Import Rules From Sub Url</value>
</data>
<data name="menuRoutingRuleSetting" xml:space="preserve">
<value>Rule Setting</value>
<value>Rule Settings</value>
</data>
<data name="menuRuleAdd" xml:space="preserve">
<value>Rule Add</value>