GrpcPrint/PrintC/main.cpp

96 lines
1.6 KiB
C++
Raw Normal View History

2024-03-15 12:31:34 +08:00
#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <codecvt>
#include <grpcpp/grpcpp.h>
#include "DataManage/DataHandle.h"
2024-04-01 18:26:14 +08:00
#include "UI/UIWin.h"
#include "global.h"
#include "SystemInfo.h"
#include "Logger.h"
#include "Toast.h"
#include <iostream>
#include <map>
#include "PLC/SysParam.h"
#include "Machine/Machine.h"
#include "Machine/HBD1000.h"
#include "LanguageManager.h"
//UserType g_Admin;
string g_AppPath;
string g_AppDisk;
Logger* g_log;
LanguageManager* g_LngManager;
Toast* g_Toast;
bool g_isDebug;
uint32_t g_ScanSerial;
string g_gno;
SystemInfo* g_SystemInfo;
class HBDSystem {
public:
HBDSystem():m_win(nullptr)
{}
~HBDSystem()
{
if (m_win != nullptr)delete m_win;
//ConfigManager::GetInstance()->SaveConfig();
DELP(g_log);
DELP(g_Toast);
}
bool init(){
g_isDebug = false;
g_log = new Logger();
g_log->m_LogDao->Init();
g_SystemInfo = new SystemInfo();
g_Toast = new Toast();
m_win = new UIWin();
if (!m_win->Init()) return false;
return true;
}
void run(){
m_win->Display();
}
private:
UIWin* m_win;
};
2024-03-15 12:31:34 +08:00
int main(int argc, char** argv) {
2024-04-01 18:26:14 +08:00
printf("你好!" );
DataHandle* dataHandle = new DataHandle();
dataHandle->Init();
printf("你好fdfdfd");
HBDSystem* system = new HBDSystem();
system->init();
system->run();
return 0;
}
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,_In_opt_ HINSTANCE hPrevInstance,_In_ LPWSTR lpCmdLine,_In_ int nCmdShow) {
cout << "dfdfdfdf" << endl;
printf("你好dfdfdf");
2024-03-15 12:31:34 +08:00
2024-04-01 18:26:14 +08:00
DataHandle* dataHandle = new DataHandle();
dataHandle->Init();
2024-03-15 12:31:34 +08:00
2024-04-01 18:26:14 +08:00
HBDSystem* system = new HBDSystem();
system->init();
system->run();
return 0;
}
2024-03-15 12:31:34 +08:00