public override bool SelectPrev(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
     if ((annotation != null) && (annotation.DataRecNr > 0) && (Block(annotation.DataRecNr - 1) == null))
     {
         DoReadBlockDataFromFile(annotation.DataRecNr - 1);
     }
     return(base.SelectPrev(ref annotation));
 }
 public override bool SelectLast(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
     if ((BlockCount > 0) && (Block(BlockCount - 1) == null))
     {
         DoReadBlockDataFromFile(BlockCount - 1);
     }
     return(base.SelectLast(ref annotation));
 }
 public override bool SelectNext(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
     if ((annotation != null) && (annotation.DataRecNr >= 0) && (annotation.DataRecNr < BlockCount - 1) &&
         ((Block(annotation.DataRecNr + 1) == null) || !Block(annotation.DataRecNr + 1).DataReadFromBuffer))
     {
         DoReadBlockDataFromFile(annotation.DataRecNr + 1);
     }
     return(base.SelectNext(ref annotation));
 }
예제 #4
0
 public static int CompareEdfPlusAnnotation(EdfPlusAnnotation item1, EdfPlusAnnotation item2)
 {
     if (MathEx.SameValue(item1.Onset, item2.Onset))
     {
         return(AnnotationTagSort(item1.FileOrder, item2.FileOrder));
     }
     if (item1.Onset < item2.Onset)
     {
         return(-1);
     }
     return(1);
 }
예제 #5
0
 public static int CompareEdfPlusAnnotation(EdfPlusAnnotation item1, EdfPlusAnnotation item2)
 {
     if (MathEx.SameValue(item1.Onset, item2.Onset))
     return AnnotationTagSort(item1.FileOrder, item2.FileOrder);
       if (item1.Onset < item2.Onset)
     return -1;
       return 1;
 }
예제 #6
0
 public override bool SelectPrev(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
       if ((annotation != null) && (annotation.DataRecNr > 0) && (Block(annotation.DataRecNr - 1) == null))
     DoReadBlockDataFromFile(annotation.DataRecNr - 1);
       return base.SelectPrev(ref annotation);
 }
예제 #7
0
 public override bool SelectNext(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
       if ((annotation != null) && (annotation.DataRecNr >= 0) && (annotation.DataRecNr < BlockCount - 1) &&
       ((Block(annotation.DataRecNr + 1) == null) || !Block(annotation.DataRecNr + 1).DataReadFromBuffer))
     DoReadBlockDataFromFile(annotation.DataRecNr + 1);
       return base.SelectNext(ref annotation);
 }
예제 #8
0
 public override bool SelectLast(ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
       if ((BlockCount > 0) && (Block(BlockCount - 1) == null))
     DoReadBlockDataFromFile(BlockCount - 1);
       return base.SelectLast(ref annotation);
 }
예제 #9
0
 public override bool SelectFirst(double onset, ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
       GetBlockByOnset(onset);  // Automatically reads data from file if not available
       return base.SelectFirst(onset, ref annotation);
 }
 public override bool SelectFirst(double onset, ref EdfPlusAnnotation annotation)
 {
     LastError = TalError.None;
     GetBlockByOnset(onset); // Automatically reads data from file if not available
     return(base.SelectFirst(onset, ref annotation));
 }