Optimize code and remove unused resources

pull/7673/head
2dust 2025-07-29 19:42:59 +08:00
parent ce7c41e3ff
commit f779e311ed
9 changed files with 6 additions and 31 deletions

View File

@ -20,6 +20,8 @@ public class CoreAdminHandler
}
_config = config;
_updateFunc = updateFunc;
await Task.CompletedTask;
}
private void UpdateFunc(bool notify, string msg)
@ -49,13 +51,13 @@ public class CoreAdminHandler
}
};
DataReceivedEventHandler dataHandler = (sender, e) =>
void dataHandler(object sender, DataReceivedEventArgs e)
{
if (e.Data.IsNotEmpty())
{
UpdateFunc(false, e.Data + Environment.NewLine);
}
};
}
proc.OutputDataReceived += dataHandler;
proc.ErrorDataReceived += dataHandler;

View File

@ -280,13 +280,13 @@ public class CoreHandler
if (displayLog)
{
DataReceivedEventHandler dataHandler = (sender, e) =>
void dataHandler(object sender, DataReceivedEventArgs e)
{
if (e.Data.IsNotEmpty())
{
UpdateFunc(false, e.Data + Environment.NewLine);
}
};
}
proc.OutputDataReceived += dataHandler;
proc.ErrorDataReceived += dataHandler;
}

View File

@ -2211,15 +2211,6 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 Sudo password has been verified successfully, please ignore the incorrect password prompts! 的本地化字符串。
/// </summary>
public static string SudoPwdVerfiedSuccessTip {
get {
return ResourceManager.GetString("SudoPwdVerfiedSuccessTip", resourceCulture);
}
}
/// <summary>
/// 查找类似 Address 的本地化字符串。
/// </summary>

View File

@ -1395,9 +1395,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>Incorrect password, please try again.</value>
</data>

View File

@ -1395,9 +1395,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>Incorrect password, please try again.</value>
</data>

View File

@ -1395,9 +1395,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>Incorrect password, please try again.</value>
</data>

View File

@ -1395,9 +1395,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>Incorrect password, please try again.</value>
</data>

View File

@ -1392,9 +1392,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>可以填写配置文件别名,请确保存在并唯一</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>sudo 密码已经验证成功,请忽略错误密码提示!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>密码错误,请重试。</value>
</data>

View File

@ -1392,9 +1392,6 @@
<data name="TbRuleOutboundTagTip" xml:space="preserve">
<value>可以填寫設定檔別名,請確保存在並唯一</value>
</data>
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
<value>sudo 密碼已經驗證成功,請忽略錯誤密碼提示!</value>
</data>
<data name="SudoIncorrectPasswordTip" xml:space="preserve">
<value>密碼錯誤,請重試。</value>
</data>