示例#1
0
        private static async Task ApplySetting(UserSetting setting)
        {
            //设置开机启动
            _ = await _startupManager.Set(setting.General.StartWithSystem);

            // 更新开机启动结果
            if (setting?.General?.StartWithSystem != null)
            {
                setting.General.StartWithSystem = await _startupManager.Check();
            }

            string ffmpegSaveDir = FFmpegSaveDir;

            if (_FFMpegDownloader != null)
            {
                _FFMpegDownloader.DistDir = ffmpegSaveDir;
            }

            ProcessHelper.AddPathToEnvoirment(ffmpegSaveDir);

            //设置壁纸参数
            _ = await WallpaperApi.SetOptions(setting.Wallpaper);
        }