ViewManagerOnViewDefaultMouseDownEvent Event |
Namespace: VIZCore3D.NET.Manager
public event ViewDefaultMouseDownEventHandler OnViewDefaultMouseDownEvent
// VIZCore3D.NET Control private VIZCore3D.NET.VIZCore3DControl vizcore3d; public void Example() { vizcore3d.View.OnViewDefaultMouseDownEvent += View_OnViewDefaultMouseDownEvent; vizcore3d.View.OnViewDefaultMouseMoveEvent += View_OnViewDefaultMouseMoveEvent; vizcore3d.View.OnViewDefaultMouseUpEvent += View_OnViewDefaultMouseUpEvent; vizcore3d.View.OnViewDefaultMouseDoubleClickEvent += View_OnViewDefaultMouseDoubleClickEvent; vizcore3d.View.OnViewDefaultMouseWheelEvent += View_OnViewDefaultMouseWheelEvent; } private void View_OnViewDefaultMouseDownEvent(object sender, MouseEventArgs e) { int index = vizcore3d.View.HitTest(e.Location.X, e.Location.Y); if (index == -1) return; VIZCore3D.NET.Data.Node node = vizcore3d.Object3D.FromIndex(index); } private void View_OnViewDefaultMouseMoveEvent(object sender, MouseEventArgs e) { } private void View_OnViewDefaultMouseUpEvent(object sender, MouseEventArgs e) { int index = vizcore3d.View.HitTest(e.Location.X, e.Location.Y); if (index == -1) return; VIZCore3D.NET.Data.Node node = vizcore3d.Object3D.FromIndex(index); } private void View_OnViewDefaultMouseDoubleClickEvent(object sender, MouseEventArgs e) { int index = vizcore3d.View.HitTest(e.Location.X, e.Location.Y); if (index == -1) return; VIZCore3D.NET.Data.Node node = vizcore3d.Object3D.FromIndex(index); } private void View_OnViewDefaultMouseWheelEvent(object sender, MouseEventArgs e) { if(e.Delta > 0) { // Some Code Here... } else { // Some Code Here... } }