• λ我爱Aspx >> Asp.Net >> 使用C# 编写扩展存储过程
  • 使用C# 编写扩展存储过程

  • :未知  Դ:internet  :2007-5-20 16:44:08  ؼ:c#
  • public event PercentChangeHandler OnPercentChange;

    public int CurrentPercent

    {

    get

    {

    return iCurPercent;

    }

    set

    {

    if ((value <= 100) && (value >= 0))

    {

    iCurPercent = value;

    if (OnPercentChange != null)

    OnPercentChange(iCurPercent);

    this.Invalidate();

    }

    }

    }

    public Color PercentBackColor

    {

    get

    {

    return clPercent;

    }

    set

    {

    clPercent = value;

    this.Invalidate();

    }

    }

    public Color PercentTextColor

    {

    get

    {

    return clText;

    }

    set

    {

    clText = value;

    this.Invalidate();

    }

    }

    以上首先定义了事件,并在百分比改变时触发。然后是三个属性的实现。

    下面,需要在Paint事件里改变Percent控制的显示状态。切换到设计页面,选择整个设计面板,在属性视图中将光标移动到Paint,按回车,代码页面里就自动为Paint事件建立了框架,其中其一个参数为System.Windows.Forms.PaintEventArgs e,可以用这个参数干很多事情。先输入以下画百分比控制边界的代码:

    Ҷƪл˵?
  • һƪ用浏览器来接收C# 的程序返回的时间cool!
    һƪC#正则表达式应用范例