2020-04-07 17:29:03 +02:00
|
|
|
|
using Windows.Storage;
|
2020-03-27 18:45:13 +01:00
|
|
|
|
using MediatR;
|
2020-04-06 20:20:45 +02:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using ModernKeePass.Application.Common.Interfaces;
|
2018-09-07 18:16:40 +02:00
|
|
|
|
|
|
|
|
|
namespace ModernKeePass.ViewModels
|
2017-10-16 16:16:58 +02:00
|
|
|
|
{
|
|
|
|
|
public class NewVm : OpenVm
|
|
|
|
|
{
|
2020-03-27 18:45:13 +01:00
|
|
|
|
private readonly IMediator _mediator;
|
2020-04-06 20:20:45 +02:00
|
|
|
|
private readonly ISettingsProxy _settings;
|
2018-09-10 17:29:52 +02:00
|
|
|
|
private string _importFormatHelp;
|
2018-09-07 18:16:40 +02:00
|
|
|
|
|
|
|
|
|
public bool IsImportChecked { get; set; }
|
|
|
|
|
|
|
|
|
|
public IStorageFile ImportFile { get; set; }
|
|
|
|
|
|
2018-09-10 17:29:52 +02:00
|
|
|
|
public string ImportFileExtensionFilter { get; set; } = "*";
|
|
|
|
|
|
2020-04-06 20:20:45 +02:00
|
|
|
|
public IImportFormat ImportFormat { get; set; }
|
2018-09-10 17:29:52 +02:00
|
|
|
|
|
|
|
|
|
public string ImportFormatHelp
|
|
|
|
|
{
|
|
|
|
|
get { return _importFormatHelp; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_importFormatHelp = value;
|
|
|
|
|
OnPropertyChanged(nameof(ImportFormatHelp));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-06 20:20:45 +02:00
|
|
|
|
public NewVm(): this(App.Services.GetService<IMediator>(), App.Services.GetService<ISettingsProxy>()) { }
|
2020-03-27 18:45:13 +01:00
|
|
|
|
|
2020-04-06 20:20:45 +02:00
|
|
|
|
public NewVm(IMediator mediator, ISettingsProxy settings)
|
2020-03-27 18:45:13 +01:00
|
|
|
|
{
|
|
|
|
|
_mediator = mediator;
|
2020-03-30 19:43:04 +02:00
|
|
|
|
_settings = settings;
|
2020-03-27 18:45:13 +01:00
|
|
|
|
}
|
2017-10-16 16:16:58 +02:00
|
|
|
|
}
|
|
|
|
|
}
|