예제 #1
0
 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;
     });
 }
예제 #2
0
        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);
            });
        }