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"); } }
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")); }