- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
private void axVPortSDK_OnDIOStatus(object sender, AxVPORTSDKLib._DVPortSDKEvents_OnDIOStatusEvent e)
{
int i, nDIStatus;
String szDIStatus = "";
for (i = 3; i >= 0; i--)
{
if ((e.lDIStatus & (long)Math.Pow(2, i)) == ((long)Math.Pow(2, i)))
nDIStatus = 1;
else
nDIStatus = 0;
szDIStatus = szDIStatus + System.Convert.ToString(nDIStatus);
}
label_di.Text = szDIStatus;
for (i = 0; i < 2; i++)
{
if (System.Convert.ToBoolean(e.lDOStatus & (long)Math.Pow(2, i)))
{
if (i == 0)
label_do1.Text = "Close";
else
label_do2.Text = "Close";
}
else
{
if (i == 0)
label_do1.Text = "Open";
else
label_do2.Text = "Open";
}
}
}
Комментарии (0) RSS
Добавить комментарий