Example #1
0
 /// <summary>
 /// New menu item is clicked
 /// </summary>
 /// <param name="sender">Event sender</param>
 /// <param name="e">Event parameter</param>
 void OnNewMenuItemClicked(
         object sender,
         PopupMenuEventArgs e)
 {
   switch (e.MenuId)
   {
     case MNU_ID_NEW_TEXT_MEMO:
       NewTextMemo();
       break;
     case MNU_ID_NEW_GALLERY:
       var chooser = new PhotoChooserTask();
       chooser.Completed += new EventHandler<PhotoResult>(OnPhotoSelected);
       chooser.ShowCamera = true;
       chooser.Show();
       break;
     case MNU_ID_NEW_CAMERA:
       var cameratask = new CameraCaptureTask();
       cameratask.Completed += new EventHandler<PhotoResult>(OnPhotoSelected);
       cameratask.Show();
       break;
   }
 }
Example #2
0
    /// <summary>
    /// Sync menu item is clicked
    /// </summary>
    /// <param name="sender">Event sender</param>
    /// <param name="e">Clicked menu item</param>
    void OnSyncMenuItemClicked(object sender, PopupMenuEventArgs e)
    {
      switch (e.MenuId)
      {
        case MNU_ID_SYNC:
          Sync();
          break;
        case MNU_ID_DROPBOX_LOGOUT:
          var result = MessageBox.Show("Are you sure to sign out DropBox sync?",
                                       "Confirmation",
                                       MessageBoxButton.OKCancel);
          if (result == MessageBoxResult.OK)
            _vm.ClearSync();

          break;
      }
    }