Modularize
This commit is contained in:
@@ -40,12 +40,7 @@ void Menu::eventListenerLoop()
|
||||
switch (result)
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
m_isMenuActive.store(false);
|
||||
MessageBoxA(
|
||||
NULL,
|
||||
"Your account has been disabled.",
|
||||
"Account Disabled",
|
||||
MB_OK | MB_ICONWARNING);
|
||||
handleAccountDisabledEvent();
|
||||
break;
|
||||
case WAIT_OBJECT_0 + 1:
|
||||
m_hasNewNotifications.store(true);
|
||||
@@ -83,3 +78,21 @@ void Menu::stopEventListener()
|
||||
m_notificationAvailableEvent = NULL;
|
||||
m_shutdownEvent = NULL;
|
||||
}
|
||||
|
||||
void Menu::handleAccountDisabledEvent()
|
||||
{
|
||||
m_isMenuActive.store(false);
|
||||
/*MessageBoxA(
|
||||
NULL,
|
||||
"Your account has been disabled.",
|
||||
"Account Disabled",
|
||||
MB_OK | MB_ICONWARNING);*/
|
||||
MessageBoxA(
|
||||
GetConsoleWindow(),
|
||||
"Your account has been disabled.",
|
||||
"Account Disabled",
|
||||
MB_OK |
|
||||
MB_ICONWARNING |
|
||||
MB_SETFOREGROUND |
|
||||
MB_TOPMOST);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ protected:
|
||||
void startEventListener();
|
||||
void stopEventListener();
|
||||
void eventListenerLoop();
|
||||
void handleAccountDisabledEvent();
|
||||
public:
|
||||
Menu();
|
||||
virtual ~Menu();
|
||||
|
||||
Reference in New Issue
Block a user