Hello,
I ask you if and how it is possible to fire the event "InputValueChanged" also if I insert the same value already present.
For example the tag has value 50 and I insert again 50 -> the event does not happen.
We are trying to make AnalogNumeric field incremental in some circustances and need to add the new value inserted in keypad calculator to the one already inserted in that field.
In this case 50 + 50, new value 100.
It already works if we insert any whatever value different from the one already inserted before (50 in the example)
Do you have suggestions?
Thank you
_InputValueChanged AnalogNumeric - incremental numeric field
Re: _InputValueChanged AnalogNumeric - incremental numeric f
Here is a snippet of code, that could accomplish what you're asking
Code: Select all
int prevValue = 0;
int totalValue = 0;
void AnalogNumeric_InputValueChanged(System.Object sender, Core.Api.DataSource.ValueChangedEventArgs e)
{
totalValue += prevValue = Int16.Parse(AnalogNumeric.Value.ToString());
MessageBox.Show(totalValue.ToString());
}
void AnalogNumeric_GotFocus(System.Object sender, System.EventArgs e)
{
AnalogNumeric.Value = 0;
}
void AnalogNumeric_LostFocus(System.Object sender, System.EventArgs e)
{
AnalogNumeric.Value = prevValue;
}
Best regards,
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us