public ExecuteCommandMoveFilterIntoContainer(IBasicActivateItems activator, FilterCombineable filterCombineable, IContainer targetContainer) : base(activator) { _filterCombineable = filterCombineable; _targetContainer = targetContainer; if (!filterCombineable.AllContainersInEntireTreeFromRootDown.Contains(targetContainer)) { SetImpossible("Filters can only be moved within their own container tree"); } }
public ExecuteCommandImportNewCopyOfFilterIntoContainer(IActivateItems activator, FilterCombineable filterCombineable, IContainer targetContainer) : base(activator) { _filterCombineable = filterCombineable; _targetContainer = targetContainer; //if source catalogue is known if (_filterCombineable.SourceCatalogueIfAny != null) { var targetCatalogue = targetContainer.GetCatalogueIfAny(); if (targetCatalogue != null) { if (!_filterCombineable.SourceCatalogueIfAny.Equals(targetCatalogue)) { SetImpossible("Cannot Import Filter from '" + _filterCombineable.SourceCatalogueIfAny + "' into '" + targetCatalogue + "'"); } } } }