0

NumericUpDown每当设置 Control的值时,是否有可以使用的事件。不仅仅是改变了,因为很多时候它以编程方式设置为相同的值,但仍然需要调用该事件。

编辑:我的意思是它的代码不是很复杂,只是有很多。因为这对于所有身体部位来说几乎都是一样的

private void NumUpDownLeftHandDirection_ValueChanged(object sender, EventArgs e)
{
    game.Ragdoll.LeftHand.DirectionOffset = (float)NumUpDownLeftHandDirection.Value;
    game.Ragdoll.Direction = game.Ragdoll.Direction;
    MainTimeLine.Frames[MainTimeLine.CurrentFrame].LeftHandDirection = (float)NumUpDownLeftHandDirection.Value;
}

我可以把它全部放在属性中,但这将是很多工作,因为我已经编写了这个代码,希望它能够工作。

4

0 回答 0