private void MoveToTop(Server server) { ServerRef serverRef = AddReference(server); if (serverRef.Index > 0) { ServerTree.Instance.Operation(OperationBehavior.RestoreSelected, delegate { base.Nodes.Remove(serverRef); base.Nodes.Insert(0, serverRef); }); ServerTree.Instance.OnGroupChanged(Instance, ChangeType.InvalidateUI); } }
public void DoConnectAs() { RdcTreeNode rdcTreeNode = this; ServerRef serverRef = rdcTreeNode as ServerRef; if (serverRef != null) { rdcTreeNode = serverRef.ServerNode; } using (ConnectAsDialog connectAsDialog = ConnectAsDialog.NewConnectAsDialog(rdcTreeNode, Program.TheForm)) { if (connectAsDialog.ShowDialog() == DialogResult.OK) { connectAsDialog.UpdateSettings(); ConnectAs(connectAsDialog.LogonCredentials, connectAsDialog.ConnectionSettings); } } }
bool IBuiltInVirtualGroup.ShouldWriteNode(ServerRef serverRef, FileGroup file) { return(ShouldWriteNode(serverRef, file)); }