private void SetMetadataProvider() { IMetadataProvider provider; if (ServerList != null && ConnectionInfo != null && ServerList.TryGetProvider(ConnectionInfo, out provider)) { sciTextEditorControl1.SetMetadata(provider); } }
private void ServerListOnConnectionAdded(object sender, ConnectionsEventArgs e) { ConnectionInfo addedConnection = e.Connection; connectionsDataSource.Add(addedConnection); serverList.TryGetProvider(addedConnection, out IMetadataProvider provider); filesDock.AddServer(provider, addedConnection); SelectedConnection = addedConnection; if (connectionsDataSource.Count == 1) { filesDock.ReplaceConnection(null, addedConnection); } }