private void RefreshCharList()
{
if (SelectedGlyph > -1)
{
myFont.Glyphs[SelectedGlyph].Save(false);
}
imagePanel.Controls.Clear();
if (myFont != null)
{
SelectedGlyph = myFont.FindGlyph(((App_Code.Glyph)glyphBox.SelectedItem).Unicode);
displaySizeBar.Enabled = true;
remAllButton.Enabled = true;
reclassifyButton.Enabled = true;
clipboardButton.Enabled = true;
delGlyphButton.Enabled = true;
CheckPagingValues();
if (SelectedGlyph > -1)
{
xOffsetBox.Value = System.Convert.ToDecimal(myFont.Glyphs[SelectedGlyph].XOffset);
yOffsetBox.Value = System.Convert.ToDecimal(myFont.Glyphs[SelectedGlyph].YOffset);
for (int x = PageStart; x < PageStop; x++)
{
Button B = new Button();
B.Name = myFont.Glyphs[SelectedGlyph].Images[x].ID;
if (File.Exists(db.DataDirectory + myFont.Glyphs[SelectedGlyph].Images[x].Path))
{
using (FileStream stream = new FileStream(db.DataDirectory + myFont.Glyphs[SelectedGlyph].Images[x].Path, FileMode.Open, FileAccess.Read))
{
B.Image = Image.FromStream(stream);
}
B.Height = DisplaySize;
B.Width = DisplaySize;
if (myFont.Glyphs[SelectedGlyph].Images[x].Status == "REM")
{
B.BackColor = Color.Red;
B.ForeColor = Color.Red;
}
B.ContextMenuStrip = imageContextMenu;
B.Click += imageButton_Click;
//B.MouseUp += B_MouseClick;
imagePanel.Controls.Add(B);
}
}
}
}
}