예제 #1
0
 private void MapControlOnInfo(object sender, MouseInfoEventArgs mouseInfoEventArgs)
 {
     if (mouseInfoEventArgs.Feature != null)
     {
         FeatureInfo.Text = $"Click Info:{Environment.NewLine}{mouseInfoEventArgs.Feature.ToDisplayText()}";
     }
 }
예제 #2
0
 private static void MapControlOnMouseInfoDown(object sender, MouseInfoEventArgs mouseInfoEventArgs)
 {
     if (mouseInfoEventArgs.Feature != null)
     {
         MessageBox.Show(mouseInfoEventArgs.Feature["Label"].ToString());
     }
 }
예제 #3
0
 private void MapControlOnHoverInfo(object sender, MouseInfoEventArgs e)
 {
     FeatureInfo.Text = e.Leaving ? "" : $"Hover Info:{Environment.NewLine}{e.Feature.ToDisplayText()}";
 }
예제 #4
0
 private void MapControlOnInfo(object sender, MouseInfoEventArgs mouseInfoEventArgs)
 {
     if (mouseInfoEventArgs.Feature != null)
         FeatureInfo.Text = $"Click Info:{Environment.NewLine}{mouseInfoEventArgs.Feature.ToDisplayText()}";
 }
예제 #5
0
 private void MapControlOnHoverInfo(object sender, MouseInfoEventArgs e)
 {
     FeatureInfo.Text = e.Leaving ? "" : $"Hover Info:{Environment.NewLine}{e.Feature.ToDisplayText()}";
 }
예제 #6
0
        private void RaiseHoverInfoEvents(Point mousePosition)
        {
            var hoverInfoEventArgs = GetInfoEventArgs(mousePosition, Map.HoverInfoLayers);

            if (HasChanged(_previousHoverInfoEventArgs, hoverInfoEventArgs))
            {
                if (hoverInfoEventArgs != null) // Don't raise new event when nothing changed.
                    OnMouseHoverInfo(hoverInfoEventArgs);
                else if (_previousHoverInfoEventArgs != null)
                    OnMouseHoverInfoLeave();
            }

            _previousHoverInfoEventArgs = hoverInfoEventArgs;
        }
예제 #7
0
 private void OnMouseInfoUp(MouseInfoEventArgs e)
 {
     Info?.Invoke(this, e);
 }
예제 #8
0
 private void OnMouseHoverInfo(MouseInfoEventArgs e)
 {
     HoverInfo?.Invoke(this, e);
 }
예제 #9
0
 private static bool HasChanged(MouseInfoEventArgs previousInfoEventArgs, MouseInfoEventArgs infoEventArgs)
 {
     if (previousInfoEventArgs == null) return true;
     return previousInfoEventArgs.Feature != infoEventArgs?.Feature;
 }