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