⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9.3.txt

📁 《Microsoft Visual C# .NET 2003开发技巧大全》源代码
💻 TXT
字号:
Listing 9.3 Properties of a Control with Design-Time Attributes
[Description(“Percentage of gauge that is filled.”),Category(“Data”),
ParenthesizePropertyNameAttribute(true), DefaultValue(100)]
public int Percentage
{
get
{
return percent;
}
set
{
if( value < 0 || value > 100 )
return;
percent = value;
Invalidate();
}
}
[Category(“Appearance”), Description(“Color of filled gauge.”),
ParenthesizePropertyNameAttribute(true), DefaultValue(typeof(Color), “Red”)]
public Color GaugeColor
{
get
{
return gaugeColor;
}
set
{
gaugeColor = value;
Invalidate();
}
}
[Description(“Filename to log runtime data to.”),
Category(“Behavior”),
ParenthesizePropertyNameAttribute(true),
EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor),
typeof(System.Drawing.Design.UITypeEditor))
]
public string LogFile
{
get
{
return fileName;
}
set
{
fileName = value;
}
}

⌨️ 快捷键说明

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