Exemplo n.º 1
0
        public bool Add(HighSpeedTimeLine timeLine)
        {
            if (timeLine is null)
            {
                return(false);
            }

            if (Finalized != timeLine.Finalized)
            {
                /* 位置校正済みのTimeLineには校正済みのTimeLineを、未校正のTimeLineには未校正のTimeLineを入れてくださいな */
                return(false);
            }

            for (int j = 0; j < timeLine.Count; ++j)
            {
                int i;
                for (i = 0; i < Count; ++i)
                {
                    if (this[i].Position.Equals(timeLine[j].Position))
                    {
                        /* 同一チックに重複定義があった場合は上書きする方針で */
                        this[i] = timeLine[j];
                    }
                }
                if (i >= Count)
                {
                    Add(timeLine[j]);
                }
            }

            return(true);
        }
Exemplo n.º 2
0
 public bool Add(int defNumber, HighSpeedTimeLine timeLine)
 {
     if (book.ContainsKey(defNumber))
     {
         return(book[defNumber].Add(timeLine));
     }
     else
     {
         book.Add(defNumber, timeLine);
         return(true);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// 定義番号と定義内容から新規にHighSpeedTimeLineを作成し、リストに追加します。
        /// </summary>
        /// <param name="defNumber"></param>
        /// <param name="define"></param>
        /// <returns></returns>
        public bool Add(int defNumber, string define, int ticksPerBeat)
        {
            HighSpeedTimeLine timeLine = new HighSpeedTimeLine(define, this, ticksPerBeat);

            if (timeLine.Valid)
            {
                Add(defNumber, timeLine);
                return(true);
            }
            else
            {
                return(false);
            }
        }