public QuestionSplitView() : base() { if (AppSession.SelectedExamUserQuestionList == null) { AppSession.SelectedExamUserQuestionList = BusinessModel.UserQuestion.GetUserQuestionsBySQL(string.Format( "SELECT * FROM tblUserQuestion " + "WHERE fkUserExamID={0} ORDER BY Sequence", AppSession.SelectedUserExam.UserExamID)); } m_examQuestionListView = new ExamQuestionList_iPad(0); m_examQuestionListView.QuestionSelected += QuestionSelected; m_questionView = new Question_iPad(AppSession.SelectedExamUserQuestionList[0]); m_questionView.QuestionUpdated += QuestionUpdated; m_questionView.ViewedQuestionChanged += QuestionView_ViewedQuestionChanged; ViewControllers = new UIViewController[] { m_examQuestionListView, m_questionView }; this.ShouldHideViewController = delegate(UISplitViewController svc, UIViewController viewController, UIInterfaceOrientation inOrientation) { return(inOrientation == UIInterfaceOrientation.Portrait || inOrientation == UIInterfaceOrientation.PortraitUpsideDown); }; this.WillHideViewController += (object sender, UISplitViewHideEventArgs e) => { m_questionView.AddQuestionListButton(e.BarButtonItem); m_questionView.Popover = e.Pc; }; this.WillShowViewController += (object sender, UISplitViewShowEventArgs e) => { m_questionView.RemoveQuesitonListButton(); m_questionView.Popover = null; }; }
public QuestionFlyoutSplitView() : base() { if (AppSession.SelectedExamUserQuestionList == null) { AppSession.SelectedExamUserQuestionList = BusinessModel.UserQuestion.GetUserQuestionsBySQL(string.Format( "SELECT * FROM tblUserQuestion " + "WHERE fkUserExamID={0} ORDER BY Sequence", AppSession.SelectedUserExam.UserExamID)); } m_examQuestionListView = new ExamQuestionList_iPad(0); m_questionView = new Question_iPad(AppSession.SelectedExamUserQuestionList[0]); ViewControllers = new UIViewController[] { m_examQuestionListView, m_questionView }; }