mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 12:52:08 +08:00
1.1.4 -> 1.1.5 第11次更新
This commit is contained in:
parent
b1d41436de
commit
8de6980f59
9
Consts/MainMultilangConst.Designer.cs
generated
9
Consts/MainMultilangConst.Designer.cs
generated
@ -429,6 +429,15 @@ namespace Sheas_Cealer.Consts {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 GLB. Purging STP. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MihomoButtonIsStoppingContent {
|
||||
get {
|
||||
return ResourceManager.GetString("MihomoButtonIsStoppingContent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 GLB. Cealing INIT. 的本地化字符串。
|
||||
/// </summary>
|
||||
|
@ -180,6 +180,9 @@
|
||||
<data name="MihomoButtonIsStoppedToolTip" xml:space="preserve">
|
||||
<value>Click to launch a local Mihomo</value>
|
||||
</data>
|
||||
<data name="MihomoButtonIsStoppingContent" xml:space="preserve">
|
||||
<value>GLB. Purging STP.</value>
|
||||
</data>
|
||||
<data name="NginxButtonIsInitingContent" xml:space="preserve">
|
||||
<value>GLB. Cealing INIT.</value>
|
||||
</data>
|
||||
|
@ -180,6 +180,9 @@
|
||||
<data name="MihomoButtonIsStoppedToolTip" xml:space="preserve">
|
||||
<value>点击启动本地 Mihomo</value>
|
||||
</data>
|
||||
<data name="MihomoButtonIsStoppingContent" xml:space="preserve">
|
||||
<value>全局净化停止中</value>
|
||||
</data>
|
||||
<data name="NginxButtonIsInitingContent" xml:space="preserve">
|
||||
<value>全局伪造启动中</value>
|
||||
</data>
|
||||
|
@ -10,11 +10,13 @@ internal class MainMihomoButtonContentConv : IMultiValueConverter
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
bool isMihomoRunning = (bool)values[0];
|
||||
bool isMihomoIniting = (bool)values[1];
|
||||
bool isCoproxyIniting = (bool)values[2];
|
||||
bool isCoproxyStopping = (bool)values[3];
|
||||
bool isComihomoIniting = (bool)values[1];
|
||||
bool isMihomoIniting = (bool)values[2];
|
||||
bool isCoproxyIniting = (bool)values[3];
|
||||
bool isCoproxyStopping = (bool)values[4];
|
||||
|
||||
return isCoproxyIniting || isCoproxyStopping ? Binding.DoNothing :
|
||||
isComihomoIniting ? MainConst.MihomoButtonIsStoppingContent :
|
||||
isMihomoIniting ? MainConst.MihomoButtonIsInitingContent :
|
||||
isMihomoRunning ? MainConst.MihomoButtonIsRunningContent : MainConst.MihomoButtonIsStoppedContent;
|
||||
}
|
||||
|
@ -120,6 +120,7 @@
|
||||
<Button.Content>
|
||||
<MultiBinding Converter="{x:Static convs:MainConv.MainMihomoButtonContentConv}">
|
||||
<Binding Path="IsMihomoRunning" />
|
||||
<Binding Path="IsComihomoIniting" />
|
||||
<Binding Path="IsMihomoIniting" />
|
||||
<Binding Path="IsCoproxyIniting" />
|
||||
<Binding Path="IsCoproxyStopping" />
|
||||
|
@ -349,10 +349,11 @@ public partial class MainWin : Window
|
||||
}
|
||||
else
|
||||
{
|
||||
MainPres.IsCoproxyStopping = true;
|
||||
|
||||
bool isConginxRunning = MainPres.IsConginxRunning;
|
||||
|
||||
if (isConginxRunning)
|
||||
MainPres.IsCoproxyStopping = true;
|
||||
|
||||
foreach (Process nginxProcess in Process.GetProcessesByName(Path.GetFileNameWithoutExtension(isConginxRunning ? MainConst.ConginxPath : MainConst.NginxPath)))
|
||||
{
|
||||
nginxProcess.Exited += async (_, _) =>
|
||||
|
Loading…
Reference in New Issue
Block a user