/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/ViewModels/Dialogs/FileSystemDialog/BaseFileSystemDialogItemViewModel.cs
44 строки
972 B
Yair
Code Quality: Updated license header
31 дек 2024, 05:03
31 дек 2024, 05:03
8436c6d
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using Files.Shared.Utils; using System.IO; namespace Files.App.ViewModels.Dialogs.FileSystemDialog { public abstract class BaseFileSystemDialogItemViewModel : ObservableObject { public IMessenger? Messenger { get; set; } private string? _SourcePath; public virtual string? SourcePath { get => _SourcePath; set { if (SetProperty(ref _SourcePath, value)) { OnPropertyChanged(nameof(SourceDirectoryDisplayName)); DisplayName = Path.GetFileName(value); } } } private string? _DisplayName; public virtual string? DisplayName { get => _DisplayName; set => SetProperty(ref _DisplayName, value); } private IImage? _ItemIcon; public IImage? ItemIcon { get => _ItemIcon; set => SetProperty(ref _ItemIcon, value); } public virtual string? SourceDirectoryDisplayName => Path.GetFileName(Path.GetDirectoryName(SourcePath)); } }