/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/ViewModels/Dialogs/CredentialDialogViewModel.cs
57 строк
1 KB
yair100
Feature: Improved behavior when opening encrypted archives (#18758)
21 июл 2026, 17:17
Не верифицирован
21 июл 2026, 17:17
e57f6a0
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.ViewModels.Dialogs { public sealed partial class CredentialDialogViewModel : ObservableObject { private string? _UserName; public string? UserName { get => _UserName; set => SetProperty(ref _UserName, value); } private bool _IsAnonymous; public bool IsAnonymous { get => _IsAnonymous; set => SetProperty(ref _IsAnonymous, value); } private bool _PasswordOnly; public bool PasswordOnly { get => _PasswordOnly; set => SetProperty(ref _PasswordOnly, value); } private bool _CanBeAnonymous; public bool CanBeAnonymous { get => _CanBeAnonymous; set => SetProperty(ref _CanBeAnonymous, value); } private bool _IsWrongPassword; public bool IsWrongPassword { get => _IsWrongPassword; set => SetProperty(ref _IsWrongPassword, value); } /// <summary> /// When set, the dialog stays open on OK until the entered password passes validation. /// </summary> public Func<DisposableArray, Task<bool>>? PasswordValidator { get; set; } public DisposableArray? Password { get; private set; } public IRelayCommand PrimaryButtonClickCommand { get; } public CredentialDialogViewModel() { PrimaryButtonClickCommand = new RelayCommand<DisposableArray?>((password) => Password = password); } } }