ImageEditor/frmInsertText.cs

(完整代码) 1KB

using System;
using System.Drawing;
using System.Windows.Forms;

namespace ImageEditor
{
    public partial class frmInsertText : Form
    {
        private Font _selectedFont;

        public Font SelectedFont
        {
            get { return _selectedFont; }
        }
        public string SelectedText
        {
            get { return txtToInsert.Text; }
        }

        public frmInsertText()
        {
            InitializeComponent();
            _selectedFont = txtToInsert.Font;
        }

        private void cmdCustomFont_Click(object sender, EventArgs e)
        {
            using (FontDialog fontDlg = new FontDialog())
            {
                fontDlg.Font = _selectedFont;
                fontDlg.FontMustExist = true;
                fontDlg.ShowEffects = false;
                fontDlg.ShowColor = false;
                fontDlg.ShowApply = false;
                fontDlg.ScriptsOnly = false;
                if (fontDlg.ShowDialog() == DialogResult.OK)
                {
                    _selectedFont = fontDlg.Font;
                }
            }
        }


        private void txtToInsert_KeyUp(object sender, KeyEventArgs e)
        {
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。