Exemplo n.º 1
0
 internal void addNote(Note n)
 {
     if (n != null && !this.notes.ContainsKey(n.ID))
     {
         this.notes.Add(n.ID, n);
     }
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 internal void updateNote(Note n)
 {
     if (this.notes.ContainsKey(n.ID))
     {
         this.notes.Remove(n.ID);
         this.notes.Add(n.ID, n);
     }
 }