public TagsEditVM(MainWindowVM parentVM)
    {
        parentVM.PropertyChanged += (sender, args) =>
        {
            if (args.PropertyName == "SelectedEntries")
            {
                OnPropertyChanged(() => SelectedEntries);
            }
        };
        _parentVM = parentVM;

        _fileTagService = ServiceLocator.GetService <IFileTagService>();
        _tagService     = ServiceLocator.GetService <ITagService>();
    }
Ejemplo n.º 2
0
    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();
    }
Ejemplo n.º 3
0
 public BindedTagVM(FileTag bindedTagModel, Guid?targetId = null)
 {
     Model           = bindedTagModel;
     _fileTagService = ServiceLocator.GetService <IFileTagService>();
     _targetId       = targetId;
 }