forked from Ken98045/On-Guard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CameraContactDialog.cs
47 lines (43 loc) · 1.47 KB
/
CameraContactDialog.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DeepStackDisplay
{
public partial class CameraContactDialog : Form
{
public CameraContactData Data { get; set; }
public CameraContactDialog(CameraContactData data)
{
Data = data;
InitializeComponent();
cameraIPAddressText.Text = data.CameraIPAddress;
portNumeric.Value = data.Port;
cameraNameText.Text = data.ShortCameraName;
cameraUserText.Text = data.CameraUserName;
cameraPasswordText.Text = data.CameraPassword;
cameraXResolutionNumeric.Value = data.CameraXResolution;
cameraYResolutionNumeric.Value = data.CameraYResolution;
}
private void OkButton_Click(object sender, EventArgs e)
{
Data.CameraIPAddress = cameraIPAddressText.Text;
Data.Port = (int) portNumeric.Value;
Data.ShortCameraName = cameraNameText.Text;
Data.CameraUserName = cameraUserText.Text;
Data.CameraPassword = cameraPasswordText.Text;
Data.CameraXResolution = (int) cameraXResolutionNumeric.Value;
Data.CameraYResolution = (int) cameraYResolutionNumeric.Value;
DialogResult = DialogResult.OK;
}
private void CancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}