12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using ComPDFKitViewer.PdfViewer;
- using PDF_Office.Model;
- using PDF_Office.Properties;
- using Prism.Commands;
- using Prism.Mvvm;
- using Prism.Regions;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
- {
- internal class StickyNotePopupViewModel : BindableBase, INavigationAware
- {
- private string authorText;
- public string AuthorText
- {
- get { return authorText; }
- set
- {
- SetProperty(ref authorText, value);
- }
- }
- private string dateText;
- public string DateText
- {
- get { return dateText; }
- set
- {
- SetProperty(ref dateText, value);
- }
- }
- private string contentText;
- public string ContentText
- {
- get { return contentText; }
- set
- {
- SetProperty(ref contentText, value);
- }
- }
- private ViewContentViewModel ViewContentViewModel;
- public DelegateCommand ContentTextLostFocus { get; set; }
- public StickyNotePopupViewModel()
- {
- ContentTextLostFocus = new DelegateCommand(ContentText_LostFocus);
- }
- private void ContentText_LostFocus()
- {
- ViewContentViewModel.IsNoteAdd = false;
- }
- public bool IsNavigationTarget(NavigationContext navigationContext)
- {
- return true;
- }
- public void OnNavigatedFrom(NavigationContext navigationContext)
- {
- }
- public void OnNavigatedTo(NavigationContext navigationContext)
- {
- navigationContext.Parameters.TryGetValue<ViewContentViewModel>(ParameterNames.ViewContentViewModel, out ViewContentViewModel);
- AuthorText = Settings.Default.AppProperties.Description.Author;
- DateText = DateTime.Now.ToString(@"yyyyMMddHHmmsszzz\'").Replace(':', '\'') + "\n";
- }
- }
- }
|