using Microsoft.Office.Interop.Word; using PDF_Master.Model; using Prism.Commands; using Prism.Mvvm; using Prism.Services.Dialogs; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PDF_Master.ViewModels.Dialog.BOTA { internal class BookmarkInfoDialogViewModel : BindableBase, IDialogAware { private string bookmarkInfo; public string BookmarkInfo { get { return bookmarkInfo; } set { SetProperty(ref bookmarkInfo, value); } } public DelegateCommand CancelCommand { get; set; } public DelegateCommand OkCommnad { get; set; } public string Title => ""; public event Action RequestClose; public BookmarkInfoDialogViewModel() { CancelCommand = new DelegateCommand(CancelEvent); OkCommnad = new DelegateCommand(OkEvent); } private void CancelEvent() { RequestClose.Invoke(new DialogResult(ButtonResult.Cancel)); } private void OkEvent() { RequestClose.Invoke(new DialogResult(ButtonResult.OK)); } public bool CanCloseDialog() { return true; } public void OnDialogClosed() { } public void OnDialogOpened(IDialogParameters parameters) { string mark; parameters.TryGetValue(ParameterNames.BookmarkInfo, out mark); BookmarkInfo = mark; //string title; //parameters.TryGetValue(ParameterNames.Title, out title); //Title = title; return; } } }