コード例 #1
0
ファイル: Form1.cs プロジェクト: wrzfeijianshen/SDK_Nebula
        private void Rbtnet__deviceNameEvt_(IntPtr ctx, string strDeviceMac, string strDeviceName)
        {
            // Console.WriteLine("Rbtnet__deviceMacEvt_:{0}-{1}", strDeviceMac, strDeviceName);
            updateDeviceNameListView(strDeviceMac, strDeviceName);
            Console.WriteLine("Rbtnet__deviceMacEvt_:{0}-{1}", strDeviceMac, strDeviceName);

            Thread.Sleep(400);
            rbtnet_.configBmpStu(strDeviceMac, strDeviceMac, "学生" + strDeviceMac.Substring(8, 3));

            Thread.Sleep(400);
            rbtnet_.SendCmd((int)DeviceCmd.CMD_DEVICE_INFO);
            Thread.Sleep(400);
            rbtnet_.SendCmd((int)DeviceCmd.CMD_DEVICE_HARD_INFO);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: jamermontane/SDK_Nebula
        /// <summary>
        /// 开新线程,进行下发学生姓名,获取设备信息和硬件信息
        /// </summary>
        /// <param name="strDeviceMacObj"></param>
        public void setCmd(object strDeviceMacObj)
        {
            string strDeviceMac = strDeviceMacObj as string;

            if (!string.IsNullOrEmpty(strDeviceMac))
            {
                Thread.Sleep(200);
                rbtnet_.configBmpStu(strDeviceMac, strDeviceMac, "学生" + strDeviceMac.Substring(8, 3));
            }

            Thread.Sleep(400);
            rbtnet_.SendCmd((int)DeviceCmd.CMD_DEVICE_INFO, strDeviceMac);
            Thread.Sleep(400);
            rbtnet_.SendCmd((int)DeviceCmd.CMD_DEVICE_HARD_INFO, strDeviceMac);
        }