/// <summary> /// Create new instance of <see cref="FormatOptionsPage"/> /// </summary> /// <param name="context">Context</param> public FormatOptionsPage(WizardContext context) { _settings = (CsvImportSettings)context.Settings; _importer = context.Importer; InitializeComponent(); }
/// <summary> /// Create new instance of <see cref="FormatOptionsPage"/> /// </summary> /// <param name="context">Context</param> public FormatOptionsPage(WizardContext context) { _settings = (ExcelImportSettings)context.Settings; _importer = context.Importer; InitializeComponent(); cmbExcelSheet.SelectedValueChanged += CmbFileTypeOnSelectedValueChanged; }
public FormatOptionsPage(WizardContext context) { _settings = (TxtImportSettings)context.Settings; _importer = context.Importer; InitializeComponent(); // FileType combo box cmbFileType.DataSource = Enum.GetValues(typeof(TxtFileType)); cmbFileType.Format += delegate(object s, ListControlConvertEventArgs args) { args.Value = ((TxtFileType)args.ListItem).Description(); }; cmbFileType.SelectedValueChanged += CmbFileTypeOnSelectedValueChanged; cmbFileType.DataBindings.Clear(); cmbFileType.DataBindings.Add("SelectedItem", _settings, "FileType", true, DataSourceUpdateMode.OnPropertyChanged); // Delimiter _settings.Delimiter = delimiterSelector.CurrentDelimiter; delimiterSelector.CurrentDelimiterChanged += DelimiterSelectorOnCurrentDelimiterChanged; // CmbFileTypeOnSelectedValueChanged(cmbFileType, EventArgs.Empty); }