private void QuerySelectionChanged(object sender, SelectionChangedEventArgs e) { DemoQuery query = _queriesListView.SelectedItem as DemoQuery; if (null != query) { _results.SetSource(query.Run(_application)); } }
public MainWindow() { InitializeComponent(); _server = Server.Create("Default"); Closing += (s, e) => { _results.Clear(); _server.Dispose(); }; _application = _server.CreateApplication("Hitchhiker's Guide"); _queriesListView.DataContext = DemoQuery.FindQueries(typeof(Queries)); }