GrpcPrint/PrintC/main.cpp
2024-04-01 18:26:14 +08:00

96 lines
1.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <codecvt>
#include <grpcpp/grpcpp.h>
#include "DataManage/DataHandle.h"
#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;
};
int main(int argc, char** argv) {
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");
DataHandle* dataHandle = new DataHandle();
dataHandle->Init();
HBDSystem* system = new HBDSystem();
system->init();
system->run();
return 0;
}