Franken_.App_Code.Font.RefreshGlyphs C# (CSharp) Method

RefreshGlyphs() public method

public RefreshGlyphs ( bool LoadImages ) : void
LoadImages bool
return void
        public void RefreshGlyphs(bool LoadImages)
        {
            this.Glyphs.Clear();

            if (this.ID != "")
            {
                if (db.GetRows("select glyph_id from glyphs where glyph_font_id = " + this.ID + " order by glyph_unicode asc"))
                {
                    DataTable GlyphTable = db.Bucket.Copy();

                    for (int x = 0; x < GlyphTable.Rows.Count; x++)
                    {
                        Glyph G = new Glyph(GlyphTable.Rows[x][0].ToString(), LoadImages);
                        Glyphs.Add(G);
                    }
                }
            }
        }

Usage Example

Example #1
0
 private void reclassifyButton_Click(object sender, EventArgs e)
 {
     if (myFont != null && SelectedGlyph > -1)
     {
         Reclassify reclassWindow = new Reclassify(myFont.ID, myFont.Glyphs[SelectedGlyph].ID);
         if (reclassWindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.Enabled = false;
             myFont.RefreshGlyphs(true);
             RefreshGlyphBox();
             this.Enabled = true;
         }
     }
 }