public void DragAndDrop(int sourceX, int sourceY, int destinationX, int destinationY) { MouseControl.SetPosition(sourceX, sourceY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonDown, sourceX, sourceY, 0, 0); MouseControl.SetPosition(destinationX, destinationY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonUp, destinationX, destinationY, 0, 0); }
public void DragAndDrop(Func <IElement> source, Func <IElement> target) { var sourceEl = source() as Element; var targetEl = target() as Element; MouseControl.SetPosition(sourceEl.PosX, sourceEl.PosY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonDown, sourceEl.PosX, sourceEl.PosY, 0, 0); MouseControl.SetPosition(targetEl.PosX, targetEl.PosY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonUp, targetEl.PosX, targetEl.PosY, 0, 0); }
public void DragAndDrop(ElementProxy source, ElementProxy target) { var sourceEl = source.Element as Element; var targetEl = target.Element as Element; MouseControl.SetPosition(sourceEl.PosX, sourceEl.PosY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonDown, sourceEl.PosX, sourceEl.PosY, 0, 0); MouseControl.SetPosition(targetEl.PosX, targetEl.PosY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonUp, targetEl.PosX, targetEl.PosY, 0, 0); }
public void DragAndDrop(Func <IElement> source, int sourceOffsetX, int sourceOffsetY, Func <IElement> target, int targetOffsetX, int targetOffsetY) { var sourceEl = source() as Element; var targetEl = target() as Element; var sourceX = sourceEl.PosX + sourceOffsetX; var sourceY = sourceEl.PosY + sourceOffsetY; var targetX = targetEl.PosX + targetOffsetX; var targetY = targetEl.PosY + targetOffsetY; MouseControl.SetPosition(sourceX, sourceY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonDown, sourceX, sourceY, 0, 0); MouseControl.SetPosition(targetX, targetY); MouseControl.MouseEvent(MouseControl.MouseEvent_LeftButtonUp, targetX, targetY, 0, 0); }