public FileViewModel(string fileName, IPersistanceModel persistanceModel, ITagsModel tagsModel) { Name = fileName; _tagsModel = tagsModel; _persistanceModel = persistanceModel; _persistanceModel.FileChanged += PersistanceModelOnFileChanged; AddTagCommand = new GalaSoft.MvvmLight.Command.RelayCommand <TagViewModel>(ExecuteAddTagCommand); DeleteTagCommand = new RelayCommand <TagViewModel>(ExecuteDeleteTagCommand); }
public FileListViewModel(IPersistanceModel persistanceModel, ITagsModel tagsModel) { _tagsModel = tagsModel; _persistanceModel = persistanceModel; _persistanceModel.FilesChanged += PersistanceModelOnFilesChanged; #if DEBUG _persistanceModel.Load(Environment.CurrentDirectory); #endif }
public TagCloudViewModel(ITagsModel tagsModel) { _tagsModel = tagsModel; foreach (var tag in _tagsModel.Tags) { Tags.Add(new TagViewModel(tag)); } AddCommand = new RelayCommand <string>(ExecuteAddCommand); }