add:OOBE
This commit is contained in:
@@ -931,6 +931,8 @@ namespace Ink_Canvas
|
||||
AutoBackupManager.Initialize(Settings);
|
||||
CheckUpdateChannelAndTelemetryConsistency();
|
||||
|
||||
ShowOobeIfNeeded();
|
||||
|
||||
// 初始化Dlass上传队列(恢复上次的上传队列)
|
||||
DlassNoteUploader.InitializeQueue();
|
||||
|
||||
@@ -1228,6 +1230,41 @@ namespace Ink_Canvas
|
||||
AddTouchSupportToSliders();
|
||||
}
|
||||
|
||||
private void ShowOobeIfNeeded()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Settings?.Startup == null) return;
|
||||
if (Settings.Startup.HasShownOobe) return;
|
||||
|
||||
var oobeWindow = new OobeWindow(Settings)
|
||||
{
|
||||
Owner = this,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
};
|
||||
try
|
||||
{
|
||||
App.IsOobeShowing = true;
|
||||
oobeWindow.ShowDialog();
|
||||
}
|
||||
finally
|
||||
{
|
||||
App.IsOobeShowing = false;
|
||||
}
|
||||
|
||||
Settings.Startup.HasShownOobe = true;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogToFile($"显示首次启动体验(OOBE)时出错: {ex}", LogHelper.LogType.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
App.IsOobeShowing = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void SystemEventsOnDisplaySettingsChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!Settings.Advanced.IsEnableResolutionChangeDetection) return;
|
||||
|
||||
Reference in New Issue
Block a user