/// <summary>
        /// Called when the user pressed the "Discussion Guide" button in the primary cell
        /// </summary>
        public void DiscussionGuideButtonClicked( )
        {
            NotesDiscGuideViewController viewController = new NotesDiscGuideViewController(Task);

            viewController.DiscGuideURL = SeriesEntries[0].Series.GetLatestMessage( ).DiscussionGuideUrl;

            Task.PerformSegue(this, viewController);
        }
示例#2
0
        public void RowClicked(int row, int buttonIndex)
        {
            // 0 would be the audio button
            if (buttonIndex == 0)
            {
                NotesWatchUIViewController viewController = new NotesWatchUIViewController( );
                viewController.MediaUrl  = Series.Messages[row].AudioUrl;
                viewController.ShareUrl  = Series.Messages[row].ShareUrl;
                viewController.Name      = Series.Messages[row].Name;
                viewController.AudioOnly = true;

                Task.PerformSegue(this, viewController);
            }
            // 1 would be the watch button
            else if (buttonIndex == 1)
            {
                NotesWatchUIViewController viewController = new NotesWatchUIViewController( );
                viewController.MediaUrl  = Series.Messages[row].WatchUrl;
                viewController.ShareUrl  = Series.Messages[row].ShareUrl;
                viewController.Name      = Series.Messages[row].Name;
                viewController.AudioOnly = false;

                Task.PerformSegue(this, viewController);
            }
            // 2 would be the Discussion Guide
            else if (buttonIndex == 2)
            {
                NotesDiscGuideViewController viewController = new NotesDiscGuideViewController(Task);
                viewController.DiscGuideURL = Series.Messages[row].DiscussionGuideUrl;

                Task.PerformSegue(this, viewController);
            }
            // and 3 would be the last button, which is Notes
            else if (buttonIndex == 3)
            {
                // maybe technically a hack...we know our parent is a NoteTask,
                // so cast it so we can use the existing NotesViewController.
                NotesTask noteTask = Task as NotesTask;
                if (noteTask != null)
                {
                    noteTask.NoteController.NoteName = Series.Messages[row].Name;
                    noteTask.NoteController.NoteUrl  = Series.Messages[row].NoteUrl;

                    Task.PerformSegue(this, noteTask.NoteController);
                }
            }
        }