Ejemplo n.º 1
0
        private void captureImagesClick(object sender, RoutedEventArgs e)//视频管理->图片抓取
        {
            CaptureImages w = new CaptureImages();

            System.Windows.Application.Current.MainWindow = w;
            w.ShowDialog();
        }
 public AutomaticLinkage()
 {
     InitializeComponent();
     this.Closing         += closeSoftware;
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     startPlay();
     linkageStar   = GetTimeStamp();
     pic_Full_path = "";
     boat_Name     = "";
     capTime       = CaptureImages.GetTime(GetTimeStamp().ToString());
 }
        private void captureClick(object sender, RoutedEventArgs e)
        {
            MonitoringX.captureImages();                    //截取长焦视频,保留到指定路径
            MonitoringX.eventCaputureTime = GetTimeStamp(); //获取截图时间
            //   CaptureImages._mmsi = MonitoringX.linkageTarget.TargetMMSI; 该为由link_auto直接控制


            CaptureImages w = new CaptureImages();//打开新窗口,展示图片

            w.Closed += CaptureClosed;
            System.Windows.Application.Current.MainWindow = w;
            // this.Visibility = Visibility.Collapsed;//隐藏当前窗口
            w.Topmost = true;
            Thread.Sleep(1000 * 1);
            w.ShowDialog();
        }
        private void closeWindowClick(object sender, RoutedEventArgs e)
        {
            int linkageEnd                  = GetTimeStamp();
            SeleCaptureManager capture      = new SeleCaptureManager();
            Capture            captureEvent = new Capture();

            captureEvent.capture_Time  = capTime;
            captureEvent.linkage_start = CaptureImages.GetTime(AutomaticLinkage.linkageStar.ToString());
            captureEvent.linkage_end   = CaptureImages.GetTime(linkageEnd.ToString());
            captureEvent.picture_path  = pic_Full_path;

            captureEvent.Ship_number = boat_Name;
            captureEvent.target_Id   = MonitoringX.nowTarget.ID;

            capture.WriteSeleCapture(captureEvent);//截图联动事件入库
            System.Windows.Application.Current.Dispatcher.Invoke(new Action(() =>
            {
                MessageBoxX.Show("联动事件", "入库成功");
            }
                                                                            ));
            NVRCsharpDemo.DVRAPI.GetInstance().Stop_RealPlay(videoState);
            this.Close();//关闭窗口
        }