Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
                }
            }
        }
Exemplo n.º 3
0
 bool IBuiltInVirtualGroup.ShouldWriteNode(ServerRef serverRef, FileGroup file)
 {
     return(ShouldWriteNode(serverRef, file));
 }