Пример #1
0
 private void update(CCTVCanvas cctv)
 {
     this.Dispatcher.BeginInvoke((Action) delegate()
     {
         if (_locator.InScreenAtCircle(cctv.Video.PanTiltUnit.Longitude, cctv.Video.PanTiltUnit.Latitude, CCTVCanvas.maxrange))
         {
             cctv.OnMapRefreshed();
             cctv.Visibility = System.Windows.Visibility.Visible;
         }
         else
         {
             cctv.Visibility = System.Windows.Visibility.Collapsed;
         }
     });
 }
Пример #2
0
 public CCTVsCanvas(LocatorAndBorder locator, VideoParser.Video[] video, Dictionary <ulong, VideoParser.Camera> videoRealtime)
 {
     _locator             = locator;
     cctvs                = new CCTVCanvas[video.Length];
     _statusBarInfomation = StatusBarBaseInfomation.Instance;
     lock (videoRealtime)
     {
         for (int i = 0; i < cctvs.Length; i++)
         {
             VideoParser.Camera camera = null;
             if (videoRealtime.ContainsKey(video[i].Id))
             {
                 camera = videoRealtime[video[i].Id];
             }
             cctvs[i] = new CCTVCanvas(video[i], camera, _locator);
             this.Children.Add(cctvs[i]);
             update(cctvs[i]);
         }
     }
 }