public void OnMouseMove(object sender, MouseEventArgs e) { string lbl = e.X.ToString() + "," + e.Y.ToString(); if (CoordinatesChangedEvent != null) { CoordinatesChangedEventArgs args = new CoordinatesChangedEventArgs(); args.Location = e.Location; args.Text = lbl; args.MaxValue = backgroundControl.Size; CoordinatesChangedEvent(args); lbl = args.Text; } lblCoordinats.Text = lbl; this.Location = this.Parent.PointToClient(Control.MousePosition); if (!lblCoordinats.Visible) { lblCoordinats.Visible = true; //lblCoordinats.BringToFront(); System.Diagnostics.Debug.WriteLine("Pos " + lblCoordinats.Text + " made visible"); //lblCoordinats.Show(); } else { System.Diagnostics.Debug.WriteLine("Pos " + lblCoordinats.Text + " already visible"); } }
private void HandleLocationChanged(Location location) { var args = new CoordinatesChangedEventArgs(location, GetSatellitesCount(location)); if (LocationChanged != null) { LocationChanged(this, args); } }
public void OnLocationChanged(Location location) { Availability availability; if (!_providerAvailabilities.TryGetValue(location.Provider, out availability)) { availability = Availability.Available; } if (availability == Availability.Available) { var args = new CoordinatesChangedEventArgs(location, GetSatellitesCount(location)); LocationChanged(this, args); } }
private void HandleLocationChanged(Location location) { var args = new CoordinatesChangedEventArgs(location, GetSatellitesCount(location)); if (LocationChanged != null) LocationChanged(this, args); }