1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using compdfkit_tools.Data;
- using compdfkit_tools.Properties;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
- {
- public class CPDFStampUIViewModel : INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
- public void RaisePropertyChanged(string PropertyName)
- {
- if (this.PropertyChanged!=null)
- {
- this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(PropertyName));
- }
- }
- public ObservableCollection<CPDFStampData> StandardStampList { get; set; }
- public ObservableCollection<CPDFStampData> CustomStampList { get; set; }
- public CPDFStampUIViewModel()
- {
- StandardStampList = new ObservableCollection<CPDFStampData>();
- CustomStampList = new ObservableCollection<CPDFStampData>();
- InitStandardStamp();
- LoadSettings();
- }
- public void InitStandardStamp()
- {
- }
- /// <summary>
- /// Loading CacheStamp
- /// </summary>
- public void LoadSettings()
- {
- }
- public void DeleteStamp(CPDFStampData stampData)
- {
- int index = CustomStampList.IndexOf(stampData);
- DirectoryInfo CreatedFilePathFolder = new DirectoryInfo(stampData.SourcePath);
- if (CreatedFilePathFolder.Exists)
- {
- Directory.Delete(stampData.SourcePath, true);
- }
- CustomStampList.RemoveAt(index);
- }
- }
- }
|