if textBoxCollectionInitialNumber.Text , is not numbered from 1, there will be an exception;
haierzld opened this issue · comments
haierzld commented
private void OnCollectionItemProcessed(object sender, ImageEventArgs e)
{
// 从0,或者大于1开始,会有异常
var initialNumber = e.CollectionItemId - (int.Parse(this.textBoxCollectionInitialNumber.Text) - 1);
var status = string.Format(Resource.PROCESSING_COLLECTION_ITEM, initialNumber, this.textBoxCollectionSize.Text);
// var status = string.Format(Resource.PROCESSING_COLLECTION_ITEM, e.CollectionItemId, this.textBoxCollectionSize.Text);
this.Invoke(new Action(() =>
{
this.toolStripStatus.Text = status;
this.toolStripProgressBar.Maximum = int.Parse(this.textBoxCollectionSize.Text);
this.toolStripProgressBar.Value = initialNumber;
}));
}