mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-14 05:12:09 +08:00
1.1.1 -> 1.1.2 第49次更新
This commit is contained in:
parent
158ee04adc
commit
605c6e61a3
@ -184,6 +184,7 @@ public partial class MainWin : Window
|
||||
{
|
||||
if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
||||
return;
|
||||
|
||||
if (!File.Exists(MainConst.NginxConfPath))
|
||||
File.Create(MainConst.NginxConfPath).Dispose();
|
||||
if (!Directory.Exists(MainConst.NginxLogsPath))
|
||||
@ -300,8 +301,11 @@ public partial class MainWin : Window
|
||||
|
||||
if (!MainPres!.IsMihomoRunning)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(MihomoConfs))
|
||||
throw new Exception(MainConst._ConfErrorMsg);
|
||||
if (MessageBox.Show(MainConst._LaunchProxyPrompt, string.Empty, MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
||||
return;
|
||||
|
||||
if (!File.Exists(MainConst.MihomoConfPath))
|
||||
File.Create(MainConst.MihomoConfPath).Dispose();
|
||||
|
||||
@ -575,6 +579,8 @@ public partial class MainWin : Window
|
||||
private void MihomoConfWatcher_Changed(object sender, FileSystemEventArgs e)
|
||||
{
|
||||
if (MainConst.IsAdmin && MainPres!.IsMihomoExist)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!File.Exists(MainConst.MihomoConfPath))
|
||||
File.Create(MainConst.MihomoConfPath).Dispose();
|
||||
@ -606,6 +612,8 @@ public partial class MainWin : Window
|
||||
|
||||
MihomoConfs = new SerializerBuilder().WithNamingConvention(HyphenatedNamingConvention.Instance).Build().Serialize(mihomoConfDict);
|
||||
}
|
||||
catch { MihomoConfs = string.Empty; }
|
||||
}
|
||||
}
|
||||
private void MainWin_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user