コード例 #1
0
        public DataSetSelectorDialog(IEnumerable <DataSet> dataSets, string reportFileParh)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            var tableSelector = new DataSetSelector(dataSets, reportFileParh);

            this.Width   = 600;
            this.Height  = 500;
            this.Content = tableSelector;
        }
コード例 #2
0
 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]);
     }
 }
コード例 #3
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);
            }
        }