bsp; {
txtFontStyle.Text = lstFontStyle.SelectedItem.ToString();
_myFont.SetFont(txtFont.Text, float.Parse(txtFontSize.Text), GetFontStyle(txtFontStyle.Text));
}
private void lstFontSize_SelectedIndexChanged(object sender, EventArgs e)
{
txtFontSize.Text = lstFontSize.SelectedItem.ToString();
_myFont.SetFont(txtFont.Text, float.Parse(txtFontSize.Text), GetFontStyle(txtFontStyle.Text)); [Page]
}
private void btnCancel_Click(object sender, EventArgs e)
{
_myFont.FontFamily = lstFont.Items[0].ToString();
_myFont.FontSize = 9f;
_myFont.NFontStyle = FontStyle.Regular;
this.Hide();
}
private void FrmFont_HelpRequested(object sender, HelpEventArgs hlpevent)
{
}
private void btnOK_Click(object sender, EventArgs e)
{
_myFont.FontFamily = txtFont.Text;
_myFont.NFontStyle = GetFontStyle(txtFontStyle.Text);
_myFont.FontSize = float.Parse(txtFontSize.Text);
// this.Hide();
}
得到用户选中的字体样式#region 得到用户选中的字体样式
private FontStyle GetFontStyle(string fontStyle)
{
&n