91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-04
  • 語言: C#
  • 標簽: button??

資源簡介

重寫Buttion 實現鼠標移上去改變顏色 和鼠標移出來改變顏色

資源截圖

代碼片段和文件信息

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.Reflection;

namespace?QLFUI
{
????[DefaultEvent(“Click“)]
????public?partial?class?Button?:?UserControl
????{
????????#region?變量

????????//三種不同狀態下的圖片
????????Image?_normalImage?=?null;
????????Image?_moveImage?=?null;
????????Image?_downImage?=?null;?

????????private?string?_value;
????????private?string?_parentValue;
????????private?string?_parentText;
????????#endregion

????????#region?屬性
????????[Description(“實際值“)?Category(“QLFSkinDll“)]
????????public?string?Value
????????{
????????????get
????????????{
????????????????return?_value;

????????????}
????????????set
????????????{
????????????????_value?=?value;
????????????}
????????}
????????[Description(“父級實際值“)Category(“QLFSkinDll“)]
????????public?string?ParentValue
????????{
????????????get
????????????{
????????????????return?_parentValue;

????????????}
????????????set
????????????{
????????????????_parentValue?=?value;
????????????}
????????}
????????[Description(“父級顯示值“)Category(“QLFSkinDll“)]
????????public?string?ParentText
????????{
????????????get
????????????{
????????????????return?_parentText;

????????????}
????????????set
????????????{
????????????????_parentText?=?value;
????????????}
????????}

????????[Category(“QLFSkinDll“)]
????????public?Image?NormalImage
????????{
????????????get
????????????{
????????????????return?_normalImage;

????????????}
????????????set
????????????{
????????????????_normalImage?=?value;
????????????}
????????}

????????[Category(“QLFSkinDll“)]
????????public?Image?DownImage
????????{
????????????get?{?return?_downImage;?}
????????????set
????????????{
????????????????_downImage?=?value;
????????????}
????????}

????????[Category(“QLFSkinDll“)]
????????public?Image?MoveImage
????????{
????????????get?{?return?_moveImage;?}
????????????set
????????????{
????????????????_moveImage?=?value;
????????????}
????????}

????????[Category(“QLFSkinDll“)]
????????public?string?Caption
????????{
????????????get?{?return?this.label1.Text;?}???//控件運行時會自動運行get方法得到值
????????????set
????????????{
????????????????this.label1.Text?=?value;
????????????}
????????}
????????private?Color?_MoveColor?=?Color.FromArgb(255?255?255);//

????????private?Color?_MoveOutColor?=?Color.FromArgb(93?93?93);//
????????[Category(“QLFSkinDll“)]
????????public?Color?MoveColor
????????{
????????????get
????????????{
????????????????return?this._MoveColor;
????????????}
????????????set
????????????{
????????????????this._MoveColor?=?value;
????????????????this.Invalidate();
????????????}
????????}
????????[Category(“QLFSkinDll“)]
????????public?Color?MoveOutColor
????????{
????????????get
????????????{
????????????????return?this._MoveOutColor;
??????

評論

共有 條評論