public void SetContextMenu(System.Windows.Controls.ContextMenu contextMenu, RadarMuxerTarget target)
        {
            if (target == null)
            {
                return;
            }
            MenuItem menu = new MenuItem()
            {
                Header = target.Name
            };

            if (string.IsNullOrWhiteSpace(target.Name))
            {
                menu.Header = target.GetId();
            }
            int      id   = target.ID;
            MenuItem item = new MenuItem {
                Header = "手动标注", Tag = id
            };

            item.Click += new RoutedEventHandler(manualIdentifyTrack_Click);
            menu.Items.Add(item);
            item = new MenuItem {
                Header = "取消手动标注", Tag = id
            };
            item.Click += new RoutedEventHandler(removeManualIdentify_Click);
            menu.Items.Add(item);
            item = new MenuItem {
                Header = "删除跟踪", Tag = id
            };
            item.Click += new RoutedEventHandler(removeTrack_Click);
            menu.Items.Add(item);
            contextMenu.Items.Add(menu);
        }
 private void _receiver_TargetEvent(SeeCool.GISFramework.Object.RadarMuxTrack data)
 {
     lock (this)
     {
         if (data.Removed)
         {
             _tracksData.Remove(data.ID.ToString());
         }
         else
         {
             RadarMuxerTarget target = new RadarMuxerTarget(data.ID, data.MMSI);
             target.Update(data.Longitude, data.Latitude, data.SOG, data.COG, DateTime.Now);
             target.Name           = data.Name;
             target.OriginalObject = data;
             target.ReceiverTime   = data.DataTime;
             _tracksData.UpdateDynamicEvent(target, data.Identified);
         }
     }
 }