-
Notifications
You must be signed in to change notification settings - Fork 2
/
ClearanceVideoReplayForm.cs
86 lines (71 loc) · 2.26 KB
/
ClearanceVideoReplayForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using zhuhai.util;
using zhuhai.service;
using zhuhai.xmlrpc;
using zhuhai.model;
using zhuhai.monitorinfo.h264;
using zhuhai.monitorinfo;
namespace zhuhai
{
public partial class ClearanceVideoReplayForm : Form
{
private H264Controler playbackControler = null;
private GateRecord gateRecord = null;
public ClearanceVideoReplayForm(DataRow dr)
{
InitializeComponent();
ICustomsCMS server = XmlRpcInstance.getInstance();
playbackControler = new H264Controler(this.searchVideoPlayWnd, server);
playbackControler.setToolStripStatusLabel(this.toolStripStatusLabel);
bool isSuccess = playbackControler.init();
if (!isSuccess)
{
System.Environment.Exit(0);
}
gateRecord = new ModelHandler<GateRecord>().FillModel(dr);
Monitor monitor = new Monitor();
monitor.gateNo = gateRecord.gate_id;
playbackControler.setMonitor(monitor);
playbackControler.play(gateRecord);
}
private void btnPlay_Click(object sender, EventArgs e)
{
playbackControler.play(gateRecord);
}
private void btnPause_Click(object sender, EventArgs e)
{
this.playbackControler.pause();
}
private void btnSlow_Click(object sender, EventArgs e)
{
this.playbackControler.slow();
}
private void btnFast_Click(object sender, EventArgs e)
{
this.playbackControler.fast();
}
private void btnFrame_Click(object sender, EventArgs e)
{
this.playbackControler.pause();
}
private void btnStop_Click(object sender, EventArgs e)
{
this.playbackControler.stop();
}
private void VideoReplayForm_FormClosed(object sender, FormClosedEventArgs e)
{
if (playbackControler != null)
{
playbackControler.stop();
}
this.Close();
}
}
}