Пример #1
0
        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));
        }
Пример #2
0
        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));
        }