public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                // NOTE: Don't call the base implementation on a Model class
                // see http://docs.xamarin.com/ios/tutorials/Events%2c_Protocols_and_Delegates

                UIViewController _questionView = new Question_iPhone(AppSession.SelectedExamUserQuestionList[indexPath.Row]);

                m_currentViewController.NavigationController.PushViewController(_questionView, true);
                tableView.DeselectRow(indexPath, false);
            }
Ejemplo n.º 2
0
            public Question_iPhoneTableSource(BusinessModel.UserQuestion aUserQuestion, Question_iPhone aParentViewControlller)
            {
                m_currentViewController = aParentViewControlller;
                m_userQuestion          = aUserQuestion;
                m_question       = BusinessModel.Question.GetQuestionByQuestionID(aUserQuestion.QuestionID);
                m_questionImages = BusinessModel.Image.GetImagesByQuestionID(aUserQuestion.QuestionID);
                if (m_questionImages == null)
                {
                    m_questionImages = new List <BusinessModel.Image> ();
                }
                m_questionImages        = (from x in m_questionImages orderby x.Title select x).ToList();
                m_questionAnswerOptions = BusinessModel.UserAnswerOptionDetail.GetUserAnswerOptionDetailListByUserQuestionID(aUserQuestion.UserQuestionID);
                m_questionAnswerOptions = (from x in m_questionAnswerOptions orderby x.Sequence select x).ToList();

                if (AppSession.SelectedUserExam.IsSubmitted || (aUserQuestion.HasAnswered && AppSession.SelectedUserExam.IsLearningMode))
                {
                    m_showQuestionAnswer = true;
                }
                else
                {
                    m_showQuestionAnswer = false;
                }
            }