예제 #1
0
 /// <summary>
 /// Generates the shift struct containing the basic information about this shift.
 /// Used a seperate function to improve readability
 /// </summary>
 /// <param name="shiftName">Name of shift.</param>
 /// <param name="day">day of the week this shift is on.</param>
 /// <param name="startTime">start time for this shift in military format, as a string, with no ':'</param>
 /// <param name="endTime">end time for this shift in military format, as a string, with no ':'</param>
 public void LoadStruct(string shiftName, string day, string startTime, string endTime, DateTime date)
 {
     _shiftInfo = new Shift(shiftName, day, startTime, endTime, _count, date);
     _count++;
 }
예제 #2
0
 /// <summary>
 /// removes a specified shift from dictionary.
 /// </summary>
 /// <param name="target"></param>
 public void Remove(Shift target)
 {
     this._shifts[target.Day].Remove(target);
 }
예제 #3
0
 /// <summary>
 /// check we contain this shift.
 /// </summary>
 /// <param name="target">Shift to find.</param>
 /// <returns></returns>
 public bool Contains(Shift target)
 {
     return(this.Contains(target.Day, target.Name));
 }
예제 #4
0
 /// <summary>
 /// Add a new shift to end of list.
 /// </summary>
 /// <param name="shift">new shift.</param>
 public void Add(Shift shift)
 {
     this._shifts[shift.Day].Add(shift);
 }