コード例 #1
0
        /// <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();
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        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);
        }