コード例 #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());
    }
コード例 #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);
    }
コード例 #3
0
ファイル: main.cs プロジェクト: modulexcite/Sticky
	public void remove () {
		NotesDatabase database = new NotesDatabase();
		database.QueryNoResults("DELETE FROM notes WHERE id = " + this.get_id());		
	}
コード例 #4
0
ファイル: main.cs プロジェクト: modulexcite/Sticky
	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());
	}
コード例 #5
0
ファイル: main.cs プロジェクト: modulexcite/Sticky
	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);

	}
コード例 #6
0
    public void remove()
    {
        NotesDatabase database = new NotesDatabase();

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