private void numericUpDownFrames_ValueChanged(object sender, EventArgs e)
{
if (!SuppressEvents)
{
var frames = (int)this.numericUpDownFrames.Value;
if (this._animation.frames.Count > frames)
{
for (int i = this._animation.frames.Count; i > frames; i--)
this._animation.frames.RemoveAt(i - 1);
}
else if (this._animation.frames.Count < frames)
{
for (int i = this._animation.frames.Count; i < frames; i++)
this._animation.frames.Add(new Animation.Frame());
}
this._animation.frame_max = frames;
this.RefreshFrameList();
}
}