public void showStep(int stepNumber)
{
foreach (Control ctrl in this.Controls)
{
if (ctrl.Name.StartsWith("lblStep"))
{
int lblNumber = Convert.ToInt32(ctrl.Name.Replace("lblStep", "").TrimStart('0'));
if (lblNumber <= stepNumber)
{
bool canBeEnabled = !_serverSteps.Contains(lblNumber) || !Common.WorkingDefinition.IsClientObjectModel;
if (canBeEnabled)
{
ctrl.Enabled = true;
((LinkLabel) ctrl).Links[0].Enabled = true;
Control[] ctrls = this.Controls.Find("pictureBox" + lblNumber, false);
if (ctrls.Length > 0)
{
((PictureBox) ctrls[0]).Image = Resources.temp_icona_12;
}
}
}
}
}
}