private void workbinListTapped(object sender, TappedRoutedEventArgs e)
        {
            _currentWorkbin = _currentModule.moduleWorkbins[workbinList_snapped.SelectedIndex];

            folder.Source = _currentWorkbin.workbinFolders;
            file.Source = new List<DataStructure.File>();

            _folderTree.Clear();
            upFolderButton.Visibility = Visibility.Collapsed;
            upFolderButton_snapped.Visibility = Visibility.Collapsed;
        }
 public WorkbinWrapper(Workbin[] ws, String cs)
 {
     workbins = ws;
     comments = cs;
 }
        private void itemListReleased(object sender, PointerRoutedEventArgs e)
        {
            isRightClicking = false;
            DataStructure.ModuleItem selectedItem = (e.OriginalSource as FrameworkElement).DataContext as DataStructure.ModuleItem;

            // make sure the tap event occurs on list items
            if (selectedItem != null && selectedItem != _currentItem)
            {
                switch (selectedItem.itemType)
                {
                    case DataStructure.ItemType.ANNOUNCEMENT:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 1;
                        break;

                    case DataStructure.ItemType.GRADEBOOK:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 3;
                        break;

                    case DataStructure.ItemType.ABOUT:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 0;
                        break;

                    case DataStructure.ItemType.WEBCAST:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 5;

                        // generate a complete list of video files
                        // and store under webcast object
                        _currentModule.moduleWebcasts[selectedItem.itemIndex].GenerateVideoFileList();
                        webcastGridViews.Source = _currentModule.moduleWebcasts[selectedItem.itemIndex].webcastAllVideoFiles;
                        playerStackpanel.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                        webcastGridView.Visibility = Windows.UI.Xaml.Visibility.Visible;
                        break;

                    case DataStructure.ItemType.WORKBIN:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 2;

                        _currentWorkbin = _currentModule.moduleWorkbins[selectedItem.itemIndex];

                        folder.Source = _currentWorkbin.workbinFolders;
                        file.Source = new List<DataStructure.File>();

                        _folderTree.Clear();
                        upFolderButton.Visibility = Visibility.Collapsed;
                        upFolderButton_snapped.Visibility = Visibility.Collapsed;

                        break;

                    case DataStructure.ItemType.FORUM:
                        flipView.SelectedItem = null;
                        flipView.SelectedIndex = 4;

                        _currentForumIndex = selectedItem.itemIndex;

                        // generate content for display
                        updateForum();

                        headers.Source = _currentModule.moduleForums[selectedItem.itemIndex].forumAllTitles;
                   
                        break;

                    default:
                        break;
                }

                _currentItem = selectedItem;
            }
        }