internal void addNote(Note n) { if (n != null && !this.notes.ContainsKey(n.ID)) { this.notes.Add(n.ID, n); } }
private Note getNote(int id) { NoteWindow win = null; foreach (NoteWindow nw in this.notes) { if (nw.ID == id) { win = nw; break; } } if (win != null) { Note ret = new Note(id, win.text.Text, (int) win.Left, (int) win.Top, (int) win.col, (int) win.Width, (int) win.Height); return ret; } return null; }
private NoteWindow createNoteWindow(Note n) { var newWindow = new NoteWindow(this,n.ID); this.notes.Add(newWindow); newWindow.Left = n.x; newWindow.Top = n.y; newWindow.text.Text = n.value; newWindow.col = n.col; newWindow.changeColor(); newWindow.ShowInTaskbar = false; newWindow.Width = n.w; newWindow.Height = n.h; return newWindow; }
private NoteWindow createNewNote() { Note tmp = new Note(this.dm.getID()); tmp.x = (int) sw / 2; tmp.y = (int) sh / 2; this.dm.addNote(tmp); return createNoteWindow(tmp); }
internal void updateNote(Note n) { if (this.notes.ContainsKey(n.ID)) { this.notes.Remove(n.ID); this.notes.Add(n.ID, n); } }