public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (context != null && context.Instance != null && provider != null)
     {
         IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (service != null)
         {
             GoogleMapsMarkerCollection mc = context.Instance as GoogleMapsMarkerCollection;
             if (mc != null)
             {
                 mc.Add(new GoogleMapsMarker(mc.Owner));
                 value = null;
             }
             else
             {
                 HtmlGoogleMap map = context.Instance as HtmlGoogleMap;
                 if (map != null)
                 {
                     map.GoogleMapsMarkers.Add(new GoogleMapsMarker(map));
                 }
             }
         }
     }
     return(value);
 }
 public void LoadData(HtmlGoogleMap gmap)
 {
     _gmap = gmap;
     foreach (GoogleMapsMarker mm in _gmap.GoogleMapsMarkers)
     {
         listBox1.Items.Add(mm);
     }
 }
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (context != null && context.Instance != null && provider != null)
     {
         IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (service != null)
         {
             HtmlGoogleMap map = context.Instance as HtmlGoogleMap;
             if (map != null)
             {
                 DialogMapMarkers dlg = new DialogMapMarkers();
                 dlg.LoadData(map);
                 if (service.ShowDialog(dlg) == DialogResult.OK)
                 {
                     value = dlg.Result;
                 }
             }
         }
     }
     return(value);
 }
 public GoogleMapsMarker(HtmlGoogleMap owner)
 {
     _owner     = owner;
     Location   = new GoogleMapsLatLng();
     markerSize = Size.Empty;
 }
 public GoogleMapsMarkerCollection(HtmlGoogleMap owner)
 {
     _owner = owner;
 }