06-系统操作/虚拟键盘/虚拟键盘/FecitButton.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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


using System.Drawing.Drawing2D;

namespace 虚拟键盘
{
    public partial class FecitButton : Button
    {
        public FecitButton()
        {
            InitializeComponent();
            base.Font = new Font("宋体", 9.75F, FontStyle.Bold);
            base.Width = 26;
            base.Height = 25;
        }

        private Color Color_Brush = Color.MediumPurple;
        private Color Color_Pen = Color.Indigo;
        public static bool MouseE = false;

        private bool TChecked = false;
        [Browsable(true), Category("按钮操作"), Description("设置按钮是否被按下,如按下,则为true")]
        public bool Checked
        {
            get { return TChecked; }
            set
            {
                TChecked = value;
                Invalidate();
            }
        }

        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            Color tem_colorb = Color_Brush;
            Color tem_colorp = Color_Pen;
            if (Checked)
            {
                Color_Brush = Color.Pink;
                Color_Pen = Color.PaleVioletRed;
            }
            else
            {
                Color_Brush = tem_colorb;
                Color_Pen = tem_colorp;
            }
            SolidBrush tem_Brush = new SolidBrush(Color_Brush);
            Pen tem_Pen = new Pen(new SolidBrush(Color_Pen), 2);
            e.Graphics.FillRectangle(tem_Brush, 0, 0, this.Width, this.Height);
            e.Graphics.DrawRectangle(tem_Pen, 1, 1, this.Width - 2, this.Height - 2);
            ProtractText(e.Graphics);
        }
后面还有 46 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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