Exemplo n.º 1
0
        private string GetBoardVersion()
        {
            SBoardInfo sBoardInfo = new SBoardInfo();

            if (CoreInterface.GetBoardInfo(0, ref sBoardInfo) != 0)
            {
                //FW Version Get
                string fwversion = string.Empty;
                int    nMaxNum   = (sBoardInfo.m_nPkgVersion & 0xFF00) >> 8;
                for (int nIndex = 1; nIndex <= nMaxNum; nIndex++)
                {
                    if (nIndex == 1)
                    {
                        byte[] bytefwversion = new byte[16];
                        if (EpsonLCD.GetFWVersionInfo(ref bytefwversion))
                        {
                            int name_term = 4;
                            while (bytefwversion[name_term] != 0)
                            {
                                name_term++;
                            }
                            fwversion = "FW version:" + (uint)BitConverter.ToInt32(bytefwversion, 0) + " " +
                                        System.Text.Encoding.ASCII.GetString(bytefwversion, 4, name_term - 4) + " " + "\n";
                        }
                    }
                }
                string mbversion   = "MB version:" + VersionToString(sBoardInfo.m_nBoradVersion) + " " + sBoardInfo.sProduceDateTime + " " + sBoardInfo.m_nBoardManufatureID.ToString("X4") + sBoardInfo.m_nBoardProductID.ToString("X4") + "\n";
                string mtversion   = "MT version:" + VersionToString(sBoardInfo.m_nMTBoradVersion) + " " + sBoardInfo.sMTProduceDateTime + " " + "\n";
                string hbversion   = "HB version:" + VersionToString(sBoardInfo.m_nHBBoardVersion) + " " + sBoardInfo.sReserveProduceDateTime + " " + "\n";
                string mapbversion = string.Empty;
                if (sBoardInfo.m_nMapBoardVersion != 0 && !string.IsNullOrEmpty(sBoardInfo.sMapBoardProduceDateTime))
                {
                    mapbversion = "Map version:" + VersionToString(sBoardInfo.m_nMapBoardVersion) + " " + sBoardInfo.sMapBoardProduceDateTime + " " + "\n";
                }

                string idversion = "MB ID :" + sBoardInfo.m_nBoardSerialNum.ToString() + " " + "\n";
                return(fwversion + mbversion + mtversion + hbversion + mapbversion + idversion);
            }
            else
            {
                return("");
            }
        }