using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FYEDrawDemo_CSharp
{
    public partial class FontPropForm : Form
    {
        public int m_iSeqNum;
        public string m_sFontStyle;    //0Arial 1Candara 2Fixedsys 3System 4等线 5方正舒体 6黑体 7华文行楷 8楷体 9宋体 10微软雅黑 11幼圆
        public int m_iFontSize;
        public int m_iFontColor;

        public FontPropForm()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            m_iSeqNum = Int32.Parse(txtSeqNum.Text);
            m_sFontStyle = cmbFontType.Text;
            m_iFontColor = Int32.Parse(txtFontColor.Text);
            m_iFontSize = Int32.Parse(txtFontSize.Text);

            this.DialogResult = DialogResult.OK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void FontPropForm_Load(object sender, EventArgs e)
        {
            cmbFontType.Items.Add("Arial");
            cmbFontType.Items.Add("Candara");
            cmbFontType.Items.Add("Fixedsys");
            cmbFontType.Items.Add("System");
            cmbFontType.Items.Add("等线");
            cmbFontType.Items.Add("方正舒体");
            cmbFontType.Items.Add("黑体");
            cmbFontType.Items.Add("华文行楷");
            cmbFontType.Items.Add("楷体");
            cmbFontType.Items.Add("宋体");
            cmbFontType.Items.Add("微软雅黑");
            cmbFontType.Items.Add("幼圆");

            txtSeqNum.Text = string.Format("{0}", m_iSeqNum);
            cmbFontType.Text = m_sFontStyle;
            txtFontSize.Text = string.Format("{0}", m_iFontSize);
            txtFontColor.Text = string.Format("{0}", m_iFontColor);
        }
    }
}
