コード例 #1
0
        private async Task AddAdditionalAttachmentExecute(object obj)
        {
            var interaction       = new SelectFileInteraction(_getSelectFileInteractionTitle(), "", false, _tokens, _filter);
            var interactionResult = await _interactionRequest.RaiseAsync(interaction);

            if (interactionResult.Result != SelectFileInteractionResult.Apply)
            {
                return;
            }

            AddFilePath(interactionResult.File);

            RaisePropertyChanged(nameof(FileListDictionary));
            RaisePropertyChanged(nameof(FileList));
        }
コード例 #2
0
        private async Task EditAdditionalAttachmentExecute(object obj)
        {
            var originalFile      = obj as string;
            var interaction       = new SelectFileInteraction(_getSelectFileInteractionTitle(), originalFile, true, _tokens, _filter);
            var interactionResult = await _interactionRequest.RaiseAsync(interaction);

            if (interactionResult.Result != SelectFileInteractionResult.Apply &&
                interactionResult.Result != SelectFileInteractionResult.Remove)
            {
                return;
            }

            FileList.Remove(originalFile);

            if (interactionResult.Result == SelectFileInteractionResult.Apply)
            {
                AddFilePath(interactionResult.File);
            }

            RaisePropertyChanged(nameof(FileListDictionary));
            RaisePropertyChanged(nameof(FileList));
        }