private void cmdGetDeviceInfo_Click(object sender, EventArgs e)
        {
            int     vInfo;
            int     vValue = 0;
            Boolean vRet;
            int     vErrorCode = 0;

            lblMessage.Text = "Working...";
            Application.DoEvents();

            vInfo = cmbSatus.SelectedIndex + 1;

            vRet = bpc.EnableDevice(Program.gMachineNumber, 0); // 0 : false
            if (!vRet)
            {
                lblMessage.Text = util.gstrNoDevice;
                return;
            }

            vRet = bpc.GetDeviceInfo(Program.gMachineNumber, vInfo, ref vValue);
            if (vRet)
            {
                switch (vInfo)
                {
                case 1:
                    lblMessage.Text = "(1) = ManagerCount = " + vValue;
                    break;

                case 2:
                    lblMessage.Text = "(2) = Device ID = " + vValue;
                    break;

                case 3:
                    lblMessage.Text = "(3) = Language = " + vValue;
                    break;

                case 4:
                    lblMessage.Text = "(4) = PowerOffTime = " + vValue;
                    break;

                case 5:
                    lblMessage.Text = "(5) = Lock release time = " + vValue;
                    break;

                case 6:
                    lblMessage.Text = "(6) = GLogWarning = " + vValue;
                    break;

                case 7:
                    lblMessage.Text = "(7) = SLogWarning = " + vValue;
                    break;

                case 8:
                    lblMessage.Text = "(8) = ReVerifyTime = " + vValue;
                    break;

                case 9:
                    lblMessage.Text = "(9) = Baudrate = " + vValue;
                    break;

                case 10:
                    lblMessage.Text = "(10) = Parity check = " + vValue;
                    break;

                case 11:
                    lblMessage.Text = "(11) = Stop bit = " + vValue;
                    break;

                case 12:
                    lblMessage.Text = "(12) = Date Seperator = " + vValue;
                    break;

                case 13:
                    lblMessage.Text = "(13) = Identificatin mode = " + vValue;
                    break;

                case 14:
                    lblMessage.Text = "(14) = LockOperate = " + vValue;
                    break;

                case 15:
                    lblMessage.Text = "(15) = Door sensor type = " + vValue;
                    break;

                case 16:
                    lblMessage.Text = "(16) = Door open time limit = " + vValue;
                    break;

                case 17:
                    lblMessage.Text = "(17) = Anti-pass = "******"(18) = Auto sleep time = " + vValue;
                    break;

                case 19:
                    lblMessage.Text = "(19) = Daylight offset = " + vValue;
                    break;

                case 20:
                    lblMessage.Text = "(20) = UDP Server = " + util.pubLongToIPAddr(vValue);
                    break;

                case 21:
                    lblMessage.Text = "(21) = DHCP Use = " + vValue;
                    break;

                case 22:
                    lblMessage.Text = "(22) = Main Lock Group = " + vValue;
                    break;
                }
            }
            else
            {
                bpc.GetLastError(ref vErrorCode);
                lblMessage.Text = util.ErrorPrint(vErrorCode);
            }

            bpc.EnableDevice(Program.gMachineNumber, 1); // 1 : true
        }