コード例 #1
0
ファイル: FormSample.cs プロジェクト: yzwbrian/FontAwesome
        private void cmbFontAwesomeType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cmbFontAwesomeType.SelectedIndex < 0)
            {
                return;
            }
            FontAwesome.IconSize = (int)this.nudIconSize.Value;
            if (this.cmbBackColor.SelectedIndex > -1)
            {
                FontAwesome.BackColer = Color.FromName(this.cmbBackColor.Text);
            }
            if (this.cmbBorderColor.SelectedIndex > -1)
            {
                FontAwesome.BorderColer = Color.FromName(this.cmbBorderColor.Text);
            }
            if (this.cmbForeColor.SelectedIndex > -1)
            {
                FontAwesome.ForeColer = Color.FromName(this.cmbForeColor.Text);
            }
            FontAwesome.BorderVisible = this.cbShowBorder.Checked == true;

            int    val = FontAwesome.TypeDict[this.cmbFontAwesomeType.Text];
            Bitmap bmp = FontAwesome.GetImage(val);//f188

            this.panel1.BackgroundImage = bmp;
            this.Icon = FontAwesome.GetIcon(val);//f188;
        }