Exemplo n.º 1
0
        /// <summary>
        /// Add a new ControlPointInfo reference in TimeBuffer from Type and Index
        /// </summary>
        /// <param name="Type">Identifier Type</param>
        /// <param name="Index">Real Index</param>
        /// <returns>New Position</returns>
        public int Add(IdentifierTypes Type, int Index)
        {
            int NewPosition = 5;

            if (Elements.Count > 0)
            {
                NewPosition = Elements.Last().Position + 9; //9 bytes
            }
            TBufferElement newElement = new TBufferElement();

            newElement.Position = NewPosition;
            newElement.Info     = Identifiers.GetControlPointInfo(Type, Index);

            Elements.Add(newElement);
            return(NewPosition);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add a new ControlPointInfo reference in TimeBuffer
        /// </summary>
        /// <param name="info">ControlPoint info to add</param>
        /// <returns>New Position</returns>
        public int  Add(ControlPointInfo info)
        {
            int NewPosition = 5;

            if (Elements.Count > 0)
            {
                NewPosition = Elements.Last().Position + 9; //9 bytes
            }
            TBufferElement newElement = new TBufferElement();

            newElement.Position = NewPosition;
            newElement.Info     = info;

            Elements.Add(newElement);
            return(NewPosition);
        }