public CatalogSearchViewModel(CatalogSearchSettings settings, Action <object> performNavigate) { Settings = settings; PerformNavigate = performNavigate; Results = new ObservableCollection <CatalogSearchResultViewModel>(); NavigateCommand = new NavigateCommand(this); PropertyChanged += (sender, args) => { if (args.PropertyName != "Progress") { return; } Debug.WriteLine("ShowProgress changing"); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ShowProgress")); }; }
public CatalogSearchResultViewModel(DefInfo ruleAppDef, RuleSetDef ruleSetDef, string matchedValue, CatalogSearchSettings settings, RuleElementDef ruleDef = null) { RuleAppName = ruleAppDef.Name + " v" + ruleAppDef.PublicRevision; RuleSetName = ruleSetDef.AuthoringElementPath; MatchedValue = matchedValue; //TODO: The way we're navigating to the item does not work properly - add this back in once that works IsInCurrentRuleApp = false;// settings.CurrentRuleApp != null && ruleAppDef.Key.Guid == settings.CurrentRuleApp.Value; RuleSetDef = ruleSetDef; if (ruleDef != null) { RuleElementName = ruleDef.AuthoringElementPath; RuleDef = ruleDef; } }