ToolAutoRuler.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using PaintDotNet.Annotation.Enum;
  2. using System;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace PaintDotNet.Annotation.Label
  6. {
  7. /// <summary>
  8. /// 标注->自动标尺
  9. /// </summary>
  10. public class ToolAutoRuler : ToolObject
  11. {
  12. public static void OnMouseDown(ISurfaceBox drawArea, MouseEventArgs e)
  13. {
  14. //if (drawArea.GetGainMultiple() == 0)
  15. //{
  16. // MessageBox.Show("请先设置放大倍数");
  17. // return;
  18. //}
  19. //else
  20. //{
  21. DrawAutoRuler newAutoRuler = new DrawAutoRuler(drawArea);
  22. newAutoRuler.ISurfaceBox = drawArea;
  23. AddNewObject(drawArea, newAutoRuler);
  24. OnMouseUpTwo(drawArea, e);
  25. drawArea.Refresh();
  26. //}
  27. }
  28. public static void OnMouseMove(ISurfaceBox drawArea, MouseEventArgs e)
  29. {
  30. }
  31. public static void OnMouseUp(ISurfaceBox drawArea, MouseEventArgs e)
  32. {
  33. }
  34. public static void OnMouseClick(ISurfaceBox drawArea, MouseEventArgs e)
  35. {
  36. }
  37. public static void beginWithNewObject()
  38. {
  39. }
  40. }
  41. }