コード例 #1
0
        public override void SetParamters(byte[] objParamters)
        {
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));

            if (m_psPara == null)
            {
                m_psPara = new RuleExpression.LRCodePara();
            }

            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();

            m_psPara.nVersionID = pParameter.ReadInt32();

            //解析字符串
            int nSize = sizeof(int) * 2;

            Byte[] bb = new byte[nCount1 - nSize];
            pParameter.Read(bb, 0, nCount1 - nSize);
            string para_str = Encoding.Default.GetString(bb);

            para_str.Trim();


            string[] strResult = para_str.Split('|');

            int i = 0;

            m_psPara.strName          = strResult[i++];
            m_psPara.strAlias         = strResult[i++];
            m_psPara.strFtName        = strResult[i++];
            m_psPara.strRemark        = strResult[i++];
            m_psPara.strCodeField     = strResult[i++];
            m_psPara.strCodeType      = strResult[i++];
            m_psPara.strNameField     = strResult[i++];
            m_psPara.strCodeLibTable  = strResult[i++];
            m_psPara.strCodeDataTable = strResult[i++];
            m_psPara.strCodeNorm      = strResult[i++];
            m_strStdName = strResult[i++];
        }
コード例 #2
0
ファイル: RuleCode.cs プロジェクト: hy1314200/HyDM
        public override void SetParamters(byte[] objParamters)
        {
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));
            if (m_psPara == null)
            {
                m_psPara = new RuleExpression.LRCodePara();
            }

            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();
            m_psPara.nVersionID = pParameter.ReadInt32();

            //�����ַ���
            int nSize = sizeof(int) * 2;
            Byte[] bb = new byte[nCount1 - nSize];
            pParameter.Read(bb, 0, nCount1 - nSize);
            string para_str = Encoding.Default.GetString(bb);

            para_str.Trim();

            string[] strResult = para_str.Split('|');

            int i = 0;
            m_psPara.strName = strResult[i++];
            m_psPara.strAlias = strResult[i++];
            m_psPara.strFtName = strResult[i++];
            m_psPara.strRemark = strResult[i++];
            m_psPara.strCodeField = strResult[i++];
            m_psPara.strCodeType = strResult[i++];
            m_psPara.strNameField = strResult[i++];
            m_psPara.strCodeLibTable = strResult[i++];
            m_psPara.strCodeDataTable = strResult[i++];
            m_psPara.strCodeNorm = strResult[i++];
            m_strStdName = strResult[i++];
        }