Exemplo n.º 1
0
        //获取NVS设备列表
        private void btnNVSRefresh_Click(object sender, EventArgs e)
        {
            int iCount = 0;

            //获取NVS设备数量
            int iRet = NVSSDK.NSLook_GetCount
                       (
                ServerID,
                Encoding.ASCII.GetBytes(UserName),
                Encoding.ASCII.GetBytes(Password),
                ref iCount, NVSSDK.TYPE_NVS
                       );

            if (iRet != 0)
            {
                MessageBox.Show("NSLook_GetCount NVS Error ! " + iRet);
                textNVSCount.Text = "0";
                return;
            }
            textNVSCount.Text = iCount.ToString();

            //将回调保存,防止垃圾回收,出现异常
            NvsNotify = NVSListNotify;
            if (iCount > 0)
            {
                //清空DataGridView的内容
                dgvNVS.Rows.Clear();

                //获取NVS列表
                iRet = NVSSDK.NSLook_GetList
                       (
                    ServerID,
                    Encoding.ASCII.GetBytes(UserName),
                    Encoding.ASCII.GetBytes(Password),
                    0,
                    null,
                    NvsNotify,
                    NVSSDK.TYPE_NVS
                       );

                //操作失败
                if (iRet != 0)
                {
                    MessageBox.Show("NSLook_GetList NVS Error ! " + iRet);
                }
            }
        }
Exemplo n.º 2
0
Arquivo: NVSSDK.cs Projeto: xlgwr/move
 public static extern Int32 NSLook_GetList(Int32 _iID, byte[] _btUserName, byte[] _btPwd, Int32 _iPageIndex, DNSList_NOTIFY _pGetDNS, NVSList_NOTIFY _pGetNVS, Int32 _iType);
Exemplo n.º 3
0
 public static extern Int32 NSLook_GetList(Int32 _iID, byte[] _btUserName, byte[] _btPwd, Int32 _iPageIndex, DNSList_NOTIFY _pGetDNS, NVSList_NOTIFY _pGetNVS, Int32 _iType);