public QueryPartSuggestion(string name, string usage, QueryPartViewModel part) { Part = part; Image = icons[part.GetType()]; Usage = usage; Name = name; }
private FilterBoxViewModel(IValidationScope context, bool negate, QueryPartViewModel queryPart) { this.Context = context; this.queryPart = queryPart; queryPart.PropertyChanged += (sender, args) => RaiseChanged(); queryPart.ReadyModeRequested += (sender, args) => Validate(); state = FilterBoxState.Editing; this.negate = negate; this.last = false; AddCommand = new RelayCommand <QueryPartSuggestion>(suggestion => Added?.Invoke(this, suggestion)); DeleteCommand = new RelayCommand(() => Deleted?.Invoke(this, new EventArgs())); DoneCommand = new RelayCommand(() => Validate()); }