public void ViewFilterChanged(object sender, FilterEventArgs e) { switch (e.Modified) { case FilterModification.Category: CurrentPartCategory = (PartCategories) e.Object; break; case FilterModification.ActionGroup: CurrentActionGroup = (KSPActionGroup)e.Object; break; case FilterModification.Search: CurrentSearch = e.Object as string; break; case FilterModification.Stage: CurrentStage = (int)e.Object; break; case FilterModification.Part: CurrentPart = e.Object as Part; break; case FilterModification.BaseAction: CurrentAction = e.Object as BaseAction; break; case FilterModification.All: Initialize(); break; default: break; } Dirty = true; }
private void OnUpdate(FilterModification mod, object o) { FilterEventArgs ev = new FilterEventArgs() { Modified = mod, Object = o }; if (FilterChanged != null) FilterChanged(this, ev); }