in DIXFSamples/RecurringIntegrationApp/Views/DIXFRecurringJobsProcessor.cs [96:150]
public void updateStats(StatType statType, int count)
{
int tmpCount = 0;
switch (statType)
{
case StatType.Input:
if (this.InvokeRequired)
{
this.submittedJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
}
lock (stateLock)
{
tmpCount = count;
}
this.submittedJobsLabel.Text = tmpCount.ToString();
break;
case StatType.Inprocess:
if (this.InvokeRequired)
{
this.inProcessJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
}
lock (stateLock)
{
tmpCount = count;
}
this.inProcessJobsLabel.Text = tmpCount.ToString();
break;
case StatType.Success:
if (this.InvokeRequired)
{
this.successJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
}
lock (stateLock)
{
tmpCount = count;
}
this.successJobsLabel.Text = tmpCount.ToString();
break;
case StatType.Failure:
if (this.InvokeRequired)
{
this.failedJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
}
lock (stateLock)
{
tmpCount = count;
}
this.failedJobsLabel.Text = count.ToString();
break;
}
}