public TagsEditVM(MainWindowVM parentVM) { parentVM.PropertyChanged += (sender, args) => { if (args.PropertyName == "SelectedEntries") { OnPropertyChanged(() => SelectedEntries); } }; _parentVM = parentVM; _fileTagService = ServiceLocator.GetService <IFileTagService>(); _tagService = ServiceLocator.GetService <ITagService>(); }
public TagSearchVM(ObservableCollection <CollectionVM> collections) { _fileTagService = ServiceLocator.GetService <IFileTagService>(); _tagService = ServiceLocator.GetService <ITagService>(); Collections.Add(new KeyValuePair <string, Guid?>("All", null)); foreach (var collectionVm in collections) { Collections.Add(new KeyValuePair <string, Guid?>(collectionVm.Name, collectionVm.Id)); } SelectedCollection = Collections.FirstOrDefault(); ResetValueEnter(); }
public BindedTagVM(FileTag bindedTagModel, Guid?targetId = null) { Model = bindedTagModel; _fileTagService = ServiceLocator.GetService <IFileTagService>(); _targetId = targetId; }