コード例 #1
0
        /// <summary>
        /// Application bar Home click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Home_Click(object sender, EventArgs e)
        {
            SearchBox_LoseFocus();

            if (session != null)
            {
                skyDriveFileDao = new SkyDriveFileDao(session);
                skyDriveFileDao.TraverseDirectory();
                skyDriveFileDao.FilesListBox = FirstListBox;
            }
        }
コード例 #2
0
 private void Search(string searchTerm)
 {
     if (session != null && (DateTimeOffset.Now < session.Expires))
     {
         skyDriveFileDao = new SkyDriveFileDao(session);
         // todo need to SEARCH
         skyDriveFileDao.TraverseDirectory(searchTerm);
     }
     else
     {
         Debug.WriteLine("You must sign in first.");
     }
 }
コード例 #3
0
        /// <summary>
        /// Application bar Refresh click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Refresh_Click(object sender, EventArgs e)
        {
            SearchBox_LoseFocus();

            if (session != null && (DateTimeOffset.Now < session.Expires))
            {
                skyDriveFileDao = new SkyDriveFileDao(session);
                skyDriveFileDao.TraverseDirectory(currentDirectoryFileInfo);
            }
            else
            {
                Debug.WriteLine("You must sign in first.");
            }
        }
コード例 #4
0
        /// <summary>
        /// Selecting an object in the ListBox
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void StackPanel_Tap(object sender, GestureEventArgs e)
        {
            //  var content = (TextBlock)sender;
            object   item     = ((StackPanel)sender).DataContext;
            FileInfo fileInfo = (FileInfo)item;

            currentDirectoryFileInfo = fileInfo;

            Debug.WriteLine("NAME: " + fileInfo.Name + "ID: " + fileInfo.Id);

            if ((session != null) && (DateTimeOffset.Now < session.Expires))
            {
                //   parentFolderId = fileInfo.ParentId;
                skyDriveFileDao = new SkyDriveFileDao(session);
                skyDriveFileDao.TraverseDirectory(fileInfo);
                skyDriveFileDao.FilesListBox = FirstListBox;
            }
            else
            {
                Debug.WriteLine("You must sign in first.");
            }
        }