Um.
That isn't your code, or it doesn't compile, and you haven't noticed.
This:
private bool textChanged = false;
This:
private void textChanged(object sender, EventArg e)
{
...
And
if (textChanged && lastChange > DateTime.Now.AddSeconds(-2))
{
...
Will not compile as there is an ambiguity between the two names. (And it's
EventArgs
, not
EventArg
in the event handler declaration.
So start by getting it to compile, and then work from there. We can't do anything without the code you are actually running!