Numupdown框的进度条问题问题
我试图将进度栏作为DND的生命跟踪器。我正在使用NumericUpdown框来控制生命条,因为一个框是HP,第二个是HP Max,而另一个是用于HP的更改。
我在HP NemericUpdown up Clicker上遇到麻烦,将HP添加到进度栏中,并且在调试中崩溃了。谁能帮忙?
代码:
- HP是HP数字上升,
- 健康IS Progress Bar
- Max Max Max HP数字向下
private void HP_MouseUp(object sender, MouseEventArgs e)
{
if (HP.Value > Health.Maximum) ;
Health.Maximum = (int)Max.Value;
I am trying to use a progress bar as a life tracker for DND. I am using NumericUPDown boxes to control the life bar as one box is HP, a second is HP Max and the other is for the changes in HP.
I am having trouble with the HP NumericUpDown up clicker adding the Hp to be more than the Progress bar and it crashes the progream in debug. Can anyone help?
Code:
- HP is HP Numeric Up Down
- Health is Progress bar
- Max is Max HP Numeric Up Down
private void HP_MouseUp(object sender, MouseEventArgs e)
{
if (HP.Value > Health.Maximum) ;
Health.Maximum = (int)Max.Value;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我过度复杂化了。
我试图用数字来进行数学工作。
没有想到将我的最大值作为我想要停止的数字的想法。
I was overcomplicating it....
I was trying to do maths with the NumberUpDown stuff.
Didn't think for ages about just setting my maximum to be what I wanted the number to stop at.