Пример #1
0
 private void init(TrcHeader header)
 {
     TimeOffset = 0;
     _frames    = 0;
     _header    = header;
     _header.WriteTo(this);
 }
Пример #2
0
 public static decimal GetTimeFromNumber(int number, TrcHeader header, decimal offset)
 {
     try {
         decimal ratio = 1 / decimal.Parse(header.DataRate);
         return((((decimal)number - 1) * ratio) + offset);
     } catch (OverflowException) {
         return(offset);
     }
 }
Пример #3
0
        public TrcHeader JoinWith(TrcHeader another, bool useAnothersSettings)
        {
            TrcHeader ret;

            if (useAnothersSettings)
            {
                ret = another;
            }
            else
            {
                ret = this;
            }
            List <string> markers = new List <string>();

            markers.AddRange(this.Markers);
            markers.AddRange(another.Markers);
            ret.Markers    = markers.ToArray();
            ret.NumMarkers = markers.Count;
            return(ret);
        }
Пример #4
0
 public TrcWriter(TrcHeader header, Stream stream, Encoding encoding) : base(stream, encoding)
 {
     init(header);
 }
Пример #5
0
 public TrcWriter(TrcHeader header, Stream stream) : base(stream)
 {
     init(header);
 }
Пример #6
0
 public TrcWriter(TrcHeader header, string path) : base(path)
 {
     init(header);
 }
Пример #7
0
 private void init()
 {
     _header = new TrcHeader(this);
 }
Пример #8
0
 public static decimal GetTimeFromNumber(int number, TrcHeader header)
 {
     return(GetTimeFromNumber(number, header, 0));
 }
Пример #9
0
 /// <summary>
 /// 無名マーカーを除去したフレームを返します
 /// </summary>
 /// <param title="header">マーカー名情報を保持するtrc ヘッダ</param>
 /// <returns>新しいフレーム</returns>
 public TrcFrame TrimUnnamed(TrcHeader header)
 {
     return(TrimMarkers(0, header.NumMarkers));
 }