internal void ConnectionChanged(JoinSourceType type) { if (type != JoinSourceType.Target) { _view.ClearJoins(); } FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: _view.LeftSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Right: _view.RightSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Target: _view.TargetSchemas = service.GetSchemaNames(); SchemaChanged(type); break; } } } }
private void UpdateSourceSchemas() { using (FdoFeatureService svc = CreateSourceService()) { cmbSrcSchema.DataSource = svc.GetSchemaNames(); cmbSrcSchema.SelectedIndex = 0; UpdateSourceClasses(); } }
void CreateSchemaNodes(TreeNode connNode) { Action <TimeSpan> act = (ts) => LoggingService.Info("Connection " + connNode.Name + ": Schema population completed in " + ts.TotalMilliseconds + "ms"); FdoConnection conn = _connMgr.GetConnection(connNode.Name); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { if (service.SupportsPartialSchemaDiscovery()) { using (var measure = new TimeMeasurement(act)) { List <string> schemaNames = service.GetSchemaNames(); //Pre-sort SortedList <string, string> sorted = new SortedList <string, string>(); foreach (string name in schemaNames) { sorted.Add(name, name); } foreach (string name in schemaNames) { TreeNode schemaNode = CreateSchemaNode(name, true); connNode.Nodes.Add(schemaNode); schemaNode.Nodes.Add(ResourceService.GetString("TEXT_LOADING")); } } } else { using (var measure = new TimeMeasurement(act)) { FeatureSchemaCollection schemas = service.DescribeSchema(); //Pre-sort SortedList <string, FeatureSchema> sorted = new SortedList <string, FeatureSchema>(); foreach (FeatureSchema schema in schemas) { sorted.Add(schema.Name, schema); } foreach (FeatureSchema schema in schemas) { TreeNode schemaNode = CreateSchemaNode(schema.Name, false); GetClassNodesFull(schema, schemaNode); connNode.Nodes.Add(schemaNode); schemaNode.Expand(); } } } } } }