Exemplo n.º 1
0
 public DrawHelper(Experiment exp)
 {
     this.Exp = exp;
     Init();
     AddPoints();
     AddTitleAndAxis();
 }
Exemplo n.º 2
0
 private int InsertPoint(int pi, Experiment exp, DateTime start, DateTime end, Segment seg)
 {
     for (; pi < MoveData.Length; ++pi)
     {
         if (!TimePoint.IsPoint(MoveData[pi]))
         {
             continue;
         }
         TimePoint tp = new TimePoint(MoveData[pi]);
         if (tp.Time >= start && tp.Time <= end)
         {
             if (tp.Position.X != 0 && tp.Position.Y != 0)
             {
                 seg.Points.Add(tp);
                 exp.MaxX = Math.Max(exp.MaxX, tp.Position.X);
                 exp.MinX = Math.Min(exp.MinX, tp.Position.X);
                 exp.MaxY = Math.Max(exp.MaxY, tp.Position.Y);
             }
         }
         else if (tp.Time > end)
         {
             break;
         }
     }
     return pi;
 }
Exemplo n.º 3
0
 private void ParseTrail()
 {
     Experiment now = null;
     int id = 1;
     foreach (string data in BehaveData)
     {
         if (data.StartsWith("----- EXPERIMENT START -----"))
         {
             if (now != null)
             {
                 Experiments.Add(now);
             }
             now = new Experiment(data) { Id = id++ };
         }
         else if (Trail.IsATrail(data))
         {
             Trail t = new Trail(data) { Exp = now };
             now.Trils.Add(t);
         }
     }
     if (now != null)
     {
         Experiments.Add(now);
     }
 }
Exemplo n.º 4
0
 private void InssertWave(int[] ti, Experiment exp, DateTime start, DateTime end, Segment seg)
 {
     for (int i = 0; i < this.ChannelCnt; ++i)
     {
         for (; ti[i] < ChannelTime[i].Count; ++ti[i])
         {
             DateTime tmp = ChannelTime[i][ti[i]];
             if (tmp >= start && tmp <= end)
             {
                 seg.WaveList[i].Add(tmp);
             }
             else if (tmp > end)
             {
                 break;
             }
         }
         exp.MaxWaveCnt[i] = Math.Max(exp.MaxWaveCnt[i], seg.WaveList[i].Count);
     }
 }