EnableClock

Definition

Usage

Enable or disable the clock display with colon ":". If enabled, the device clock is displayed

with a colon and synchronized to the main interface. If disabled, the clock is displayed

without a colon.

Parameter

Display control. 1: Enabled. 0: Disabled.

Return Value

Return True if it is successful, or return False.

Related Function

None

 

Ejemplo

C#

private static int enableClock(string ipAddr, int port, int value)
        {
int idwErrorCode = 0;
//Create Standalone SDK class dynamicly.
            zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
if (axCZKEM1.Connect_Net(ipAddr, 4370))
            {
if (axCZKEM1.EnableClock(value))
                {
                    MessageBox.Show("Operation Success! Device Clock Value " + value);
                }
else
                {
                    axCZKEM1.GetLastError(ref idwErrorCode);
                    MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
                }
            }
else
            {
                axCZKEM1.GetLastError(ref idwErrorCode);
            }
            axCZKEM1.Disconnect();
return idwErrorCode;
        }

VB

Private Sub enableClock(ipAddr As String, port As Int32, options As Int32)
'Create Standalone SDK class dynamicly.
Dim axCZKEM1 As New zkemkeeper.CZKEM
Dim idwErrorCode As Integer
If axCZKEM1.Connect_Net(ipAddr, port) = True Then
If axCZKEM1.EnableClock(options) = True Then
                MsgBox("Operation Success! device Clock is  " + options)
Else
                axCZKEM1.GetLastError(idwErrorCode)
                MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
End If
Else
            axCZKEM1.GetLastError(idwErrorCode)
End If
        axCZKEM1.Disconnect()
End Sub