protected SchemaDefinition GetSchemaDefinition() { if (NameMap != null) { MappedSchemaDefinition mappedDefinition = new MappedSchemaDefinition(Schema, NameMap); return(mappedDefinition.MapSchemaClassAndPropertyNames()); } else { return(Schema); } }
public void LoadSchemaOnClick(object sender, EventArgs e) { Form.OpenFileDialog.InitialDirectory = this.WorkspaceFolder; Form.OpenFileDialog.Filter = MappedSchemaFileFilter; Form.OpenFileDialog.DefaultExt = MappedSchemaExtension; DialogResult result = Form.OpenFileDialog.ShowDialog(); if (result == DialogResult.OK) { TryOrShowMessage(() => { FileInfo schemaFile = new FileInfo(Form.OpenFileDialog.FileName); MappedSchemaDefinition schema = MappedSchemaDefinition.Load(schemaFile); MappedSchemaDefinition = schema; PopulateTableNameMapList(); Form.TabControlMain.SelectedTab = Form.TabPageSchemaInfo; SetSchemaStatus("Loaded schema: {0}"._Format(schemaFile.FullName)); }); } }