public void Initialize(RepositoryJsonDataSource dataSourceRepository) { this.DataSourceRepository = dataSourceRepository; bool createdNewFile = this.dataSnapshotSerializer.Initialize(this.DataSourceRepository.RootPath, "Sq1.Widgets.CsvImporter.CsvImporterDataSnapshot.json", "Workspaces", Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName, true, true); //this.dataSnapshot = new CsvImporterDataSnapshot(); this.dataSnapshot = this.dataSnapshotSerializer.Deserialize(); foreach (var each in this.dataSnapshot.FieldSetupCurrent) { each.DataSnapshot = this.dataSnapshot; } this.mniltbCsvSeparator.InputFieldValue = this.dataSnapshot.CsvConfiguration.Delimiter; this.importSourceFileBrowser1.PopulateListFromCsvPath(this.dataSnapshot.PathCsv); if (this.dataSnapshot.FileSelected != null) { this.stepsAllparseFromDataSnapshot(); this.importSourceFileBrowser1.SelectFile(this.dataSnapshot.FileSelected); } this.dataSourcesTree1.Initialize(this.DataSourceRepository, Assembler.InstanceInitialized.StatusReporter); this.dataSourcesTree1.TreeFirstColumnNameText = "Import To (Symbol / DataSource):"; }
// JSON throws if default ctor is missing // NOPE_DEFAULT_FOR_FieldSetup:FieldSetup_WAS_NEEDED public ColumnCatcher() {} public ColumnCatcher(int i, CsvImporterDataSnapshot dataSnapshot) : this() { this.ColumnSerno = i; this.DataSnapshot = dataSnapshot; }