You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace GeoSigmaViewer
|
|
{
|
|
class DrawToolText : DrawTool
|
|
{
|
|
private DrawTextDialog dlg;
|
|
public DrawToolText()
|
|
{
|
|
ToolCursor = DrawCursors.Select;
|
|
ItemType = DrawItemType.ITEM_TEXT;
|
|
}
|
|
public override void Start()
|
|
{
|
|
if (dlg != null)
|
|
{
|
|
if (dlg.IsAccessible)
|
|
dlg.Close();
|
|
dlg = null;
|
|
}
|
|
|
|
dlg = new DrawTextDialog(ref drawer);
|
|
dlg.Show();
|
|
}
|
|
public override void End()
|
|
{
|
|
if (dlg != null)
|
|
{
|
|
if (dlg.IsAccessible)
|
|
dlg.Close();
|
|
|
|
dlg = null;
|
|
}
|
|
}
|
|
public override void OnLButtonDown(Drawer drawArea, MouseEventArgs e)
|
|
{
|
|
drawArea.Geo.OnLButtonDown(e.X, e.Y);
|
|
drawArea.Geo.EnableRedraw(true);
|
|
drawArea.ReDraw();
|
|
}
|
|
}
|
|
}
|