47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using System.Windows.Forms;
|
|
|
|
namespace AIParkingApplication
|
|
{
|
|
public partial class AIParkingApplicationForm : Form
|
|
{
|
|
//@"C:\CongRa_1.mp4"; @"C:\HS_test.mp4"; @"rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
|
|
private ApiController apiController;
|
|
private IDoorControlAccess c3Device;
|
|
private LaneIn laneIn;
|
|
private LaneOut laneOut;
|
|
|
|
public AIParkingApplicationForm()
|
|
{
|
|
InitializeComponent();
|
|
string serverBaseAddress = "http://localhost:80/";
|
|
apiController = new ApiController(serverBaseAddress);
|
|
c3Device = new C3DeviceController("192.168.1.200");
|
|
laneIn = new LaneIn(1, @"C:\HS_test.mp4", @"C:\HS_test.mp4", c3Device, apiController, true, false, true);
|
|
Controls.Add(laneIn);
|
|
|
|
laneOut = new LaneOut(2, @"C:\HS_test.mp4", @"C:\HS_test.mp4", c3Device, apiController, true, false, true);
|
|
laneOut.Location = new System.Drawing.Point(450, 0);
|
|
Controls.Add(laneOut);
|
|
|
|
StartLanes();
|
|
}
|
|
|
|
private void btnStopLaneIn_Click(object sender, System.EventArgs e)
|
|
{
|
|
laneIn.Stop();
|
|
laneOut.Stop();
|
|
}
|
|
|
|
private void StartLanes()
|
|
{
|
|
laneIn.Start();
|
|
laneOut.Start();
|
|
}
|
|
|
|
private void btnStartLaneIn_Click(object sender, System.EventArgs e)
|
|
{
|
|
StartLanes();
|
|
}
|
|
}
|
|
}
|