Beispiel #1
0
 /// <summary>
 /// Returns true if this object is equal to <c>obj</c>.
 /// </summary>
 /// <remarks>
 /// This is an overloaded Equals implementation taking a
 /// Note object to improve performance as a cast is not
 /// required.
 /// </remarks>
 /// <param name="other">
 /// Note object to compare against.
 /// </param>
 public bool Equals(Note other) {
     return NoteID == other.NoteID;
 }
 public static Note Create()
 {
     Note note = new Note() {
         Title = "New Note #" + ++docNum
     };
     return note;
 }
 private void OpenNote(Note note) {
     documentController.OpenDocument(new NoteEditorModel(note));
 }
 public void DeleteNote(Note note)
 {
     StaticNoteDataStore.Delete(note);
 }
 public static void Delete(Note note)
 {
     if (notes.ContainsKey(note.NoteID)) {
         notes.Remove(note.NoteID);
     }
 }
Beispiel #6
0
 /// <summary>
 /// Creates a new instance of <c>NoteEditorModel</c>.
 /// </summary>
 public NoteEditorModel(Note note)
 {
     Note = note;
     view = new NoteEditor();
     view.DataContext = this;
 }
Beispiel #7
0
 /// <summary>
 /// Returns true if this object is equal to <c>obj</c>.
 /// </summary>
 /// <remarks>
 /// This is an overloaded Equals implementation taking a
 /// Note object to improve performance as a cast is not
 /// required.
 /// </remarks>
 /// <param name="other">
 /// Note object to compare against.
 /// </param>
 public bool Equals(Note other)
 {
     if (Guid.Empty.Equals(gid)) {
         return NoteID == other.NoteID;
     } else {
         return gid.Equals(other.gid);
     }
 }
 public static Note Create() {
     int id = NextID();
     Note note = new Note(id, "New Note #" + id);
     notes.Add(note.NoteID, note);
     return note;
 }