hand.cs

来自「中文名:Windows Forms 程序设计 英文名:Windows Form」· CS 代码 · 共 40 行

CS
40
字号
#region Using directives

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Text;

#endregion

namespace AlarmClockControlLibrary {

  [TypeConverter(typeof(HandConverter))]
  [Editor(typeof(HandEditor), typeof(UITypeEditor))]
  public class Hand {
    private Color _color = Color.Black;
    private int _width = 1;
    public Hand() {}
    public Hand(Color color, int width) {
      _color = color;
      _width = width;
    }

    //[System.ComponentModel.NotifyParentPropertyAttribute(true)]
    [DescriptionAttribute("Sets the color of the clock Hand.")]
    public Color Color {
      get { return _color; }
      set { _color = value; }
    }

    //[System.ComponentModel.NotifyParentPropertyAttribute(true)]
    [DescriptionAttribute("Sets the width of the clock Hand.")]
    public int Width {
      get { return _width; }
      set { _width = value; }
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?