/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Content/Background/SetAsSlideshowBackgroundAction.cs
42 строки
1 KB
Yair
Code Quality: Tweak default setting for set as slideshow button
16 апр 2026, 02:37
16 апр 2026, 02:37
39a6ddf
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class SetAsSlideshowBackgroundAction : BaseSetAsAction { public override string Label => Strings.Slideshow.GetLocalizedResource(); public override string ExtendedLabel => Strings.SetAsSlideshow.GetLocalizedResource(); public override string Description => Strings.SetAsSlideshowBackgroundDescription.GetLocalizedResource(); public override RichGlyph Glyph => new(themedIconStyle: "App.ThemedIcons.SetSlideshow.16"); public override bool IsExecutable => base.IsExecutable && ContentPageContext.SelectedItems.Count > 1; public override Task ExecuteAsync(object? parameter = null) { if (!IsExecutable || ContentPageContext.SelectedItems.Select(item => item.ItemPath).ToArray() is not string[] paths || paths.Length is 0) return Task.CompletedTask; try { WindowsWallpaperService.SetDesktopSlideshow(paths); } catch (Exception ex) { ShowErrorDialog(ex.Message); } return Task.CompletedTask; } } }