我还是使用Nft.net这个工程,但是他其中有一小段代码有问题,比如我想从3号开始生成,总共10个,那他执行到编号为11时,就会报错;我把这个会错的代码改过来传上来:
if textBoxCollectionInitialNumber.Text , is not numbered from 1, there will be an exception; #18
===============================
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;
}));
}
网友评论