private void AddDataSource(IDataSource dataSource, BindableTreeNode connectionNode, int dataSourceIndex) { IConnection connection = (IConnection)connectionNode.DataSource; connection.DataSources.Insert(dataSourceIndex, dataSource); if (!connectionNode.IsExpanded) { connectionNode.Expand(); } dataSourceTreeView.SelectedNode = dataSourceTreeView.Find(dataSource.ID); }
private void AddOperation(IOperation operation, BindableTreeNode batchNode, int operationIndex) { Batch batch = (Batch)batchNode.DataSource; batch.Operations.Insert(operationIndex, operation); if (!batchNode.IsExpanded) { batchNode.Expand(); } batchTreeView.SelectedNode = batchTreeView.Find(operation.ID); //OnItemChanged(new ItemEventArgs(batch)); }