/*public IComparable Field(int field) * { * switch (field) * { * case 0: * return (IComparable)TimeAtUni_; * case 1: * return (IComparable)TimeInClasses_; * case 2: * return (IComparable)TimeInBreaks_; * case 3: * return Days_; * case 4: * return (IComparable)MinDayLength_; * case 5: * return (IComparable)MaxDayLength_; * case 6: * return (IComparable)AverageDayLength_; * case 7: * return (IComparable)ShortBreak_; * case 8: * return (IComparable)LongBreak_; * case 9: * return (IComparable)AverageBreak_; * case 10: * return NumberBreaks_; * case 11: * return (IComparable)ShortBlock_; * case 12: * return (IComparable)LongBlock_; * case 13: * return (IComparable)AverageBlock_; * case 14: * return NumberBlocks_; * case 15: * return (IComparable)EarlyStart_; * case 16: * return (IComparable)LateStart_; * case 17: * return (IComparable)AverageStart_; * case 18: * return (IComparable)EarlyEnd_; * case 19: * return (IComparable)LateEnd_; * case 20: * return (IComparable)AverageEnd_; * default: * throw new Exception("Field index out of range."); * } * }*/ public string FieldValueToString(FieldIndex field) { switch (field) { case FieldIndex.TimeAtUni: return(TimeAtUni_.ToString()); case FieldIndex.TimeInClasses: return(TimeInClasses_.ToString()); case FieldIndex.TimeInBreaks: return(TimeInBreaks_.ToString()); case FieldIndex.Days: return(Days_.ToString()); case FieldIndex.MinDayLength: return(MinDayLength_.ToString()); case FieldIndex.MaxDayLength: return(MaxDayLength_.ToString()); case FieldIndex.AverageDayLength: return(AverageDayLength_.ToString()); case FieldIndex.ShortBreak: return(ShortBreak_.ToString()); case FieldIndex.LongBreak: return(LongBreak_.ToString()); case FieldIndex.AverageBreak: return(AverageBreak_.ToString()); case FieldIndex.NumberBreaks: return(NumberBreaks_.ToString()); case FieldIndex.ShortBlock: return(ShortBlock_.ToString()); case FieldIndex.LongBlock: return(LongBlock_.ToString()); case FieldIndex.AverageBlock: return(AverageBlock_.ToString()); case FieldIndex.NumberBlocks: return(NumberBlocks_.ToString()); case FieldIndex.EarlyStart: return(EarlyStart_.ToString()); case FieldIndex.LateStart: return(LateStart_.ToString()); case FieldIndex.AverageStart: return(AverageStart_.ToString()); case FieldIndex.EarlyEnd: return(EarlyEnd_.ToString()); case FieldIndex.LateEnd: return(LateEnd_.ToString()); case FieldIndex.AverageEnd: return(AverageEnd_.ToString()); default: return(""); } }
public override string ToString() { return(DayOfWeek.ToString() + " " + Start_.ToString() + "-" + End_.ToString()); }