ToolNumberMark.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using PaintDotNet.Annotation.Enum;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7. namespace PaintDotNet.Annotation.Label
  8. {
  9. /// <summary>
  10. /// 标注->标记->数字标记
  11. /// </summary>
  12. public class ToolNumberMark : ToolObject
  13. {
  14. public static void OnMouseDown(ISurfaceBox drawArea, MouseEventArgs e)
  15. {
  16. if (e.Button == MouseButtons.Left)
  17. {
  18. Point pointscroll = GetEventPointInArea(drawArea, e.Location);
  19. DrawNumberMark numberMark = new DrawNumberMark(drawArea, pointscroll.X, pointscroll.Y);
  20. numberMark.canSetNum = true;
  21. numberMark.ISurfaceBox = drawArea;
  22. AddNewObject(drawArea, numberMark);
  23. }
  24. else
  25. {
  26. OnMouseNotLeftDown(drawArea, null);
  27. drawArea.ActiveTool = DrawToolType.Pointer;
  28. //OnMouseUpTwo(drawArea, e);
  29. }
  30. }
  31. public static void OnMouseMove(ISurfaceBox drawArea, MouseEventArgs e)
  32. {
  33. }
  34. public static void OnMouseUp(ISurfaceBox drawArea, MouseEventArgs e)
  35. {
  36. OnMouseUpTwo(drawArea, e);
  37. }
  38. public static void OnMouseClick(ISurfaceBox surfacebox, MouseEventArgs e)
  39. {
  40. }
  41. /// <summary>
  42. /// 鼠标左键双击
  43. /// </summary>
  44. /// <param name="drawArea"></param>
  45. /// <param name="e"></param>
  46. public static void OnMouseLeftDoubleClick(ISurfaceBox surfacebox, MouseEventArgs e)
  47. {
  48. }
  49. /// <summary>
  50. /// 删除按键
  51. /// </summary>
  52. /// <param name="surfacebox"></param>
  53. /// <param name="e"></param>
  54. public static void OnDelKeyDown(ISurfaceBox surfacebox, MouseEventArgs e)
  55. {
  56. }
  57. /// <summary>
  58. /// 删除划痕处理&污迹处理选择区域的痕迹
  59. /// </summary>
  60. /// <param name="surfacebox"></param>
  61. /// <param name="e"></param>
  62. public static void OnDel2KeyDown(ISurfaceBox surfacebox, MouseEventArgs e)
  63. {
  64. }
  65. public static void beginWithNewObject()
  66. {
  67. }
  68. }
  69. }