public AutomaticLinkage() { InitializeComponent(); this.Closing += closeSoftware; WindowStartupLocation = WindowStartupLocation.CenterScreen; startPlay(); linkageStar = GetTimeStamp(); pic_Full_path = ""; boat_Name = ""; capTime = CaptureImages.GetTime(GetTimeStamp().ToString()); }
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();//关闭窗口 }