private async void _dbFileList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (_dbFileList.SelectedItem == null) { return; } var path = WorkPath.DbPath + @"\" + (string)_dbFileList.SelectedItem; DbTableList = await Task.Run(() => { var db = new Sqlite3(path); return new ObservableCollection<string>(db.GetTables()); }); OnPropertyChanged(nameof(DbTableList)); }
private async void _dbFileList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (_dbFileList.SelectedItem == null) { return; } var path = WorkPath.DbPath + @"\" + (string)_dbFileList.SelectedItem; DbTableList = await Task.Run(() => { var db = new Sqlite3(path); return(new ObservableCollection <string>(db.GetTables())); }); OnPropertyChanged(nameof(DbTableList)); }