예제 #1
0
 protected override void ReadEntryPoint(EntryPoint ep)
 {
     _options          = new CSVImporterOptions();
     _options.Filename = ep["Filename"];
     _options.FirstRowContainsNames = Boolean.Parse(ep["FirstRowHeaders", "true"]);
     _options.Delimiter             = HttpUtility.HtmlDecode(ep["Delimiter"]);
 }
예제 #2
0
        public override bool GetOptions(System.Windows.Window parentWindow, ImportWizardContext context)
        {
            var frm = new CSVImportOptionsWindow(_options);

            frm.Owner = parentWindow;
            frm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            if (frm.ShowDialog().GetValueOrDefault(false))
            {
                _options = new CSVImporterOptions {
                    Filename = frm.Filename, Delimiter = frm.Delimiter, FirstRowContainsNames = frm.IsFirstRowContainNames, ColumnNames = frm.ColumnNames
                };
                return(true);
            }

            return(false);
        }
예제 #3
0
        public CSVImportOptionsWindow(CSVImporterOptions options)
        {
            InitializeComponent();

            cmbDelimiter.ItemsSource = _delimiterOptions;

            if (options != null) {
                txtFilename.Text = options.Filename;
                cmbDelimiter.SelectedItem = FindDelimiter(options.Delimiter);
                chkFirstRowNames.IsChecked = options.FirstRowContainsNames;
            } else {
                cmbDelimiter.SelectedItem = FindDelimiter(",");
                chkFirstRowNames.IsChecked = true;
            }

            this.Closed += new EventHandler(CSVImportOptionsWindow_Closed);
        }
        public CSVImportOptionsWindow(CSVImporterOptions options)
        {
            InitializeComponent();

            cmbDelimiter.ItemsSource = _delimiterOptions;

            if (options != null)
            {
                txtFilename.Text           = options.Filename;
                cmbDelimiter.SelectedItem  = FindDelimiter(options.Delimiter);
                chkFirstRowNames.IsChecked = options.FirstRowContainsNames;
            }
            else
            {
                cmbDelimiter.SelectedItem  = FindDelimiter(",");
                chkFirstRowNames.IsChecked = true;
            }

            this.Closed += new EventHandler(CSVImportOptionsWindow_Closed);
        }
예제 #5
0
파일: CSVImporter.cs 프로젝트: kehh/biolink
 protected override void ReadEntryPoint(EntryPoint ep)
 {
     _options = new CSVImporterOptions();
     _options.Filename = ep["Filename"];
     _options.FirstRowContainsNames = Boolean.Parse(ep["FirstRowHeaders", "true"]);
     _options.Delimiter = HttpUtility.HtmlDecode(ep["Delimiter"]);
 }
예제 #6
0
파일: CSVImporter.cs 프로젝트: kehh/biolink
        public override bool GetOptions(System.Windows.Window parentWindow, ImportWizardContext context)
        {
            var frm = new CSVImportOptionsWindow(_options);
            frm.Owner = parentWindow;
            frm.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            if (frm.ShowDialog().GetValueOrDefault(false)) {
                _options = new CSVImporterOptions { Filename = frm.Filename, Delimiter = frm.Delimiter, FirstRowContainsNames = frm.IsFirstRowContainNames, ColumnNames = frm.ColumnNames };
                return true;
            }

            return false;
        }