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.

41 lines
1.0 KiB
C#

using System.Windows.Forms;
namespace GeoSigmaViewer
{
public class DrawToolPoint : DrawTool
{
private PointAddDialog paDlg = null;
public DrawToolPoint()
{
ToolCursor = DrawCursors.Select;
ItemType = DrawItemType.ITEM_POINT;
}
public override void Start()
{
if (paDlg != null)
{
if (paDlg.IsAccessible)
paDlg.Close();
paDlg = null;
}
paDlg = new PointAddDialog(ref drawer);
paDlg.Show();
}
public override void End()
{
if (paDlg != null)
{
if (paDlg.IsAccessible)
paDlg.Close();
paDlg = null;
}
}
public override void OnLButtonDown(Drawer drawArea, MouseEventArgs e)
{
drawArea.Geo.OnLButtonDown(e.X, e.Y);
drawArea.Geo.EnableRedraw(true);
drawArea.ReDraw();
}
}
}