Exemplo n.º 1
0
    public void save()
    {
        NotesDatabase database = new NotesDatabase();

        database.QueryNoResults("UPDATE notes SET text = '" + this.get_text() + "', " +
                                "color = '" + this.get_color() + "'" +
                                ", pos_x = " + this.get_pos_x() + " " +
                                ", pos_y = " + this.get_pos_y() + " " +
                                "WHERE id = " + this.get_id());
    }
Exemplo n.º 2
0
    public void AddNote(object obj, EventArgs args)
    {
        NotesDatabase database = new NotesDatabase();

        database.QueryNoResults("INSERT INTO notes (text, color, pos_x, pos_y) VALUES ('', '#ffffff', 100, 100)");

        NoteData   new_note_data = new NoteData("", RandomNoteColor(), 450, 450, database.get_last_id());
        NoteWindow new_window    = new NoteWindow(new_note_data, this.background_window);

        new_window.ShowAll();
        this.note_windows.Append(new_window);
    }
Exemplo n.º 3
0
	public void remove () {
		NotesDatabase database = new NotesDatabase();
		database.QueryNoResults("DELETE FROM notes WHERE id = " + this.get_id());		
	}
Exemplo n.º 4
0
	public void save () {
		NotesDatabase database = new NotesDatabase();
		database.QueryNoResults("UPDATE notes SET text = '" + this.get_text() + "', " + 
					    		"color = '" + this.get_color() + "'" +  
								", pos_x = " + this.get_pos_x() + " " + 
								", pos_y = " + this.get_pos_y() + " " + 
							   	"WHERE id = " + this.get_id());
	}
Exemplo n.º 5
0
	public void AddNote(object obj, EventArgs args){

		NotesDatabase database = new NotesDatabase();
		database.QueryNoResults("INSERT INTO notes (text, color, pos_x, pos_y) VALUES ('', '#ffffff', 100, 100)");

		NoteData new_note_data = new NoteData("", RandomNoteColor(), 450, 450, database.get_last_id());
		NoteWindow new_window = new NoteWindow(new_note_data, this.background_window);
		new_window.ShowAll();
		this.note_windows.Append(new_window);

	}
Exemplo n.º 6
0
    public void remove()
    {
        NotesDatabase database = new NotesDatabase();

        database.QueryNoResults("DELETE FROM notes WHERE id = " + this.get_id());
    }