public void Save(bool IncludeChildren)
{
if (this.ID == "")
{
this.ID = db.GetNewID("glyphs");
db.ExecuteCommand("insert into glyphs (glyph_id, glyph_font_id, glyph_unicode, glyph_frequency, glyph_x_offset, glyph_y_offset) values (" + this.ID + ", " + this.FontID + ", '" + db.FixString(this.Unicode) + "', " + this.Frequency + ", " + this.XOffset + ", " + this.YOffset + ")");
}
else
{
db.ExecuteCommand("update glyphs set glyph_font_id = " + this.FontID + ", " +
"glyph_unicode = '" + db.FixString(this.Unicode) + "', " +
"glyph_frequency = " + this.Frequency + ", " +
"glyph_x_offset = " + this.XOffset + ", " +
"glyph_y_offset = " + this.YOffset + " " +
"where glyph_id = " + this.ID);
if (this.Images != null && IncludeChildren)
{
for (int x = 0; x < this.Images.Count; x++)
{
this.Images[x].Save();
}
}
}
}