void OnSyncStepped(object sender, DropboxSyncEventArgs e)
 {
   ThreadUtil.UiCall(() =>
     {
       _syncbox.UpdateDescription(e.Message);
       _syncbox.UpdateProgress(e.TotalUploadingFiles,
                               e.NumUploadedFiles,
                               e.TotalDownloadingFiles,
                               e.NumDownloadedFiles);
     });
 }
    /// <summary>
    /// Sync finished
    /// </summary>
    /// <param name="sender">Event sender</param>
    /// <param name="e">Event parameter</param>
    void OnSyncFinished(object sender, DropboxSyncEventArgs e)
    {
      ThreadUtil.UiCall(() =>
        {
          if (e.Result != DropboxSyncResult.Success
            && e.Result != DropboxSyncResult.NothingChanged)
          {
            var errmsg =
              string.Format("{0}\nResult:{1}",
                      e.ErrorMessage,
                      e.Result.ToString());
            MessageBox.Show(errmsg,
                            "Sync Failed",
                            MessageBoxButton.OK);

            GoToVisualState(VS_NORMAL);
            return;
          }

          _syncbox.SyncFinished(e.Result);
        });
    }
 void OnSyncStarted(object sender, DropboxSyncEventArgs e)
 {
   _syncbox.SetSyncInfo(e.TotalUploadingFiles,
                        e.TotalDownloadingFiles);
 }