Пример #1
0
        private async Task OpenKeyFile()
        {
            var file = await _file.OpenFile(string.Empty, Constants.Extensions.Any, false);

            if (file == null)
            {
                return;
            }
            SetKeyFileInfo(file);
        }
Пример #2
0
        private async Task OpenKeyFile()
        {
            var file = await _file.OpenFile(string.Empty, Constants.Extensions.Any, false);

            if (file == null)
            {
                return;
            }
            KeyFilePath = file.Id;
            KeyFileText = file.Name;
            HasKeyFile  = true;
        }
Пример #3
0
        private async Task AddAttachment()
        {
            var fileInfo = await _file.OpenFile(string.Empty, Domain.Common.Constants.Extensions.Any, false);

            if (fileInfo == null)
            {
                return;
            }
            var contents = await _file.ReadBinaryFile(fileInfo.Id);

            await _mediator.Send(new AddAttachmentCommand { Entry = _current, AttachmentName = fileInfo.Name, AttachmentContent = contents });

            Attachments.Add(new Attachment {
                Name = fileInfo.Name, Content = contents
            });
        }
Пример #4
0
        private async Task OpenDatabaseFile()
        {
            var file = await _file.OpenFile(string.Empty, Constants.Extensions.Kdbx, true);

            SetFileInformation(file);
        }