Beispiel #1
0
        public void PasswordTabPage_Load()
        {
            string strTemp = "";
            int    passLen = CoreConst.MAX_PASSWORD_LEN;

            byte[] info = new byte[passLen];
            int    iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 0);

            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_SerialNoControlTime.SetText(strTemp);
            iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 1);
            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_SerialNoControlLang.SetText(strTemp);
        }
Beispiel #2
0
        private void PasswordForm_Load(object sender, System.EventArgs e)
        {
            string strTemp = "";
            int    passLen = CoreConst.MAX_PASSWORD_LEN;

            byte[] info = new byte[passLen];
            int    iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 0);

            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_SerialNoControlTime.SetText(strTemp);
#if !LIYUUSB
            iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 1);
            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_SerialNoControlLang.SetText(strTemp);
            //ink
            //iRet = CoreInterface.GetPassword(info, ref passLen,0,2);
            iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 2);
            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_serialNoControl_ink.SetText(strTemp);
            //UV
            //iRet = CoreInterface.GetPassword(info, ref passLen,0,3);
            iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 3);
            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_serialNoControl_uv.SetText(strTemp);
#if INK_COUNTER
            iRet = CoreInterface.GetPassword(info, ref passLen, (ushort)BoardEnum.CoreBoard, 2);
            if (iRet != 0)
            {
                strTemp = System.Text.Encoding.ASCII.GetString(info, 0, passLen);
            }
            else
            {
                strTemp = "";
            }
            m_serialNoControl_ink.SetText(strTemp);
#endif
#endif
        }