예제 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GlobalFunctions(MapWindow.Interfaces.IMapWin mw, System.Windows.Forms.Form ParentForm)
 {
     m_MapWin                 = mw;
     m_MapWindowForm          = ParentForm;
     m_events                 = new MapWindow.Events();
     m_CurrentMode            = Modes.None;
     SnapTolerancePixelRadius = 4;
     m_LayerSize              = 0;
 }
예제 #2
0
        public RemoveVertex(GlobalFunctions globals)
        {
            try
            {
                m_Events  = globals.Events;
                m_globals = globals;
                m_hDraw   = -1;

                //get the add vertex cursor
                m_cursor = new Cursor(this.GetType(), "RemovePoint.cur");

                //register delegates with event handler
                m_Events.AddHandler(new MapWindow.Events.MapMouseDownEvent(MapMouseDown));
                m_Events.AddHandler(new MapWindow.Events.MapMouseMoveEvent(MapMouseMove));
                m_Events.AddHandler(new MapWindow.Events.ItemClickedEvent(ItemClicked));
            }
            catch (System.Exception ex)
            {
                m_MapWin.ShowErrorDialog(ex);
            }
        }