private async void _dbTableList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (_dbFileList.SelectedItem == null) { return; } var path = WorkPath.DbPath + @"\" + (string)_dbFileList.SelectedItem; var tableName = (string)_dbTableList.SelectedItem; _dataViewer.ItemsSource = await Task.Run(() => { var db = new Sqlite3(path); return db.GetDatas(tableName).DefaultView; }); }
private async void _refresh_Click(object sender, RoutedEventArgs e) { if (_dbFileList.SelectedItem == null) { return; } var path = WorkPath.DbPath + @"\" + (string)_dbFileList.SelectedItem; var tableName = (string)_dbTableList.SelectedItem; _dataViewer.ItemsSource = await Task.Run(() => { var db = new Sqlite3(path); return(db.GetDatas(tableName).DefaultView); }); }