Exemplo n.º 1
0
        /// <summary>
        /// MouseMove handler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TreeMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            TreeNode testitem = this.treeView.GetNodeAt(e.X, e.Y);

            if (testitem != null)
            {
                try
                {
                    GraphTreeNode item = testitem as GraphTreeNode;
                    if (item != null)
                    {
                        this.ShowDescription(this, new InfoEventArgs(item.Summary.Description));
                    }
                }
                catch (Exception exc)
                {
                    Trace.WriteLine(exc.Message, "GraphShapesView.TreeMouseMove");
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// MouseDown handler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TreeMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            TreeNode testitem = this.treeView.GetNodeAt(e.X, e.Y);

            if (testitem != null)
            {
                try
                {
                    GraphTreeNode item = testitem as GraphTreeNode;
                    if (item != null)
                    {
                        this.DoDragDrop(item.Summary, DragDropEffects.Copy);
                    }
                }
                catch (Exception exc)
                {
                    Trace.WriteLine(exc.Message, "GraphShapesView.TreeMouseDown");
                }
            }
            //this.Invalidate();
        }