コード例 #1
0
        private void QuerySelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DemoQuery query = _queriesListView.SelectedItem as DemoQuery;

            if (null != query)
            {
                _results.SetSource(query.Run(_application));
            }
        }
コード例 #2
0
        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));
        }