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(); } } }