improve:更新弹窗
This commit is contained in:
@@ -2700,6 +2700,19 @@ namespace Ink_Canvas
|
||||
|
||||
public void BtnExit_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 如果当前在设置面板中,需要先恢复无焦点模式状态
|
||||
if (BorderSettings.Visibility == Visibility.Visible)
|
||||
{
|
||||
// 如果用户没有在设置中修改无焦点模式,则恢复之前的状态
|
||||
if (!userChangedNoFocusModeInSettings && wasNoFocusModeBeforeSettings)
|
||||
{
|
||||
Settings.Advanced.IsNoFocusMode = true;
|
||||
ToggleSwitchNoFocusMode.IsOn = true;
|
||||
ApplyNoFocusMode();
|
||||
}
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
App.IsAppExitByUser = true;
|
||||
// 不设置 CloseIsFromButton = true,让它也经过确认流程
|
||||
Close();
|
||||
@@ -2707,6 +2720,18 @@ namespace Ink_Canvas
|
||||
|
||||
public void BtnRestart_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (BorderSettings.Visibility == Visibility.Visible)
|
||||
{
|
||||
// 如果用户没有在设置中修改无焦点模式,则恢复之前的状态
|
||||
if (!userChangedNoFocusModeInSettings && wasNoFocusModeBeforeSettings)
|
||||
{
|
||||
Settings.Advanced.IsNoFocusMode = true;
|
||||
ToggleSwitchNoFocusMode.IsOn = true;
|
||||
ApplyNoFocusMode();
|
||||
}
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
Process.Start(System.Windows.Forms.Application.ExecutablePath, "-m");
|
||||
App.IsAppExitByUser = true;
|
||||
// 不设置 CloseIsFromButton = true,让它也经过确认流程
|
||||
|
||||
Reference in New Issue
Block a user