【发布时间】:2014-02-07 03:35:03
【问题描述】:
我目前有以下方法
public void printTitle(string title){
// settings for stringformat
g.DrawString(title, drawFontTitle, Brushes.White, x, y, stringFormatTitle);
}
但是,我试图让输入定义标题的颜色,如下所示:
public void printTitle(string title, Brushes titleColor){
// settings for stringformat
g.DrawString(title, drawFontTitle, titleColor, x, y, stringFormatTitle);
}
它会这样使用:
printTitle("Title Text", Brushes.White);
但是,我认为在声明导致错误的 Brushes titleColor 时存在问题。
【问题讨论】:
-
您(和其他所有人)可以通过单击您姓名旁边的 'edited... ago' 链接查看谁编辑了什么 bij。所以没有必要添加感谢和其他噪音.. ;-)