ZForge.Controls.TreeViewAdv.Tree.TreeViewAdv.Dist C# (CSharp) Method

Dist() static private method

static private Dist ( Point p1, Point p2 ) : double
p1 Point
p2 Point
return double
        internal static double Dist(Point p1, Point p2)
        {
            return Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2));
        }

Usage Example

Beispiel #1
0
 public override bool MouseMove(MouseEventArgs args)
 {
     if (TreeViewAdv.Dist(_location, args.Location) > TreeViewAdv.ItemDragSensivity &&
         Tree.AllowColumnReorder)
     {
         Tree.Input = new ReorderColumnState(Tree, Column, args.Location);
         Tree.UpdateView();
     }
     return(true);
 }
TreeViewAdv