예제 #1
0
파일: Spike.cs 프로젝트: sulerzh/DbExporter
        /// <summary>
        /// 数据库存储
        /// </summary>
        /// <param name="pts"></param>
        public void FromString(string pts)
        {
            m_blocks.Clear();

            string[] ptArray = pts.Split(new string[] { "," },
                StringSplitOptions.RemoveEmptyEntries);
            //
            int ptCnt = ptArray.Length / 3;
            int readTimes = 0;
            for (int i = 0; i < ptArray.Length && readTimes < ptCnt; i += 3)
            {
                Block blk = new Block();
                blk.FractionIndex = System.Convert.ToInt32(ptArray[i]);
                blk.StartIndex = System.Convert.ToInt32(ptArray[i + 1]);
                blk.EndIndex = System.Convert.ToInt32(ptArray[i + 2]);
                AddBlock(blk);

                readTimes++;
            }
        }
예제 #2
0
파일: Spike.cs 프로젝트: sulerzh/DbExporter
 public void AddBlock(Block blk)
 {
     m_blocks.Add(blk);
 }