After Selection raise event

Topics: Feature Requests
May 13, 2012 at 1:16 PM
Edited May 13, 2012 at 1:17 PM

Hello radioman,

is it possible to implement an event for selection ready? So it is possible to get all markers, or select markers, etc.

here some codesnippets:

in GmapControl.cs  

      /// 
      /// Event after Selection ends
      /// 
      public event SelectionReady OnSelectionReady;

      public delegate void SelectionReady();


  protected override void OnMouseUp(MouseEventArgs e)
      {
         base.OnMouseUp(e);

         if(isSelected)
         {
            isSelected = false;

            // Raise Event
            
            if (!selectedArea.IsEmpty)
            {
                OnSelectionReady();
            }



         }
....

 

in Demo

      MainMap.OnSelectionReady += new  SelectionReady(MainMap_OnSelectionReady);


void MainMap_OnSelectionReady()
      {
          MessageBox.Show(MainMap.SelectedArea.Size.ToString());
      }

 

bye EDE

May 13, 2012 at 1:29 PM

void MainMap_MouseUp(object sender, MouseEventArgs e)
{
   if(!SelectedArea.IsEmpty)
   {
   ...

May 13, 2012 at 4:11 PM

ohh no.. thanks :)