Example #1
0
        /// <summary>
        /// See previous assignment
        /// </summary>
        private void SeePreviousAssignment()
        {
            if (CurrentAssignment == null)
            {
                WriteMessageToUser(Properties.Resources.you_have_not_started_any_assignments_yet);
                return;
            }

            if (SelectedAssignments.IndexOf(CurrentAssignment) != 0)
            {
                CurrentAssignment = SelectedAssignments[SelectedAssignments.IndexOf(CurrentAssignment) - 1];
                SeeCurrentAssignment();
            }
            else
            {
                WriteMessageToUser(Properties.Resources.there_are_no_previous_assignments);
            }
        }
Example #2
0
        /// <summary>
        /// See next assignment
        /// </summary>
        private void SeeNextAssignment()
        {
            if (CurrentAssignment == null)
            {
                WriteMessageToUser(Properties.Resources.you_have_not_started_any_assignments_yet);
                return;
            }

            if (SelectedAssignments != null && SelectedAssignments.Count > 1 && SelectedAssignments.IndexOf(CurrentAssignment) != SelectedAssignments.Count - 1)
            {
                CurrentAssignment = SelectedAssignments[SelectedAssignments.IndexOf(CurrentAssignment) + 1];
                SeeCurrentAssignment();
            }
            else
            {
                WriteMessageToUser(Properties.Resources.there_are_no_more_assignments);
            }
        }