public MainForm(IDataPump dataPump, IDataStoreAdapter dataStoreAdapter) { this.dataPump = dataPump; this.dataStoreAdapter = dataStoreAdapter; InitializeComponent(); spaltenDefinitionen = new[] { new SpaltenDefinition { Bezeichnung = "Random int", ControlType = typeof(MinimumMaximum), Columndefinition = (columnName, control) => new ColumnDefinition(columnName, new RandomIntGenerator( int.Parse(((MinimumMaximum)control).Minimum), int.Parse(((MinimumMaximum)control).Maximum))) }, new SpaltenDefinition { Bezeichnung = "Random DateTime", ControlType = typeof(MinimumMaximum), Columndefinition = (columnName, control) => new ColumnDefinition(columnName, new RandomDateTimeGenerator( DateTime.Parse(((MinimumMaximum)control).Minimum), DateTime.Parse(((MinimumMaximum)control).Maximum))) }, new SpaltenDefinition { Bezeichnung = "List of strings", ControlType = typeof(TextBox), Columndefinition = (columnName, control) => new ColumnDefinition(columnName, new RollingSelectedStringsGenerator(((TextBox)control).Text.ToValues().ToArray())) } }; var panel = CreatePanelForColumnDefinition(); panelForColumnDefs.Controls.Add(panel); btnGenerate.Click += ProcessGenerate; }
private void dataPumpToolStripMenuItem_Click(object sender, EventArgs e) { string dlPath = Path.Combine( Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath), "DataPumpDownload"); DirectoryUtils.ClearDir(dlPath, true); IDataPumpProvider dataPumpProvider = DataProvidersFactory.GetDataPumpProvider(); IDataPump dataPump = DataPumpFactory.Get(DataPumpType.Bossa, dataPumpProvider, dlPath); DataPumper dataPumper = new DataPumper(dataPumpProvider, dataPump); FormDataPump frm = new FormDataPump(dataPumper); frm.Execute(); }
public DataPumper(IDataPumpProvider dataPumpProvider, IDataPump dataPump) { _dataPumpProvider = dataPumpProvider; _dataPump = dataPump; }