This should do the trick:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
DisablingButton();
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
DisablingButton();
}
private void DisablingButton()
{
decimal value1 = numericUpDown1.Value;
decimal value2 = numericUpDown2.Value;
if (value1 > 0 && value2 > 0)
button1.Enabled = false;
else
button1.Enabled = true;
}
}
Hope it helps,
Mitja