protected void RemoveSelectedFromList(object obj) { MailActionSettings.AdditionalAttachments.Remove((string)obj); RaisePropertyChanged(nameof(AdditionalAttachmentsForTextBox)); //raus? RaisePropertyChanged(nameof(AdditionalAttachmentsDictionary)); RaisePropertyChanged(nameof(AdditionalAttachments)); AdditionalAttachmentsTokenViewModel.RaiseTextChanged(); }
private Option <string> SelectFileAction(string currentAttachment) { var title = Translation.SelectFile; var filter = Interaction.Filter ?? Translation.AllFiles + " " + @"(*.*)|*.*"; var interactionResult = _openFileInteractionHelper.StartOpenFileInteraction(currentAttachment, title, filter); interactionResult.MatchSome(s => { AdditionalAttachmentsTokenViewModel.RaiseTextChanged(); }); return(interactionResult); }
protected Option <string> AddFilePathToAdditionalAttachments(string filePathWithToken) { if (string.IsNullOrEmpty(filePathWithToken)) { return(Option.Some("")); } if (!AdditionalAttachmentsDictionary.ContainsKey(filePathWithToken)) { AdditionalAttachments.Add(filePathWithToken); } AdditionalAttachmentsForTextBox = ""; RaisePropertyChanged(nameof(AdditionalAttachmentsForTextBox)); RaisePropertyChanged(nameof(AdditionalAttachmentsDictionary)); RaisePropertyChanged(nameof(AdditionalAttachments)); AdditionalAttachmentsTokenViewModel.RaiseTextChanged(); return(Option.Some(AdditionalAttachmentsForTextBox)); }
protected Option <string> SelectAttachmentFileAction(string s1) { var title = Translation.SelectAttachmentTitle; var filter = Translation.AllFiles + " " + @"(*.*)|*.*"; var interactionResult = _openFileInteractionHelper.StartOpenFileInteraction("", title, filter); interactionResult.MatchSome(s => { if (!AdditionalAttachmentsDictionary.ContainsKey(s)) { AdditionalAttachments.Add(s); } RaisePropertyChanged(nameof(AdditionalAttachmentsForTextBox)); RaisePropertyChanged(nameof(AdditionalAttachmentsDictionary)); RaisePropertyChanged(nameof(AdditionalAttachments)); AdditionalAttachmentsTokenViewModel.RaiseTextChanged(); }); return(Option.Some(AdditionalAttachmentsForTextBox ?? "")); }