Last change
on this file since 771 was
725,
checked in by bspisic, 16 years ago
|
#319
MouseEventListener implemented
dragDrop MouseEventListener example implemented
|
File size:
743 bytes
|
Line | |
---|
1 | using System.Drawing;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Visualization {
|
---|
4 | public class MouseEventListener {
|
---|
5 | public event MouseEventListenerHandler OnMouseMove;
|
---|
6 | public event MouseEventListenerHandler OnMouseUp;
|
---|
7 |
|
---|
8 | private Point startPoint;
|
---|
9 |
|
---|
10 | public void MouseMove(Point actualPoint) {
|
---|
11 | if (OnMouseMove != null) {
|
---|
12 | OnMouseMove(startPoint, actualPoint);
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | public void MouseUp(Point actualPoint) {
|
---|
17 | if (OnMouseUp != null) {
|
---|
18 | OnMouseUp(startPoint, actualPoint);
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
22 | public Point StartPoint {
|
---|
23 | get { return startPoint; }
|
---|
24 | set { startPoint = value; }
|
---|
25 | }
|
---|
26 | }
|
---|
27 |
|
---|
28 | public delegate void MouseEventListenerHandler(Point startPoint, Point actualPoint);
|
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.