TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ilhami caliskan
NA
76
91.7k
c#
Jul 19 2014 6:23 PM
Hi All,
is there a better way to do this?
private void handleA100ModelUpdate()
{
if (_a100SafetyModel.A100SafetyStatus[0] == true)
{
this.customTxtBox1.IoList[0].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[0].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[1] == true)
{
this.customTxtBox1.IoList[1].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[1].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[2] == true)
{
this.customTxtBox1.IoList[2].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[2].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[3] == true)
{
this.customTxtBox1.IoList[3].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[3].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[4] == true)
{
this.customTxtBox1.IoList[4].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[4].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[5] == true)
{
this.customTxtBox1.IoList[5].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[5].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[6] == true)
{
this.customTxtBox1.IoList[6].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[6].BackColor = Color.White;
if (_a100SafetyModel.A100SafetyStatus[7] == true)
{
this.customTxtBox1.IoList[7].BackColor = Color.FromA#c0ffc0;
}
else
this.customTxtBox1.IoList[7].BackColor = Color.White;
}
thanx a lot
Reply
Answers (
2
)
VocEnhancer
Detect Device information that Open Mail ?