예제 #1
0
        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");
            }
        }
예제 #2
0
        private void HandleLocationChanged(Location location)
        {
            var args = new CoordinatesChangedEventArgs(location, GetSatellitesCount(location));

            if (LocationChanged != null)
            {
                LocationChanged(this, args);
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 private void HandleLocationChanged(Location location)
 {
     var args = new CoordinatesChangedEventArgs(location, GetSatellitesCount(location));
     if (LocationChanged != null)
         LocationChanged(this, args);
 }