private AttributeMapping CreateAttributeMappingWindow(DbMetadataTable selectedTable) { AttributeMapping attributeMapping = new AttributeMapping(this.configuration, this.dataObject, selectedTable); attributeMapping.SourceTargetMapping.MappingRowAdded += SourceTargetMapping_MappingRowAdded; attributeMapping.SourceTargetMapping.MappingRowDeleted += SourceTargetMapping_MappingRowDeleted; return(attributeMapping); }
public AttributeMapping(WriteToMySQLConfiguration configuration, IDatastore dataObject, DbMetadataTable selectedTable) { this.dataObject = dataObject; this.selectedTable = selectedTable; InitializeComponent(); InitializeMappingControl(configuration.Mapping); }
private void ddTargetTables_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (ddTargetTables.SelectedItem == null) { return; } DbMetadataTable selectedTable = ((ComboBoxItem)ddTargetTables.SelectedItem).Tag as DbMetadataTable; this.configuration.TargetTable = selectedTable.TableName; attributeMapping = CreateAttributeMappingWindow(selectedTable); existingCheck = CreateExistingCheckWindow(); relationMapping = CreateRelationmappingWindow(); ConfigurationContent.Content = new ConfigurationContent(attributeMapping, existingCheck, relationMapping); }