Exemple #1
0
        /// <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++;
            }
        }
Exemple #2
0
 public void AddBlock(Block blk)
 {
     m_blocks.Add(blk);
 }