Exemplo n.º 1
0
        private void StartConnectionByDoubleClick(TreeView treeView, EventArgs e)
        {
            Point    doubleClickLocation = ((MouseEventArgs)e).Location;
            TreeNode doubleClickedNode   = treeView.GetNodeAt(doubleClickLocation);

            if (doubleClickedNode == treeView.SelectedNode)
            {
                this.StartConnection(treeView);
            }
        }
Exemplo n.º 2
0
        private void StartConnection(TreeView tv)
        {
            // dont connect in rename in favorites tree
            var favoriteNode = tv.SelectedNode as FavoriteTreeNode;

            if (favoriteNode != null && !tv.SelectedNode.IsEditing)
            {
                var definition = new ConnectionDefinition(favoriteNode.Favorite);
                this.ConnectionsUiFactory.ConnectAsync(definition);
                tv.Parent.Focus();
            }
        }
Exemplo n.º 3
0
 private void StartConnectionByDoubleClick(TreeView treeView, EventArgs e)
 {
     Point doubleClickLocation = ((MouseEventArgs)e).Location;
     TreeNode doubleClickedNode = treeView.GetNodeAt(doubleClickLocation);
     if (doubleClickedNode == treeView.SelectedNode)
         this.StartConnection(treeView);
 }
Exemplo n.º 4
0
 private void StartConnection(TreeView tv)
 {
     // dont connect in rename in favorites tree
     var favoriteNode = tv.SelectedNode as FavoriteTreeNode;
     if (favoriteNode != null && !tv.SelectedNode.IsEditing)
     {
         var definition = new ConnectionDefinition(favoriteNode.Favorite);
         this.ConnectionsUiFactory.Connect(definition);
     }
 }