Пример #1
0
        public override void SetParamters(byte[] objParamters)
        {
            m_pPara = new RuleExpression.LRPointDistPara();
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));

            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();

            m_pPara.dPointDist    = pParameter.ReadDouble();
            m_pPara.nSearchType   = pParameter.ReadInt32();
            m_pPara.bSearchSamePt = Convert.ToBoolean(pParameter.ReadInt32());


            int nStrSize = sizeof(double) + 3 * sizeof(int);

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

            para_str.Trim();

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

            int i = 0;

            m_pPara.strAlias       = strResult[i++];
            m_pPara.strRemark      = strResult[i++];
            m_pPara.strTargetLayer = strResult[i++];
            m_pPara.strStdName     = strResult[i++];
            m_pPara.strBufferLayer = strResult[i];
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RulePointDist"/> class.
 /// </summary>
 public RulePointDist()
 {
     m_pPara = null;
     m_strName = "��������ʼ����";
 }
Пример #3
0
        public override void SetParamters(byte[] objParamters)
        {
            m_pPara = new RuleExpression.LRPointDistPara();
            BinaryReader pParameter = new BinaryReader(new MemoryStream(objParamters));
            pParameter.BaseStream.Position = 0;

            int nCount1 = pParameter.ReadInt32();
            m_pPara.dPointDist = pParameter.ReadDouble();
            m_pPara.nSearchType = pParameter.ReadInt32();
            m_pPara.bSearchSamePt = Convert.ToBoolean(pParameter.ReadInt32());

            int nStrSize = sizeof(double) + 3 * sizeof(int);
            Byte[] bb = new byte[nCount1 - nStrSize];
            pParameter.Read(bb, 0, nCount1 - nStrSize);
            string para_str = Encoding.Default.GetString(bb);
            para_str.Trim();

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

            int i = 0;
            m_pPara.strAlias = strResult[i++];
            m_pPara.strRemark = strResult[i++];
            m_pPara.strTargetLayer = strResult[i++];
            m_pPara.strStdName = strResult[i++];
            m_pPara.strBufferLayer = strResult[i];
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RulePointDist"/> class.
 /// </summary>
 public RulePointDist()
 {
     m_pPara   = null;
     m_strName = "两点距离质检规则";
 }