private bool ClickFontName(ref string fontname) { bool aresult = false; using (FontDialog ndialog = new FontDialog()) { // Search for other properties Font nfont = CreateOriginalFont(); ndialog.Font = new Font(fontname, nfont.Size, nfont.Style); if (ndialog.ShowDialog() == DialogResult.OK) { fontname = ndialog.Font.Name; SetNewFont(fontname, (int)Math.Round(ndialog.Font.Size), GraphicUtils.IntegerFromFontStyle(ndialog.Font.Style)); aresult = true; } } return(aresult); }
private void ClickFontStyle(object sender, EventArgs e) { using (FontDialog ndialog = new FontDialog()) { // Search for other properties Font nfont = CreateOriginalFont(); ndialog.Font = new Font(nfont.FontFamily, nfont.Size, nfont.Style); if (ndialog.ShowDialog() == DialogResult.OK) { SetNewFont(ndialog.Font.FontFamily.ToString(), (int)Math.Round(ndialog.Font.Size), GraphicUtils.IntegerFromFontStyle(ndialog.Font.Style)); } } }