Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NumericUpDownFix : System.Windows.Forms.NumericUpDown
- {
- protected override void OnValueChanged(EventArgs e)
- {
- if (Value > _value)
- {
- LastDirection = 1;
- }
- else if (Value < _value)
- {
- LastDirection = -1;
- }
- else
- {
- LastDirection = 0;
- }
- _value = Value;
- base.OnValueChanged(e);
- }
- protected override void OnClick(EventArgs e)
- {
- base.OnClick(e);
- LastDirection = 0;
- }
- private decimal _value;
- public int LastDirection = -2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement