Exemplo n.º 1
0
 /// <summary>
 /// The <see cref="TimeLine.SectionEndValueChanged"/> event handler for the
 /// <see cref="TrialTimeLine"/> <see cref="trialTimeLine"/>.
 /// Sets <see cref="VectorGraphics.Canvas.Picture.SectionEndTime"/> and redraws fixations.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">A <see cref="TimeLine.PositionValueChangedEventArguments"/> with the event data.</param>
 private void TrialTimeLine_SectionEndValueChanged(object sender, TimeLine.PositionValueChangedEventArguments e)
 {
   this.fixationsPicture.SectionEndTime = e.Millisecond;
   this.fixationsPicture.DrawFixations(true);
 }
Exemplo n.º 2
0
 /// <summary>
 /// The <see cref="TimeLine.MarkerDeleted"/> event handler for the 
 /// <see cref="TrialTimeLine"/> <see cref="TimeLine"/>
 /// Deletes the given marker form the list and the database.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An <see cref="TimeLine.MarkerPositionChangedEventArguments"/></param>
 private void TimeSlider_MarkerDeleted(object sender, TimeLine.MarkerPositionChangedEventArguments e)
 {
   if (this.TrialEvents.ContainsKey(e.MarkerEventID))
   {
     Queries.DeleteMarkerEventByID(this.TrialEvents[e.MarkerEventID]);
     this.TrialEvents.Remove(e.MarkerEventID);
   }
 }
Exemplo n.º 3
0
 /// <summary>
 /// The <see cref="TimeLine.MarkerPositionChanged"/> event handler for the 
 /// <see cref="TrialTimeLine"/> <see cref="TimeLine"/>
 /// Updates the trial events member of this class
 /// and the database entry with the new time.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An <see cref="TimeLine.MarkerPositionChangedEventArguments"/></param>
 private void TimeSlider_MarkerPositionChanged(object sender, TimeLine.MarkerPositionChangedEventArguments e)
 {
   if (this.TrialEvents.ContainsKey(e.MarkerEventID))
   {
     this.TrialEvents[e.MarkerEventID].Time = e.NewTime;
     this.TrialEvents[e.MarkerEventID].Param = "Modified";
     this.UpdateMarkerPositionsInDatabase();
   }
 }
Exemplo n.º 4
0
    /// <summary>
    /// The <see cref="TimeLine.CaretValueChanged"/> event handler
    /// for the <see cref="TrialTimeLine"/> <see cref="trialTimeLine"/>.
    /// User moved the caret in the time slider to a new position,
    /// so render all graphic content up to the new millisecond time.
    /// </summary>
    /// <param name="sender">Source of the event</param>
    /// <param name="e">A <see cref="TimeLine.PositionValueChangedEventArguments"/> 
    /// with the new millisecond.</param>
    private void TimeSlider_CaretValueChanged(
      object sender,
      TimeLine.PositionValueChangedEventArguments e)
    {
      this.replayPicture.RenderTimeRangeInMS(this.currentTrialTime, e.Millisecond - 1);
      this.replayPicture.DrawForeground(false);
      this.currentTrialTime = e.Millisecond;

      if (this.btnShowUsercam.Checked)
      {
        this.usercamVideoPlayer.SeekMovie(this.userVideoStartTime + e.Millisecond, null);
      }

      if (this.isUsingTrialVideo)
      {
        this.videoFramePusher.SeekMovie(e.Millisecond);
      }

      if (this.btnEnableAudio.Checked)
      {
        if (this.Player != null)
        {
          this.Player.Seek(e.Millisecond);
        }
      }

      this.Refresh();
    }
Exemplo n.º 5
0
 /// <summary>
 /// The <see cref="TimeLine.CaretValueChanged"/> event handler for the
 /// <see cref="TrialTimeLine"/> <see cref="trialTimeLine"/>.
 /// Updates picture.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">A <see cref="RangeTrackBar.PositionValueChangedEventArguments"/> with the event data.</param>
 private void TrialTimeLine_CaretValueChanged(object sender, TimeLine.PositionValueChangedEventArguments e)
 {
   // Draw a portion of the time scale around the caret calue
   this.scanpathsPicture.DrawTimeSection(e.Millisecond, (int)this.nudTimeSpan.Value);
 }
Exemplo n.º 6
0
 /// <summary>
 /// The <see cref="TimeLine.SectionEndValueChanged"/> event handler for the
 /// <see cref="TrialTimeLine"/> <see cref="trialTimeLine"/>.
 /// Sets <see cref="VectorGraphics.Canvas.Picture.SectionEndTime"/> and redraws fixations.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">A <see cref="RangeTrackBar.PositionValueChangedEventArguments"/> with the event data.</param>
 private void TrialTimeLine_SectionEndValueChanged(object sender, TimeLine.PositionValueChangedEventArguments e)
 {
   this.scanpathsPicture.SectionEndTime = e.Millisecond;
 }