Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TagsViewModel"/> class.
 /// </summary>
 /// <param name="assetCollection">The <see cref="AssetCollectionViewModel"/> that will be used to track the list of selected assets.</param>
 public TagsViewModel(AssetCollectionViewModel assetCollection)
     : base(assetCollection.SafeArgument(nameof(assetCollection)).ServiceProvider)
 {
     this.assetCollection = assetCollection;
     assetCollection.SelectedAssets.CollectionChanged += SelectedAssetsChanged;
     AddTagCommand = new AnonymousCommand <string>(ServiceProvider, AddTag);
 }
Ejemplo n.º 2
0
        public IAssetPickerDialog CreateAssetPickerDialog(SessionViewModel session)
        {
            var assetPickerWindow = new AssetPickerWindow(session);
            var assetView         = new AssetCollectionViewModel(session.ServiceProvider, session, new[] { FilterCategory.AssetName, FilterCategory.AssetTag });

            assetPickerWindow.AssetView = assetView;
            return(assetPickerWindow);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ReferencesViewModel"/> class.
        /// </summary>
        /// <param name="session">The session view model.</param>
        /// <param name="assetCollection">The asset collection view model of assets for which we want to gather references.</param>
        public ReferencesViewModel(SessionViewModel session, AssetCollectionViewModel assetCollection)
            : base(session.SafeArgument(nameof(session)).ServiceProvider)
        {
            this.assetCollection = assetCollection;
            DisplayedReferences  = new AssetCollectionViewModel(session.ServiceProvider, session, AssetCollectionViewModel.AllFilterCategories);

            session.ActiveAssetView.SelectedAssets.CollectionChanged += (sender, e) => RefreshReferences();
            session.AssetPropertiesChanged += (sender, e) => Dispatcher.InvokeAsync(RefreshReferences);
        }