Пример #1
0
 public void DeleteNote(RtmTask rtmTask, RtmNote note)
 {
     if (rtm != null)
     {
         try {
             rtm.NotesDelete(timeline, note.ID);
         } catch (Exception e) {
             Logger.Debug("RtmBackend.DeleteNote: Unable to delete note");
             Logger.Debug(e.ToString());
         }
     }
     else
     {
         throw new Exception("Unable to communicate with Remember The Milk");
     }
 }
Пример #2
0
        public static void DeleteNote(string noteId)
        {
            try {
                rtm.NotesDelete(timeline, noteId);
            } catch (RtmException e) {
                Log <RTM> .Debug(e.Message);

                return;
            }

            lock (note_lock)
                notes.Remove(notes.Find(i => (i as RTMNoteItem).Id == noteId));

            FinalizeAction(AddinManager.CurrentLocalizer.GetString("Note Deleted"),
                           AddinManager.CurrentLocalizer.GetString("The selected note has been deleted from the selected task"));
        }