private TIME_OF_DAY enumerateEndTimePeriod() { if (EndTime.CompareTo(EARLIEST_START_TIME) >= 0) { return(TIME_OF_DAY.PM); } return(TIME_OF_DAY.AM); }
public int CompareTo(ScheduleEvent other) { int num = EndTime.CompareTo(other.EndTime); if (num == 0) { num = Id.CompareTo(other.Id); } return(num); }
public int CompareTo(ExecutionThread other) { int result = EndTime.CompareTo(other.EndTime); if (result != 0) { return(result); } return(Id.CompareTo(other.Id)); }
public int CompareTo(IMark other) { int rv = StartTime.CompareTo(other.StartTime); if (rv != 0) { return(rv); } return(EndTime.CompareTo(other.EndTime)); }
public int CompareTo(TransformationEvent other) { if (StartTime != other.StartTime) { return(StartTime.CompareTo(other.StartTime)); } if (EndTime != other.EndTime) { return(EndTime.CompareTo(other.EndTime)); } return(Transformtype.CompareTo(other.Transformtype)); }
public int CompareTo(Element other) { int rv = StartTime.CompareTo(other.StartTime); if (rv != 0) { return(rv); } else { return(EndTime.CompareTo(other.EndTime)); } }
public int CompareTo(HitObject other) { if ((this is HitObjectDummy) || (other is HitObjectDummy)) { return(EndTime.CompareTo(other.EndTime)); } if (StartTime == other.StartTime) { return(other.NewCombo.CompareTo(NewCombo)); } return(StartTime.CompareTo(other.StartTime)); }
/// <summary> /// Compare commands by start time, then end time, then name /// </summary> public int CompareTo(S2VXCommand other) { var compare = StartTime.CompareTo(other.StartTime); if (compare == 0) { compare = EndTime.CompareTo(other.EndTime); } if (compare == 0) { compare = string.Compare(GetType().Name, other.GetType().Name, StringComparison.OrdinalIgnoreCase); } return(compare); }
private bool CheckForShutdown() { if (State == StateType.Shutdown) { return(true); } if (EndTime.CompareTo(DateTime.Now) <= 0) { return(true); } return(false); }
/// <summary> /// Compare StartTime, then EndTime. /// </summary> /// <remarks> /// Implemented IComparable for use with Array.Sort(). /// </remarks> /// <param name="rvalue"></param> /// <returns></returns> public int CompareTo(TimedEvent rvalue) { if (rvalue == null) { throw new NullReferenceException(); // Cannot compare against null } int cmp = _StartTime.CompareTo(rvalue.StartTime); if (cmp == 0) { cmp = EndTime.CompareTo(rvalue.EndTime); } return(cmp); }
/// <summary> /// return true if time falls within StartTime/EndTime /// </summary> /// <param name="time"></param> /// <returns></returns> private bool CheckDay(System.DateTime time) { if (NonStopSession) { throw new InvalidOperationException("NonStopSession is set -- this should never be called."); } if (StartDay < EndDay) { if (time.DayOfWeek < StartDay || time.DayOfWeek > EndDay) { return(false); } else if (time.DayOfWeek < EndDay) { return((StartDay < time.DayOfWeek) || (StartTime.CompareTo(time.TimeOfDay) <= 0)); } else { return((time.DayOfWeek < EndDay) || (EndTime.CompareTo(time.TimeOfDay) >= 0)); } } if (EndDay < StartDay) { if (EndDay < time.DayOfWeek && time.DayOfWeek < StartDay) { return(false); } else if (time.DayOfWeek < StartDay) { return((time.DayOfWeek < EndDay) || (EndTime.CompareTo(time.TimeOfDay) >= 0)); } else { return((time.DayOfWeek > StartDay) || (StartTime.CompareTo(time.TimeOfDay) <= 0)); } } //start day must be same as end day if (StartTime >= EndTime) { return(time.DayOfWeek != StartDay || CheckTime(time.TimeOfDay)); } else { return(time.DayOfWeek == StartDay && CheckTime(time.TimeOfDay)); } }
private bool CheckDay(System.DateTime time) { if (StartDay < EndDay) { if (time.DayOfWeek < StartDay || time.DayOfWeek > EndDay) { return(false); } else if (time.DayOfWeek < EndDay) { return((StartDay < time.DayOfWeek) || (StartTime.CompareTo(time.TimeOfDay) <= 0)); } else { return((time.DayOfWeek < EndDay) || (EndTime.CompareTo(time.TimeOfDay) >= 0)); } } if (EndDay < StartDay) { if (EndDay < time.DayOfWeek && time.DayOfWeek < StartDay) { return(false); } else if (time.DayOfWeek < StartDay) { return((time.DayOfWeek < EndDay) || (EndTime.CompareTo(time.TimeOfDay) >= 0)); } else { return((time.DayOfWeek > StartDay) || (StartTime.CompareTo(time.TimeOfDay) <= 0)); } } //start day must be same as end day if (StartTime >= EndTime) { return(time.DayOfWeek != StartDay || CheckTime(time.TimeOfDay)); } else { return(time.DayOfWeek == StartDay && CheckTime(time.TimeOfDay)); } }
public int CompareTo(StatusEffect other) { return(EndTime.CompareTo(other.EndTime)); }
public bool IsVisible(DateTime currentTime) { return(Tour.IsOpen && EndTime.CompareTo(currentTime) > 0); }
public int CompareTo(int other) { return(EndTime.CompareTo(other)); }