Exemple #1
0
        // #todo: this should be bound to a UI event. (when the map actually design the route.)
        private void OnFlightRouteReady(object sender, FlightRouteDrawEventArgs args)
        {
            FlightRouteControlTextBlock textBlock = new FlightRouteControlTextBlock();

            textBlock.FlightRouteName.Text       = args.FlightRouteData.FlightPlanName;
            textBlock.FlightRouteName.Foreground = new SolidColorBrush(args.RouteColor);
            FlightRoutePanelContainer.Children.Add(textBlock);
        }
Exemple #2
0
 private void OnFlightRouteDelete(object sender, FlightRouteEventArgs args)
 {
     foreach (UIElement uiElement in FlightRoutePanelContainer.Children)
     {
         FlightRouteControlTextBlock uiTextBlock = uiElement as FlightRouteControlTextBlock;
         if (uiTextBlock != null && uiTextBlock.FlightRouteName.Text.Equals(args.FlightPlanName))
         {
             FlightRoutePanelContainer.Children.Remove(uiTextBlock);
             break;
         }
     }
 }