Create threads to update GUI

This commit is contained in:
Duc
2025-01-04 08:33:01 -07:00
parent 1d8f6e4c96
commit 7e2a821337
9 changed files with 385 additions and 105 deletions

View File

@@ -31,13 +31,6 @@ namespace ProgramLib
{
private EventWaitHandle[] _events = new EventWaitHandle[Enum.GetValues(typeof(Events)).Cast<int>().Max() + 1];
// specify which event should have to be manually reset
List<Events> _manualEventList = new List<Events>
{
Events.GLOBAL_QUIT,
Events.FATAL_FAILURE
};
/// <summary>
/// The private constructor
/// </summary>
@@ -45,12 +38,7 @@ namespace ProgramLib
{
for (int i = 0; i < _events.Count(); i++)
{
if (_manualEventList.Contains((Events)i))
{
_events[i] = new ManualResetEvent(false);
}
else
_events[i] = new AutoResetEvent(false);
_events[i] = new ManualResetEvent(false);
}
}