protected override void OnConnectionRenamed(object sender, ConnectionRenameEventArgs e) { int idx = GetConnectionIndex(e.OldName); if (idx >= 0) { grdConnections.Rows[idx].Cells[0].Value = e.NewName; UpdateConnectionReferences(e.OldName, e.NewName); } }
void OnConnectionRenamed(object sender, ConnectionRenameEventArgs e) { TreeNode node = _explorer.GetRootNode(RootNodeName).Nodes[e.OldName]; node.Name = node.Text = e.NewName; }
protected virtual void OnConnectionRenamed(object sender, ConnectionRenameEventArgs e) { }
void OnConnectionRenamed(object sender, ConnectionRenameEventArgs e) { _taskMgr.UpdateConnectionReferences(e.OldName, e.NewName); }
protected override void OnConnectionRenamed(object sender, ConnectionRenameEventArgs e) { var left = (BindingList <string>)cmbLeftConnection.DataSource; var right = (BindingList <string>)cmbRightConnection.DataSource; var target = (BindingList <string>)cmbTargetConnection.DataSource; var idx = left.IndexOf(e.OldName); if (idx >= 0) { left[idx] = e.NewName; } idx = right.IndexOf(e.OldName); if (idx >= 0) { right[idx] = e.NewName; } idx = target.IndexOf(e.OldName); if (idx >= 0) { target[idx] = e.NewName; } /* * string selLeft = this.SelectedLeftConnection; * string selRight = this.SelectedRightConnection; * string selTarget = this.SelectedTargetConnection; * * //Fix the selected values if they are affected * if (selLeft.Equals(e.OldName)) * { * selLeft = e.NewName; * } * if (selRight.Equals(e.OldName)) * { * selRight = e.NewName; * } * if (selTarget.Equals(e.OldName)) * { * selTarget = e.NewName; * } * * //Fix the list, any list that is fixed needs to have * //their current value re-set * if (left.Contains(e.OldName)) * { * left.Remove(e.OldName); * left.Add(e.NewName); * * this.LeftConnections = left; * this.SelectedLeftConnection = selLeft; * } * if (right.Contains(e.OldName)) * { * right.Remove(e.OldName); * right.Add(e.NewName); * * this.RightConnections = right; * this.SelectedRightConnection = selRight; * } * if (target.Contains(e.OldName)) * { * target.Remove(e.OldName); * target.Add(e.NewName); * * this.TargetConnections = target; * this.SelectedTargetConnection = selTarget; * }*/ }