MouseEventArgs.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Permission is hereby granted, free of charge, to any person obtaining
  2. // a copy of this software and associated documentation files (the
  3. // "Software"), to deal in the Software without restriction, including
  4. // without limitation the rights to use, copy, modify, merge, publish,
  5. // distribute, sublicense, and/or sell copies of the Software, and to
  6. // permit persons to whom the Software is furnished to do so, subject to
  7. // the following conditions:
  8. //
  9. // The above copyright notice and this permission notice shall be
  10. // included in all copies or substantial portions of the Software.
  11. //
  12. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  13. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  15. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  16. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  17. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  18. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  19. //
  20. // Copyright (c) 2004-2005 Novell, Inc.
  21. //
  22. // Authors:
  23. // Peter Bartok [email protected]
  24. //
  25. // COMPLETE
  26. using System.Runtime.InteropServices;
  27. namespace System.Windows.Forms {
  28. [ComVisible(true)]
  29. public class MouseEventArgs : EventArgs {
  30. private MouseButtons buttons;
  31. private int clicks;
  32. private int delta;
  33. private int x;
  34. private int y;
  35. #region Public Constructors
  36. public MouseEventArgs(MouseButtons buttons, int clicks, int x, int y, int delta) {
  37. this.buttons=buttons;
  38. this.clicks=clicks;
  39. this.delta=delta;
  40. this.x=x;
  41. this.y=y;
  42. }
  43. #endregion // Public Constructors
  44. #region Public Instance Properties
  45. public MouseButtons Button {
  46. get {
  47. return this.buttons;
  48. }
  49. }
  50. public int Clicks {
  51. get {
  52. return this.clicks;
  53. }
  54. }
  55. public int Delta {
  56. get {
  57. return this.delta;
  58. }
  59. }
  60. public int X {
  61. get {
  62. return this.x;
  63. }
  64. }
  65. public int Y {
  66. get {
  67. return this.y;
  68. }
  69. }
  70. #endregion // Public Instance Properties
  71. }
  72. }