public LocationSource(String name, Discriminator discrimintor) { this.Id = System.Guid.NewGuid(); this.Name = name; this.Discri = discrimintor; this.mapMarker = new LocationSourceMapMarker(this); }
public override bool IsSimilar(Discriminator other) { if (other is ColorDiscriminator) { ColorDiscriminator otherColorDiscriminator = (ColorDiscriminator)other; int diff = otherColorDiscriminator.color.Hue - this.color.Hue; if (diff < 0) diff = -diff; if (diff < this.threshold) return true; else return false; } else { return false; } }
override public bool IsSimilar(Discriminator other) { if (other is ColorDiscriminator) { ColorDiscriminator otherColorDiscriminator = (ColorDiscriminator)other; int diff = otherColorDiscriminator.color.Hue - this.color.Hue; if (diff < 0) { diff = -diff; } if (diff < this.threshold) { return(true); } else { return(false); } } else { return(false); } }
public override bool IsSimilar(Discriminator other) { return(false); }
public abstract bool IsSimilar(Discriminator other);
public override bool IsSimilar(Discriminator other) { return false; }
public LocationSource createLocationSource(string name, Discriminator discriminator) { LocationSource user = new LocationSource(name, discriminator); this.LocationSources.Add(user); return user; }
public void updateLocationSource(Discriminator discriminator, IntPoint screenPos) { if (locationSources.Count == 0) return; lock (this.locationSources) { for (int i = 0; i < locationSources.Count; i++) { if (locationSources[i].Discri.IsSimilar(discriminator)) { locationSources[i].ScreenPos = screenPos; locationSources[i].LatLng = MapOverlayForm.Instance.FromLocalToLatLng(screenPos.X, screenPos.Y); } } } }