【发布时间】:2016-07-12 05:07:35
【问题描述】:
我想根据文本文件上的内容更改某些标签的背景:
private void Form3_Load(object sender, EventArgs e)
{
string[] words = new string[7];
StreamReader read = new StreamReader(path);
while(!read.EndOfStream)
{
string line = read.ReadLine();
words = line.Split(';');
if(words[6] == "no")
{
//-----What I have to write here---
}
}
read.Close();
}
有超过 50 个标签名为“lbl101”、“lbl102”、“....”、“lbl150”
【问题讨论】:
-
我认为它不清楚你在问什么。你想在什么条件下贴标签?
-
把它们全部放在一个堆栈上并改变它的颜色?