CSReportEditor.fProperties.cmd_font_Click C# (CSharp) Метод

cmd_font_Click() приватный Метод

private cmd_font_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void
        private void cmd_font_Click(object sender, EventArgs e)
        {
            
            fontDialog.ShowEffects = true;

            FontStyle fontStyle = FontStyle.Regular;
            if (chkFontBold.Checked) fontStyle = fontStyle | FontStyle.Bold;
            if (chkFontItalic.Checked) fontStyle = fontStyle | FontStyle.Italic;
            if (chkFontUnderline.Checked) fontStyle = fontStyle | FontStyle.Underline;
            if (chkFontStrike.Checked) fontStyle = fontStyle | FontStyle.Strikeout;

            float fontSize = (float)cUtil.val(txFontSize.Text);
            Font font = new Font(txFont.Text, ((fontSize > 0f) ? fontSize : 3f), fontStyle);

            fontDialog.Font = font;
            fontDialog.Color = cColor.colorFromRGB(cUtil.valAsInt(txForeColor.Text));

	        DialogResult result = fontDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                font = fontDialog.Font;

                txFont.Text = font.Name;
                chkFontBold.Checked = font.Bold;
                chkFontItalic.Checked = font.Italic;
                chkFontUnderline.Checked = font.Underline;
                chkFontStrike.Checked = font.Strikeout;
                txFontSize.Text = font.Size.ToString();
                txForeColor.Text = fontDialog.Color.ToArgb().ToString();
                shForeColor.BackColor = fontDialog.Color;
            }            
        }
fProperties