Example #1
0
        private MapWinGIS.Interfaces.SelectionOperation m_SelectionOperation; //选择shape模式

        public View()
        {
            m_selection          = null;
            m_SelectColor        = System.Drawing.Color.Yellow.ToArgb();
            m_Selectmethod       = SelectMode.INTERSECTION;
            m_SelectionOperation = MapWinGIS.Interfaces.SelectionOperation.SelectInvert;
        }
        /// <summary>
        /// Creates a new instance of the selection object tuned to a specific map
        /// </summary>
        /// <param name="Map"></param>
        public Selection(AxMapWinGIS.AxMap Map)
        {
            m_Map = Map;

            // Appearance
            m_SelectionColor         = System.Drawing.Color.Cyan;
            m_SelectionLineThickness = 3;
            m_ShowSelection          = true;
            m_SelectionMode          = MapWinGIS.SelectMode.INTERSECTION;
            // No current layer assumes that we should select shapes from all layers
            m_CurrentLayer        = -1;
            m_Map.MouseDownEvent += new AxMapWinGIS._DMapEvents_MouseDownEventHandler(m_Map_MouseDownEvent);
            m_Map.MouseUpEvent   += new AxMapWinGIS._DMapEvents_MouseUpEventHandler(m_Map_MouseUpEvent);
            m_Map.SelectBoxFinal += new AxMapWinGIS._DMapEvents_SelectBoxFinalEventHandler(m_Map_SelectBoxFinal);
        }