ptedeschi / NFT.net

An engine developed with .NET Core to generate NFT's through a graphical interface. Simple as that, in the best Grab & Go style.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if textBoxCollectionInitialNumber.Text , is not numbered from 1, there will be an exception;

haierzld opened this issue · comments

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;
        }));
    }