public override bool GetOptions(System.Windows.Window parentWindow, ImportWizardContext context) { var filename = PromptForFilename("*.sqlite", "Error databases (*.sqlite)|*.sqlite"); if (!string.IsNullOrEmpty(filename)) { _options = new ErrorDatabaseImporterOptions { Filename = filename }; var frm = new ErrorDatabaseImportOptionsWindow(_options, context); frm.Owner = parentWindow; frm.WindowStartupLocation = WindowStartupLocation.CenterOwner; return(frm.ShowDialog().ValueOrFalse()); } return(false); }
public ErrorDatabaseImportOptionsWindow(ErrorDatabaseImporterOptions options, ImportWizardContext context) { InitializeComponent(); _service = new ImportStagingService(options.Filename); Options = options; Context = context; _mappings = _service.GetMappings(); dataGrid.AutoGenerateColumns = false; foreach (ImportFieldMapping mapping in _mappings) { dataGrid.Columns.Add(CreateColumn(mapping)); } var ds = _service.GetErrorsDataSet(); dataGrid.ItemsSource = ds.Tables[0].DefaultView; dataGrid.IsReadOnly = true; dataGrid.MouseDoubleClick += new MouseButtonEventHandler(dataGrid_MouseDoubleClick); }
protected override void ReadEntryPoint(Utilities.EntryPoint ep) { _options = new ErrorDatabaseImporterOptions { Filename = ep["Filename"] }; }
public override bool GetOptions(System.Windows.Window parentWindow, ImportWizardContext context) { var filename = PromptForFilename("*.sqlite", "Error databases (*.sqlite)|*.sqlite"); if (!string.IsNullOrEmpty(filename)) { _options = new ErrorDatabaseImporterOptions { Filename = filename }; var frm = new ErrorDatabaseImportOptionsWindow(_options, context); frm.Owner = parentWindow; frm.WindowStartupLocation = WindowStartupLocation.CenterOwner; return frm.ShowDialog().ValueOrFalse(); } return false; }