public void FilterRight(string searchQuery)
        {
            // In case feature definiton is scope=invalid,
            // and faulty activated feature is searched for with unique ID ending with "/15",
            // it will not be found, as activated feature will be faulty and will probably have ending "/0"
            // Therefore, "/15" is cut of here
            if (ActiveItem != null && ActiveItem.Item != null && ActiveItem.Item.Scope == Core.Models.Enums.Scope.ScopeInvalid)
            {
                // check if first part of search query is a guid
                var firstPartOfQuery = searchQuery.Split('/');

                Guid notNeededGuid;

                if (firstPartOfQuery.Length > 0 && Guid.TryParse(firstPartOfQuery[0], out notNeededGuid))
                {
                    // then remove "/0" from the end
                    searchQuery = firstPartOfQuery[0];
                }
            }

            var searchFilter = new SetSearchFilter <Core.Models.Location>(
                searchQuery, null);

            eventAggregator.BeginPublishOnUIThread(searchFilter);
        }
Exemplo n.º 2
0
        public void FilterLocation()
        {
            var searchFilter = new SetSearchFilter <Location>(
                ActiveItem == null ? string.Empty : ActiveItem.Id.ToString(), null);

            eventAggregator.BeginPublishOnUIThread(searchFilter);
        }
        public void FilterThis(string searchQuery)
        {
            var searchFilter = new SetSearchFilter <T>(
                searchQuery, null);

            Handle(searchFilter);
        }
        public void FilterFeatureDefinitions(string searchQuery)
        {
            // In case feature definiton is scope=invalid,
            // and faulty activated feature is searched for with unique ID ending with "/0",
            // it will not be found on the left
            // Therefore, "/0" is cut of here
            if (!string.IsNullOrEmpty(searchQuery) && searchQuery.EndsWith("/0"))
            {
                // check if first part of search query is a guid
                var firstPartOfQuery = searchQuery.Split('/');

                Guid notNeededGuid;

                if (firstPartOfQuery.Length > 0 && Guid.TryParse(firstPartOfQuery[0], out notNeededGuid))
                {
                    // then remove "/0" from the end
                    searchQuery = firstPartOfQuery[0];
                }
            }

            var searchFilter = new SetSearchFilter <Core.Models.FeatureDefinition>(
                searchQuery, null);

            eventAggregator.BeginPublishOnUIThread(searchFilter);
        }
Exemplo n.º 5
0
        public void FilterThis()
        {
            var searchFilter = new SetSearchFilter <T>(
                ActiveItem == null ? string.Empty : ActiveItem.Id.ToString(), null);

            Handle(searchFilter);
        }
Exemplo n.º 6
0
        // as SetSearchFilter is handled in generic base class, search filter has to be converted to AcitvatedFeatureSpecial
        public void Handle(SetSearchFilter <Location> message)
        {
            var genericSearchFilter = new SetSearchFilter <ActivatedFeatureSpecial>(
                message.SearchQuery,
                message.SearchScope
                );

            Handle(genericSearchFilter);
        }
Exemplo n.º 7
0
        public void FilterThis(Guid id)
        {
            var searchQuery = string.Empty;

            if (ActiveItem != null && id != null)
            {
                searchQuery = id.ToString();
            }

            var searchFilter = new SetSearchFilter <T>(
                searchQuery, null);

            Handle(searchFilter);
        }
        public void Handle(SetSearchFilter <T> message)
        {
            // only set search filter, if active
            if (IsActive || message is SetSearchFilter <Core.Models.FeatureDefinition> )
            {
                if (message == null)
                {
                    return;
                }
                ;

                if (message.SetQuery)
                {
                    SearchInput = message.SearchQuery;
                }

                if (message.SetScope)
                {
                    SelectedScopeFilter = message.SearchScope;
                }
            }
        }