コード例 #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
ファイル: EntryDetailVm.cs プロジェクト: wismna/ModernKeePass
        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);
        }