I have Boolean variable. I have timer which is based on this Boolean value. Both are in different form. Boolean is True when form is initialize. It set false on a specific condition. I want to put 2-3 second hold before it set to false.
//Form 1
Private void updateGrid()
{
if(Form2.isBooleanTrue)
{
//Code to execurte
}
}
//Form 2
public static isBooleanTrue = false;
Private void checkCondition()
{
// I want to hold here. Note it should not hold the Form1 process
isBooleanTrue = true;
}
Can any body suggest me how to hold the process before Boolean set false? So, timer can run for few more seconds.
See Question&Answers more detail:os