39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
class MessageManager
|
||
|
|
{
|
||
|
|
private:
|
||
|
|
static std::vector<std::wstring> cachedMessages;
|
||
|
|
static int WinHandler;
|
||
|
|
static int Started;
|
||
|
|
static std::wstring firstLvlMessage;
|
||
|
|
static std::wstring secondLvlMessage;
|
||
|
|
|
||
|
|
static void sendMessage(const std::wstring &toSend);
|
||
|
|
public:
|
||
|
|
static void clearCache() { cachedMessages.clear(); }
|
||
|
|
static void setWinHandler(const int winH);
|
||
|
|
static void sendFirstLvl(const std::wstring &str)
|
||
|
|
{
|
||
|
|
firstLvlMessage = str;
|
||
|
|
sendMessage(firstLvlMessage);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void sendSecondLvl(const std::wstring &str)
|
||
|
|
{
|
||
|
|
secondLvlMessage = str;
|
||
|
|
sendMessage(firstLvlMessage + L"\n" + secondLvlMessage);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void sendProgress(const std::wstring& str);
|
||
|
|
static int init();
|
||
|
|
};
|
||
|
|
|
||
|
|
void sendMessage_1lvl(const std::wstring& toSend);
|
||
|
|
void sendMessage_2lvl(const std::wstring& toSend);
|
||
|
|
void sendMessage_progress(const std::wstring& toSend);
|
||
|
|
unsigned int GetPid();
|