public DataSetSelectorDialog(IEnumerable <DataSet> dataSets, string reportFileParh) { ThreadHelper.ThrowIfNotOnUIThread(); var tableSelector = new DataSetSelector(dataSets, reportFileParh); this.Width = 600; this.Height = 500; this.Content = tableSelector; }
private void OnDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { e.Effects = DragDropEffects.Link; string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); _dataSetSelector?.Dispose(); _dataSetSelector = new DataSetSelector(_viewModel); _dataSetSelector.Open(files[0]); } }
private void LoadFolder() { var dialog = new CommonOpenFileDialog { IsFolderPicker = true, InitialDirectory = Settings.Default.LastUsedFolder }; if (dialog.ShowDialog() == CommonFileDialogResult.Ok) { _dataSetSelector?.Dispose(); _dataSetSelector = new DataSetSelector(_viewModel); _dataSetSelector.Open(dialog.FileName); } }