When a particular event appears, I want to open a new Form (using ShowDialog), and while this dialog is open, I want to ignore / dequeue all incoming similar events raised.
It’s possible? How?
My event method in which I try to manage is like :
void barcode_Scanned(object sender, string value)
{
if(value.StartsWith("d")
{
// ShowDialog
}
}
Scenario:
- BarCode Scan
- otherForm.ShowDialog()
- BarCode Scan -> Ignored because dialog already opened
- BarCode Scan -> Ignored because dialog already opened
- otherForm is closed
- BarCode Scan
- otherForm.ShowDialog() -> Possible because previous closed
Thanks !
You could simply use a variable or property, such that: