添加客户端功能

This commit is contained in:
wangxx1809 2024-04-02 17:45:03 +08:00
parent 15bf52f751
commit 7413c55df5
24 changed files with 681 additions and 486 deletions

View File

@ -3,12 +3,10 @@
DataHandle::DataHandle() DataHandle::DataHandle()
: m_dataCallBack(nullptr) : m_dataCallBack(nullptr)
, m_streamClient(nullptr){ , m_streamClient(nullptr){
} }
DataHandle::~DataHandle() { DataHandle::~DataHandle() {
delete m_streamClient; DELP(m_streamClient);
m_streamClient = nullptr;
} }
@ -19,8 +17,44 @@ void DataHandle::Init() {
} }
void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg) { void DataHandle::DataCallBackProc(void* pthis, const ReadData& msg) {
DataHandle* p = (DataHandle*)pthis; DataHandle* p = (DataHandle*)pthis;
std::istringstream issKey(msg.nameKey),issVal(msg.strValue);
string key, value;
if (msg.dataType == TIMEDATA) {
SysParam::Lck();
while (issKey >> key && issVal >> value) {
size_t pos = value.find("_");
if (pos == string::npos || SysParam::m_sysParamMp.find(key) == SysParam::m_sysParamMp.end()) continue;
DATATYPE valType = (DATATYPE)atoi(value.substr(pos + 1).c_str()); //值类型
string val = value.substr(0, pos); //值
DValue& param = SysParam::m_sysParamMp.at(key);
switch (valType) {
case iBOOL:
param.sysParamB->SetValue((bool)atoi(val.c_str()));
break;
case iSHORT:
param.sysParamW->SetValue((short)atoi(val.c_str()));
break;
//case iUSHORT:
// param.sysParamB->SetValue((bool)atoi(val.c_str()));
// break;
case iINT:
param.sysParamI->SetValue(atoi(val.c_str()));
break;
//case iUINT:
// param.sysParamB->SetValue((bool)atoi(val.c_str()));
// break;
case iFLOAT:
param.sysParamB->SetValue(atof(val.c_str()));
break;
default: break;
}
}
SysParam::UnLck();
}
} }

View File

@ -1,19 +1,45 @@
#pragma once #pragma once
#include <string> #include <string>
#include "StreamClient.h" #include "StreamClient.h"
//#include "../Machine/Machine.h" #include "../Machine/Machine.h"
#include "../UI/UIBean.h"
class DataHandle{ class DataHandle{
typedef void (*DataCallBack)(void* pthis, const ReadData& msg); typedef void (*DataCallBack)(void* pthis, const ReadData& msg);
public: public:
DataHandle(); static DataHandle* Instance() {
~DataHandle(); static DataHandle dh;
return &dh;
}
void Init(); void Init();
static void DataCallBackProc(void* pthis, const ReadData& msg); static void DataCallBackProc(void* pthis, const ReadData& msg);
//void SetPushMsg(WriteData* msg) {
// if (m_streamClient) {
// m_streamClient->SetPushMsg(msg);
// }
//}
void SetPushMsg(WRITETYPE dataType,const string& nameKey,const string& strValue,DATATYPE valueType) {
if (m_streamClient) {
WriteData* msg = new WriteData();
msg->dataType = dataType;
msg->nameKey = nameKey;
msg->strValue = strValue;
msg->valueType = valueType;
m_streamClient->SetPushMsg(msg);
}
}
private:
DataHandle();
virtual ~DataHandle();
//DataHandle(const DataHandle& d) = delete;
//DataHandle& operator = (const DataHandle& d) = delete;
private: private:
DataCallBack m_dataCallBack; DataCallBack m_dataCallBack;
StreamClient* m_streamClient; StreamClient* m_streamClient;
}; };

View File

@ -17,6 +17,10 @@ StreamClient::~StreamClient() {
m_readQuitFlag = true; m_readQuitFlag = true;
m_writeQuitFlag = true; m_writeQuitFlag = true;
if (m_connectTd.joinable()) {
m_connectTd.join();
}
} }
void StreamClient::Init() { void StreamClient::Init() {

View File

@ -16,7 +16,7 @@ using stream::ResponseInfo;
enum READTYPE { enum READTYPE {
ALARM = 0, //报警 ALARM = 0, //报警
RESPOND, //回应 RESPOND, //回应
TIMEDATA //定时数据 TIMEDATA //定时数据 一次大概50个左右
}; };
enum DATATYPE { enum DATATYPE {
@ -31,9 +31,11 @@ enum DATATYPE {
struct ReadData { struct ReadData {
READTYPE dataType; READTYPE dataType;
bool result; bool result;
std::string nameKey; //参数key std::string nameKey; //参数key 空格隔开
std::string strValue; //value std::string strValue; //value 空格隔开
DATATYPE valueType; //数据类型 DATATYPE valueType; //数据类型
}; };

View File

@ -3,6 +3,7 @@
//#include "CoreCommunication.h" //#include "CoreCommunication.h"
std::map<std::string, DValue> SysParam::m_sysParamMp; std::map<std::string, DValue> SysParam::m_sysParamMp;
CRITICAL_SECTION SysParam::m_ValueCS;
SysParam::SysParam(int addr, int num, void* cc,const string& context, const std::string& code) SysParam::SysParam(int addr, int num, void* cc,const string& context, const std::string& code)
: /*PLCCommand(cc),*/ : /*PLCCommand(cc),*/
m_Addr(addr) m_Addr(addr)
@ -10,7 +11,7 @@ SysParam::SysParam(int addr, int num, void* cc,const string& context, const std:
, m_context(context) , m_context(context)
, m_code(code) , m_code(code)
{ {
InitializeCriticalSection(&m_ValueCS);
} }
SysParam::~SysParam() SysParam::~SysParam()
@ -21,6 +22,8 @@ SysParam::~SysParam()
++item; ++item;
} }
m_sysParamMp.clear(); m_sysParamMp.clear();
DeleteCriticalSection(&m_ValueCS);
} }
SysParam::SysParam(SysParam* sp) /*:PLCCommand(sp->m_Receiver)*/ SysParam::SysParam(SysParam* sp) /*:PLCCommand(sp->m_Receiver)*/

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "../stdafx.h"
#include <queue> #include <queue>
#include <shared_mutex> #include <shared_mutex>
#include <condition_variable> #include <condition_variable>
@ -19,7 +20,12 @@ public:
int GetAddr() { return m_Addr; } int GetAddr() { return m_Addr; }
string GetCode() { return m_code; } string GetCode() { return m_code; }
static void Lck() {
EnterCriticalSection(&m_ValueCS);
}
static void UnLck() {
LeaveCriticalSection(&m_ValueCS);
}
static std::map<std::string, DValue > m_sysParamMp; //记录 static std::map<std::string, DValue > m_sysParamMp; //记录
protected: protected:
int m_Addr; int m_Addr;
@ -29,6 +35,8 @@ protected:
string m_code; //key编码 string m_code; //key编码
string m_code2; //key编码2 string m_code2; //key编码2
static CRITICAL_SECTION m_ValueCS;
//S7Command* m_CtrlCommand; //S7Command* m_CtrlCommand;
//PLCReveiver* m_cc; //PLCReveiver* m_cc;
@ -174,6 +182,7 @@ struct DValue {
if (sysParamF) return sysParamF; if (sysParamF) return sysParamF;
if (sysParamFU) return sysParamFU; if (sysParamFU) return sysParamFU;
if (sysParamWU) return sysParamWU; if (sysParamWU) return sysParamWU;
return nullptr;
} }
}; };
@ -689,7 +698,7 @@ class StateCtrlWrapper {
public: public:
StateCtrlWrapper() {} StateCtrlWrapper() {}
~StateCtrlWrapper() {} ~StateCtrlWrapper() {}
void Init(void* cc); void Init(void* cc = nullptr);
public: public:
SysParamBool* m_MoldMainServoOn; //打印主轴伺服ON_RW SysParamBool* m_MoldMainServoOn; //打印主轴伺服ON_RW
SysParamBool* m_MoldMainServoHomeIndexOn; //打印主轴伺服成立原点_RW SysParamBool* m_MoldMainServoHomeIndexOn; //打印主轴伺服成立原点_RW

View File

@ -203,7 +203,7 @@
<ClCompile Include="Render\Renderer.cpp" /> <ClCompile Include="Render\Renderer.cpp" />
<ClCompile Include="SystemInfo.cpp" /> <ClCompile Include="SystemInfo.cpp" />
<ClCompile Include="Toast.cpp" /> <ClCompile Include="Toast.cpp" />
<ClCompile Include="UI\Controler.cpp" /> <ClCompile Include="UI\Controller.cpp" />
<ClCompile Include="UI\TextureBean.cpp" /> <ClCompile Include="UI\TextureBean.cpp" />
<ClCompile Include="UI\UIWin.cpp" /> <ClCompile Include="UI\UIWin.cpp" />
<ClCompile Include="utils\CryptHelper.cpp" /> <ClCompile Include="utils\CryptHelper.cpp" />
@ -299,7 +299,7 @@
<ClInclude Include="stdafx.h" /> <ClInclude Include="stdafx.h" />
<ClInclude Include="SystemInfo.h" /> <ClInclude Include="SystemInfo.h" />
<ClInclude Include="Toast.h" /> <ClInclude Include="Toast.h" />
<ClInclude Include="UI\Controler.h" /> <ClInclude Include="UI\Controller.h" />
<ClInclude Include="UI\TextureBean.h" /> <ClInclude Include="UI\TextureBean.h" />
<ClInclude Include="UI\UIBean.h" /> <ClInclude Include="UI\UIBean.h" />
<ClInclude Include="UI\UIWin.h" /> <ClInclude Include="UI\UIWin.h" />

View File

@ -288,7 +288,7 @@
<ClCompile Include="Render\Renderer.cpp"> <ClCompile Include="Render\Renderer.cpp">
<Filter>Renderer</Filter> <Filter>Renderer</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="UI\Controler.cpp"> <ClCompile Include="UI\Controller.cpp">
<Filter>UI</Filter> <Filter>UI</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
@ -570,7 +570,7 @@
<ClInclude Include="Render\Renderer.h"> <ClInclude Include="Render\Renderer.h">
<Filter>Renderer</Filter> <Filter>Renderer</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="UI\Controler.h"> <ClInclude Include="UI\Controller.h">
<Filter>UI</Filter> <Filter>UI</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>

View File

@ -1,31 +0,0 @@
//#pragma once
//
//#include "../Machine/Machine.h"
//#include "../PLC/MachineCtrl.h"
//#include "../PLC/CoreCommunication.h"
//#include "../Config/ConfigManager.h"
//#include "../Communication/ComServer.h"
//#include "../remote/RemoteClient.h"
//
//class Controler {
//public:
// Controler();
// ~Controler();
//
// void Init();
//
//
//private:
// Machine* m_Machine;
// CoreCommunication* m_CoreCommunication;
// PLCAxis* m_Axis;
// StateCtrlWrapper* m_StateCtrlWrapper;
// SysParamWrapper* m_SysParamWrapper;
// AxisRecordWrapper* m_AxisRecordWrapper;
// SignalStateWrapper* m_SignalStateWrapper;
//
// MachineCtrl* m_MachineCtrl;
// RemoteClient* m_RemoteClient;
// ComServer* m_ComServer;
//
//};

38
PrintC/UI/Controller.cpp Normal file
View File

@ -0,0 +1,38 @@
#include "Controller.h"
Controller::Controller()
: m_Machine(nullptr)
//, m_Axis(nullptr)
, m_StateCtrlWrapper(nullptr)
, m_SysParamWrapper(nullptr)
, m_AxisRecordWrapper(nullptr)
, m_SignalStateWrapper(nullptr) {
}
Controller::~Controller() {
//DELP(m_Axis);
DELP(m_StateCtrlWrapper);
DELP(m_SysParamWrapper);
DELP(m_AxisRecordWrapper);
DELP(m_SignalStateWrapper);
DELP(m_Machine);
}
void Controller::Init() {
m_StateCtrlWrapper = new StateCtrlWrapper();
m_SysParamWrapper = new SysParamWrapper();
m_AxisRecordWrapper = new AxisRecordWrapper();
m_SignalStateWrapper = new SignalStateWrapper();
m_Machine = Machine::CreateInstance(MachineTypeCfg::MachineTypeId::HBD_1000);
m_Machine->SetAxisAndSignal(m_SysParamWrapper, m_AxisRecordWrapper);
}

33
PrintC/UI/Controller.h Normal file
View File

@ -0,0 +1,33 @@
#pragma once
#include "../stdafx.h"
#include "../Machine/Machine.h"
#include "UIBean.h"
//#include "../PLC/MachineCtrl.h"
//#include "../PLC/CoreCommunication.h"
//#include "../Config/ConfigManager.h"
//#include "../Communication/ComServer.h"
class Controller {
public:
Controller();
~Controller();
void Init();
public:
Machine* m_Machine;
//PLCAxis* m_Axis;
StateCtrlWrapper* m_StateCtrlWrapper;
SysParamWrapper* m_SysParamWrapper;
AxisRecordWrapper* m_AxisRecordWrapper;
SignalStateWrapper* m_SignalStateWrapper;
SystemAssist m_SystemAssist;
//MachineCtrl* m_MachineCtrl;
//RemoteClient* m_RemoteClient;
//ComServer* m_ComServer;
};

View File

@ -255,8 +255,8 @@ struct LogAssist {
int64_t selected_sp_id; int64_t selected_sp_id;
explicit LogAssist() { explicit LogAssist() {
time_t t = time(nullptr); time_t t = time(nullptr);
selectBeginTime = *localtime(&t); /*selectBeginTime = *localtime(&t);*/ localtime_s(&selectBeginTime, &t);
selectEndTime = *localtime(&t); /*selectEndTime = *localtime(&t);*/ localtime_s(&selectEndTime, &t);
layer_selected_param = 0; layer_selected_param = 0;
layer_selected_style = 0; layer_selected_style = 0;
layer_selected_base = 0; layer_selected_base = 0;

View File

@ -29,30 +29,37 @@
#include "../utils/CryptHelper.h" #include "../utils/CryptHelper.h"
#include "../utils/ImageHelper.h" #include "../utils/ImageHelper.h"
#include "../external/stb/stb_image.h" #include "../external/stb/stb_image.h"
UserType g_Admin; UserType g_Admin;
UIWin::UIWin() { UIWin::UIWin()
: m_TextureMap(nullptr){
} }
UIWin::~UIWin() { UIWin::~UIWin() {
m_TextureMap = nullptr;
} }
bool UIWin::Init() bool UIWin::Init()
{ {
m_TextureMap = &ChartletManager::GetInstance()->m_TextureMap;
//MetaData::InitTypeMap(); //MetaData::InitTypeMap();
g_Admin = USER; g_Admin = USER;
m_IsShowInitError = true; m_IsShowInitError = true;
//if (!m_UIController.Init())return false; //if (!m_Controller.Init())return false;
if (!glfwInit())return false; if (!glfwInit())return false;
const char* glsl_version = "#version 130"; const char* glsl_version = "#version 130";
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
_setmaxstdio(5000); _setmaxstdio(5000);
GetVersion(); //GetVersion();
m_GLFWMon = glfwGetPrimaryMonitor(); m_GLFWMon = glfwGetPrimaryMonitor();
m_GLFWMode = glfwGetVideoMode(m_GLFWMon); m_GLFWMode = glfwGetVideoMode(m_GLFWMon);
glfwWindowHint(GLFW_RED_BITS, m_GLFWMode->redBits); glfwWindowHint(GLFW_RED_BITS, m_GLFWMode->redBits);
@ -63,7 +70,7 @@ bool UIWin::Init()
#ifdef _DEBUG #ifdef _DEBUG
m_IsFullScreen = false; m_IsFullScreen = false;
#else #else
m_IsFullScreen = true; m_IsFullScreen = false;
#endif #endif
if (m_IsFullScreen) { if (m_IsFullScreen) {
m_GLFWWin = glfwCreateWindow(m_GLFWMode->width, m_GLFWMode->height, "HBDSystem1000", NULL, NULL); m_GLFWWin = glfwCreateWindow(m_GLFWMode->width, m_GLFWMode->height, "HBDSystem1000", NULL, NULL);
@ -79,7 +86,7 @@ bool UIWin::Init()
//if (ChartletManager::GetInstance()->HasIcoLogo()) //if (ChartletManager::GetInstance()->HasIcoLogo())
{ {
int width = 0, height = 0, comp = 0; int width = 0, height = 0, comp = 0;
//if (m_UIController.m_MachineCfg->m_I18NLang == "zh_CN") //if (m_Controller.m_MachineCfg->m_I18NLang == "zh_CN")
//{ //{
// TextureBean* l16 = ChartletManager::GetInstance()->m_AppLogo16; // TextureBean* l16 = ChartletManager::GetInstance()->m_AppLogo16;
// TextureBean* l32 = ChartletManager::GetInstance()->m_AppLogo32; // TextureBean* l32 = ChartletManager::GetInstance()->m_AppLogo32;
@ -111,20 +118,20 @@ bool UIWin::Init()
m_Renderer = new VLRenderer; m_Renderer = new VLRenderer;
m_PrevRenderer->Init(); m_PrevRenderer->Init();
m_Renderer->Init(); m_Renderer->Init();
//if (m_UIController.m_MachineCfg->m_PlatformShape == PS_SQUARE) { //if (m_Controller.m_MachineCfg->m_PlatformShape == PS_SQUARE) {
m_PrevRenderer->SetPlatformShape(PS_SQUARE); m_PrevRenderer->SetPlatformShape(PS_SQUARE);
//m_PrevRenderer->SetPlatfromSize(m_UIController.m_MachineCfg->m_PlatformLength, m_UIController.m_MachineCfg->m_PlatformWidth, 100); //m_PrevRenderer->SetPlatfromSize(m_Controller.m_MachineCfg->m_PlatformLength, m_Controller.m_MachineCfg->m_PlatformWidth, 100);
m_Renderer->SetPlatformShape(PS_SQUARE); m_Renderer->SetPlatformShape(PS_SQUARE);
//m_Renderer->SetPlatfromSize(m_UIController.m_MachineCfg->m_PlatformLength, m_UIController.m_MachineCfg->m_PlatformWidth, 100); //m_Renderer->SetPlatfromSize(m_Controller.m_MachineCfg->m_PlatformLength, m_Controller.m_MachineCfg->m_PlatformWidth, 100);
//} //}
//else { //else {
// m_PrevRenderer->SetPlatformShape(PS_ROUND); // m_PrevRenderer->SetPlatformShape(PS_ROUND);
// m_PrevRenderer->SetPlatfromSize(m_UIController.m_MachineCfg->m_PlatformLength); // m_PrevRenderer->SetPlatfromSize(m_Controller.m_MachineCfg->m_PlatformLength);
// m_Renderer->SetPlatformShape(PS_ROUND); // m_Renderer->SetPlatformShape(PS_ROUND);
// m_Renderer->SetPlatfromSize(m_UIController.m_MachineCfg->m_PlatformLength); // m_Renderer->SetPlatfromSize(m_Controller.m_MachineCfg->m_PlatformLength);
//} //}
//m_UIController.m_Calibration->SetRender(m_Renderer, m_PrevRenderer); //m_Controller.m_Calibration->SetRender(m_Renderer, m_PrevRenderer);
IMGUI_CHECKVERSION(); IMGUI_CHECKVERSION();
ImGui::CreateContext(); ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
@ -165,7 +172,7 @@ bool UIWin::Init()
//ImGui_ImplOpenGL2_NewFrame(); //ImGui_ImplOpenGL2_NewFrame();
m_IdleTime = 0; m_IdleTime = 0;
InitializeCriticalSection(&m_IdleTimeCS); InitializeCriticalSection(&m_IdleTimeCS);
//m_UIController.m_Calibration->Init(); //m_Controller.m_Calibration->Init();
#ifdef _DEBUG #ifdef _DEBUG
g_Admin = ADMIN; g_Admin = ADMIN;
m_RegResult = Registration::REG_SUCCESS; m_RegResult = Registration::REG_SUCCESS;
@ -179,388 +186,392 @@ bool UIWin::Init()
return true; return true;
} }
//void UIWin::DrawTitleBar()
//{
// ImGui::SetNextWindowSize(ImVec2((float)m_winWidth, (float)TITLE_HEIGHT));
// ImGui::SetNextWindowPos(ImVec2(0, 0)); // 窗口起始位置为左上角
// ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
// ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(5.0f, 5.0f));
// ImGui::Begin("TitleBar", NULL,
// ImGuiWindowFlags_NoMove |
// ImGuiWindowFlags_NoResize |
// ImGuiWindowFlags_NoCollapse |
// ImGuiWindowFlags_NoTitleBar |
// ImGuiWindowFlags_NoFocusOnAppearing |
// ImGuiWindowFlags_NoBringToFrontOnFocus |
// ImGuiWindowFlags_NoScrollWithMouse |
// ImGuiWindowFlags_NoScrollbar |
// ImGuiWindowFlags_NoDocking
// );
// ImGui::PopStyleVar(2);
// if (!m_IsFullScreen && ImGui::IsWindowFocused() && ImGui::IsMouseDragging(0)) {
// ImVec2 mosvec = ImGui::GetMouseDragDelta(0);
// int posx, posy, winWidth, winHeight;
// glfwGetWindowPos(m_GLFWWin, &posx, &posy);
// glfwGetWindowSize(m_GLFWWin, &winWidth, &winHeight);
// glfwSetWindowMonitor(m_GLFWWin, NULL, posx + (int)mosvec.x, posy + (int)mosvec.y, winWidth, winHeight, m_GLFWMode->refreshRate);
//
// }
//
// ImGuiStyle* style = &ImGui::GetStyle();
// TextureBean* logotitle = ChartletManager::GetInstance()->m_LogoTitle;
// TextureBean* logotitleEn = ChartletManager::GetInstance()->m_LogoTitleEn;
//
// //if (m_UIController.m_MachineCfg->m_I18NLang == "zh_CN")ImGui::Image(logotitle->GetTex(), ImVec2((float)logotitle->m_Width, (float)logotitle->m_Height));
// //else ImGui::Image(logotitleEn->GetTex(), ImVec2((float)logotitleEn->m_Width, (float)logotitleEn->m_Height));
// //ImGui::Text(u8"汉邦HBDSystemL金属3D打印控制系统");
//
// ImGui::SameLine(0, 50);
// if (m_UIController.m_MachineCfg->m_ExpriedTime != 0) {
// time_t tnow;
// time(&tnow);
// if ((m_UIController.m_MachineCfg->m_ExpriedTime - tnow) < (60 * 60 * 24 * 60)) {
//
// const ImVec2 p1 = ImGui::GetCursorScreenPos();
// char dataBuffer[50];
// sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", _(u8"系统到期:").c_str(), TimeHelper::Time2Str(m_UIController.m_MachineCfg->m_ExpriedTime).c_str());
// ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), ImColor(Toast::COLOR_ORANGE), dataBuffer);
// //ImGui::TextColored(Toast::COLOR_ORANGE, _(u8"系统到期:%s").c_str(), TimeHelper::Time2Str(m_UIController.m_MachineCfg->m_ExpriedTime).c_str());
// }
// }
// if (g_Admin != USER) {
// ImGui::SameLine(ImGui::GetWindowWidth() - 405);
// const ImVec2 p1 = ImGui::GetCursorScreenPos();
// char dataBuffer[50];
// sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
//
// ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), IM_COL32_WHITE, dataBuffer);
// //ImGui::Text("%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
//
// ImGui::SameLine(ImGui::GetWindowWidth() - 110);
// TextureBean* screenWin = (*m_UIController.m_TextureMap)[ChartletManager::SCREEN_WIN];
// if (ImGui::ImageButton(screenWin->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// {
// m_IsFullScreen = false;
// int wwidth = m_GLFWMode->width * 4 / 5;
// int wheight = m_GLFWMode->height * 4 / 5;
// glfwSetWindowMonitor(m_GLFWWin, NULL, (m_GLFWMode->width - wwidth) / 2, (m_GLFWMode->height - wheight) / 2, wwidth, wheight, m_GLFWMode->refreshRate);
// }
// ImGui::SameLine();
// TextureBean* screenFull = (*m_UIController.m_TextureMap)[ChartletManager::SCREEN_FULL];
// if (ImGui::ImageButton(screenFull->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// {
// m_IsFullScreen = true;
// glfwSetWindowMonitor(m_GLFWWin, NULL, 0, 0, m_GLFWMode->width, m_GLFWMode->height, m_GLFWMode->refreshRate);
// }
// ImGui::SameLine();
// TextureBean* appClose = (*m_UIController.m_TextureMap)[ChartletManager::APP_CLOSE];
// if (ImGui::ImageButton(appClose->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// {
// if (!m_UIController.m_ScannerCtrl->IsStandBy()) {
// g_Toast->AddToast(new ToastBean(_(u8"正在打印中,请先结束打印后退出").c_str(), 5000));
// }
// else {
// ImGui::OpenPopup(_(u8"退出系统").c_str());
// }
// }
//
// }
// else {
// ImGui::SameLine(ImGui::GetWindowWidth() - 300);
// const ImVec2 p1 = ImGui::GetCursorScreenPos();
// char dataBuffer[50];
// sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), IM_COL32_WHITE, dataBuffer);
// //ImGui::Text("%s", TimeHelper::GetStrNow().c_str());
// //ImGui::Text("%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// }
// bool exitStopLaserFlag = false;
// if (ImGui::BeginPopupModal(_(u8"退出系统").c_str(), NULL, ImGuiWindowFlags_NoResize))
// {
// ImGui::Text(_(u8"是否确认退出系统").c_str());
// ImGui::Separator();
//
// if (ImGui::Button(_(u8"是").c_str(), ImVec2(120, 0)))
// {
//#ifndef _DEBUG
// if (m_UIController.m_MachineCtrl->IsLaserActive()) {
// m_UIController.m_MachineCtrl->StopLaser(false);
// exitStopLaserFlag = true;
// }
// else {
//#endif
// glfwSetWindowShouldClose(m_GLFWWin, GLFW_TRUE);
//#ifndef _DEBUG
// }
//#endif
// ImGui::CloseCurrentPopup();
// }
// ImGui::SetItemDefaultFocus();
// ImGui::SameLine();
// if (ImGui::Button(_(u8"取消").c_str(), ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); }
// ImGui::EndPopup();
// }
//
// if (exitStopLaserFlag) {
// m_UIController.m_SystemAssist.exitTickCount = GetTickCount64();
// m_UIController.m_SystemAssist.exitSumTime = m_UIController.m_MachineCtrl->GetTimeWhenExit();
// //m_UIController.m_MachineCtrl->StopLaser(false);
// ImGui::OpenPopup(_(u8"正在退出系统").c_str());
// }
// if (ImGui::BeginPopupModal(_(u8"正在退出系统").c_str(), NULL, ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize)) {
// uint64_t tnow = GetTickCount64();
// float exitProgress = 1.0f;
// if (m_UIController.m_SystemAssist.exitSumTime != 0L)exitProgress = (float)(tnow - m_UIController.m_SystemAssist.exitTickCount) / m_UIController.m_SystemAssist.exitSumTime;
// ImGui::Text(_(u8"系统将在激光器关闭后退出").c_str());
// ImGui::ProgressBar(exitProgress);
// if (!m_UIController.m_MachineCtrl->IsLaserActive() && exitProgress >= 1.0f) {
// ImGui::CloseCurrentPopup();
// glfwSetWindowShouldClose(m_GLFWWin, GLFW_TRUE);
// }
// ImGui::EndPopup();
// }
//
// ImGui::End();
//}
void UIWin::Draw() { void UIWin::Draw() {
SetupDockSpace(); SetupDockSpace();
//DrawTitleBar(); DrawTitleBar();
//DrawToolBar(); DrawToolBar();
} }
//void UIWin::DrawToolBar() void UIWin::DrawTitleBar()
//{ {
// ImGui::SetNextWindowPos(ImVec2(0, 70)); ImGui::SetNextWindowSize(ImVec2((float)m_winWidth, (float)TITLE_HEIGHT));
// ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); ImGui::SetNextWindowPos(ImVec2(0, 0)); // 窗口起始位置为左上角
// ImGui::Begin("toolbar", (bool*)0, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDecoration); ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
// static bool show_toolbar = false; ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(5.0f, 5.0f));
// bool isStopAutoPurifier = false; ImGui::Begin("TitleBar", NULL,
// bool isStartAutoPurifier = false; ImGuiWindowFlags_NoMove |
// if (!show_toolbar) { ImGuiWindowFlags_NoResize |
// //ImGui::Image((*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(), ImVec2((*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height)); ImGuiWindowFlags_NoCollapse |
// if (ImGui::IsItemHovered()) ImGuiWindowFlags_NoTitleBar |
// show_toolbar = true; ImGuiWindowFlags_NoFocusOnAppearing |
// } ImGuiWindowFlags_NoBringToFrontOnFocus |
// else { ImGuiWindowFlags_NoScrollWithMouse |
// ImGui::BeginGroup(); ImGuiWindowFlags_NoScrollbar |
// TextureBean* autoOxygenDisable = ChartletManager::GetInstance()->m_AutoOxygenDisable; ImGuiWindowFlags_NoDocking
// TextureBean* autoOxygenEnable = ChartletManager::GetInstance()->m_AutoOxygenEnable; );
// /*if (m_UIController.m_Purifier->IsAutoDeoxygen())*/ { ImGui::PopStyleVar(2);
// if (ImGui::ImageButton(autoOxygenEnable->GetTex(), ImVec2(autoOxygenEnable->m_Width, autoOxygenEnable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (!m_IsFullScreen && ImGui::IsWindowFocused() && ImGui::IsMouseDragging(0)) {
// isStopAutoPurifier = true; ImVec2 mosvec = ImGui::GetMouseDragDelta(0);
// } int posx, posy, winWidth, winHeight;
// if (ImGui::IsItemHovered()) { glfwGetWindowPos(m_GLFWWin, &posx, &posy);
// ImGui::SetTooltip(_(u8"关闭一键除氧").c_str()); glfwGetWindowSize(m_GLFWWin, &winWidth, &winHeight);
// } glfwSetWindowMonitor(m_GLFWWin, NULL, posx + (int)mosvec.x, posy + (int)mosvec.y, winWidth, winHeight, m_GLFWMode->refreshRate);
// }
// /*else*/ { }
// if (ImGui::ImageButton(autoOxygenDisable->GetTex(), ImVec2(autoOxygenDisable->m_Width, autoOxygenDisable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// isStartAutoPurifier = true; ImGuiStyle* style = &ImGui::GetStyle();
// } TextureBean* logotitle = ChartletManager::GetInstance()->m_LogoTitle;
// if (ImGui::IsItemHovered()) { TextureBean* logotitleEn = ChartletManager::GetInstance()->m_LogoTitleEn;
// ImGui::SetTooltip(_(u8"开启一键除氧").c_str());
// } //if (m_Controller.m_MachineCfg->m_I18NLang == "zh_CN")ImGui::Image(logotitle->GetTex(), ImVec2((float)logotitle->m_Width, (float)logotitle->m_Height));
// } //else ImGui::Image(logotitleEn->GetTex(), ImVec2((float)logotitleEn->m_Width, (float)logotitleEn->m_Height));
// //ImGui::Text(u8"汉邦HBDSystemL金属3D打印控制系统");
// ImGui::SameLine();
// ImGui::Image((*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(), ImVec2((*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (*m_UIController.m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height)); ImGui::SameLine(0, 50);
// //if (m_Controller.m_MachineCfg->m_ExpriedTime != 0) {
// TextureBean* laserOff = (*m_UIController.m_TextureMap)[ChartletManager::LASER_OFF]; // time_t tnow;
// TextureBean* laserOn = (*m_UIController.m_TextureMap)[ChartletManager::LASER_ON]; // time(&tnow);
// // if ((m_Controller.m_MachineCfg->m_ExpriedTime - tnow) < (60 * 60 * 24 * 60)) {
// if (!m_UIController.m_MachineCtrl->IsLaserOn()) {
// if (ImGui::ImageButton(laserOff->GetTex(), ImVec2(laserOff->m_Width, laserOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) // const ImVec2 p1 = ImGui::GetCursorScreenPos();
// { // char dataBuffer[50];
// if (m_UIController.m_ScannerCtrl->IsStandBy()) { // sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", _(u8"系统到期:").c_str(), TimeHelper::Time2Str(m_Controller.m_MachineCfg->m_ExpriedTime).c_str());
// m_UIController.m_MachineCtrl->StartLaser(false); // ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), ImColor(Toast::COLOR_ORANGE), dataBuffer);
// } // //ImGui::TextColored(Toast::COLOR_ORANGE, _(u8"系统到期:%s").c_str(), TimeHelper::Time2Str(m_Controller.m_MachineCfg->m_ExpriedTime).c_str());
// } // }
// if (ImGui::IsItemHovered()) { //}
// ImGui::SetTooltip(_(u8"开启激光").c_str()); if (g_Admin != USER) {
// } ImGui::SameLine(ImGui::GetWindowWidth() - 405);
// } const ImVec2 p1 = ImGui::GetCursorScreenPos();
// else { char dataBuffer[50];
// if (ImGui::ImageButton(laserOn->GetTex(), ImVec2(laserOn->m_Width, laserOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// {
// if (m_UIController.m_ScannerCtrl->IsStandBy()) { ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), IM_COL32_WHITE, dataBuffer);
// m_UIController.m_MachineCtrl->StopLaser(false); //ImGui::Text("%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// }
// } ImGui::SameLine(ImGui::GetWindowWidth() - 110);
// if (ImGui::IsItemHovered()) { TextureBean* screenWin = (*m_TextureMap)[ChartletManager::SCREEN_WIN];
// ImGui::SetTooltip(_(u8"关闭激光").c_str()); if (ImGui::ImageButton(screenWin->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// } {
// } m_IsFullScreen = false;
// int wwidth = m_GLFWMode->width * 4 / 5;
// //IOCfg* lightCfg = m_UIController.m_IoCfgWrapper->m_LightOn; int wheight = m_GLFWMode->height * 4 / 5;
// TextureBean* lightOn = (*m_UIController.m_TextureMap)[ChartletManager::LIGHT_ON]; glfwSetWindowMonitor(m_GLFWWin, NULL, (m_GLFWMode->width - wwidth) / 2, (m_GLFWMode->height - wheight) / 2, wwidth, wheight, m_GLFWMode->refreshRate);
// TextureBean* lightOff = (*m_UIController.m_TextureMap)[ChartletManager::LIGHT_OFF]; }
// if (!lightCfg->IsActive()) { ImGui::SameLine();
// if (ImGui::ImageButton(lightOff->GetTex(), ImVec2(lightOff->m_Width, lightOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) TextureBean* screenFull = (*m_TextureMap)[ChartletManager::SCREEN_FULL];
// { if (ImGui::ImageButton(screenFull->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// lightCfg->SetActive(true); {
// g_log->TraceInfo(_(u8"开启照明").c_str()); m_IsFullScreen = true;
// } glfwSetWindowMonitor(m_GLFWWin, NULL, 0, 0, m_GLFWMode->width, m_GLFWMode->height, m_GLFWMode->refreshRate);
// if (ImGui::IsItemHovered()) { }
// ImGui::SetTooltip(_(u8"开启照明").c_str()); ImGui::SameLine();
// } TextureBean* appClose = (*m_TextureMap)[ChartletManager::APP_CLOSE];
// } if (ImGui::ImageButton(appClose->GetTex(), ImVec2(28, 28), ImVec2(0, 0), ImVec2(1, 1), 0, style->Colors[ImGuiCol_WindowBg]))
// else { {
// if (ImGui::ImageButton(lightOn->GetTex(), ImVec2(lightOn->m_Width, lightOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) { /* if (!m_Controller.m_ScannerCtrl->IsStandBy()) {
// lightCfg->SetActive(false); g_Toast->AddToast(new ToastBean(_(u8"正在打印中,请先结束打印后退出").c_str(), 5000));
// g_log->TraceInfo(_(u8"关闭照明").c_str()); }
// } else*/ {
// if (ImGui::IsItemHovered()) { ImGui::OpenPopup(_(u8"退出系统").c_str());
// ImGui::SetTooltip(_(u8"关闭照明").c_str()); }
// } }
// }
// }
// // MachineCfg* mtc = ConfigManager::GetInstance()->GetMachineCfg(); else {
// // if (mtc->m_MachineType == MachineTypeCfg::HBD_280 || mtc->m_HeatingEnable) { ImGui::SameLine(ImGui::GetWindowWidth() - 300);
// IOCfg* heatCfg = m_UIController.m_IoCfgWrapper->m_Heating; const ImVec2 p1 = ImGui::GetCursorScreenPos();
// if (heatCfg) { char dataBuffer[50];
// TextureBean* heatOn = (*m_UIController.m_TextureMap)[ChartletManager::HEAT_ON]; sprintf_s(dataBuffer, sizeof(dataBuffer), "%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// TextureBean* heatOff = (*m_UIController.m_TextureMap)[ChartletManager::HEAT_OFF]; ImGui::GetWindowDrawList()->AddText(ImVec2(p1.x, p1.y + 5), IM_COL32_WHITE, dataBuffer);
// if (!heatCfg->IsActive()) { //ImGui::Text("%s", TimeHelper::GetStrNow().c_str());
// if (ImGui::ImageButton(heatOff->GetTex(), ImVec2(heatOff->m_Width, heatOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) //ImGui::Text("%s %s", TimeHelper::GetStrNow().c_str(), m_ProductVersion.c_str());
// { }
// heatCfg->SetActive(true); bool exitStopLaserFlag = false;
// m_UIController.m_ScannerCtrl->StartHeatingMotion(); if (ImGui::BeginPopupModal(_(u8"退出系统").c_str(), NULL, ImGuiWindowFlags_NoResize))
// g_log->TraceInfo(_(u8"打开基板加热").c_str()); {
// } ImGui::Text(_(u8"是否确认退出系统").c_str());
// if (ImGui::IsItemHovered()) { ImGui::Separator();
// ImGui::SetTooltip(_(u8"打开基板加热").c_str());
// } if (ImGui::Button(_(u8"").c_str(), ImVec2(120, 0)))
// } {
// else { #ifndef _DEBUG
// if (ImGui::ImageButton(heatOn->GetTex(), ImVec2(heatOn->m_Width, heatOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) { /* if (m_Controller.m_MachineCtrl->IsLaserActive()) {
// m_UIController.m_ScannerCtrl->StopHeatingMotion(false); m_Controller.m_MachineCtrl->StopLaser(false);
// heatCfg->SetActive(false); exitStopLaserFlag = true;
// g_log->TraceInfo(_(u8"关闭基板加热").c_str()); }
// } else*/ {
// if (ImGui::IsItemHovered()) { #endif
// ImGui::SetTooltip(_(u8"关闭基板加热").c_str()); glfwSetWindowShouldClose(m_GLFWWin, GLFW_TRUE);
// } #ifndef _DEBUG
// } }
// } #endif
// // } ImGui::CloseCurrentPopup();
// }
// ImGui::SetItemDefaultFocus();
// TextureBean* checkEnable = (*m_UIController.m_TextureMap)[ChartletManager::CHECK_ENABLE]; ImGui::SameLine();
// TextureBean* checkDiable = (*m_UIController.m_TextureMap)[ChartletManager::CHECK_DISABLE]; if (ImGui::Button(_(u8"取消").c_str(), ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); }
// ImGui::EndPopup();
// if (m_UIController.m_ExtCfg->m_CheckDataWhenInport) { }
// if (ImGui::ImageButton(checkEnable->GetTex(), ImVec2(checkEnable->m_Width, checkEnable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// m_UIController.m_ExtCfg->m_CheckDataWhenInport = !m_UIController.m_ExtCfg->m_CheckDataWhenInport; if (exitStopLaserFlag) {
// g_log->TraceInfo(_(u8"关闭数据检验").c_str()); //m_Controller.m_SystemAssist.exitTickCount = GetTickCount64();
// } //m_Controller.m_SystemAssist.exitSumTime = m_Controller.m_MachineCtrl->GetTimeWhenExit();
// if (ImGui::IsItemHovered()) { //m_Controller.m_MachineCtrl->StopLaser(false);
// ImGui::SetTooltip(_(u8"关闭数据检验").c_str()); ImGui::OpenPopup(_(u8"正在退出系统").c_str());
// } }
// } if (ImGui::BeginPopupModal(_(u8"正在退出系统").c_str(), NULL, ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize)) {
// else { uint64_t tnow = GetTickCount64();
// if (ImGui::ImageButton(checkDiable->GetTex(), ImVec2(checkDiable->m_Width, checkDiable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) { float exitProgress = 1.0f;
// m_UIController.m_ExtCfg->m_CheckDataWhenInport = !m_UIController.m_ExtCfg->m_CheckDataWhenInport; //if (m_Controller.m_SystemAssist.exitSumTime != 0L)exitProgress = (float)(tnow - m_Controller.m_SystemAssist.exitTickCount) / m_Controller.m_SystemAssist.exitSumTime;
// g_log->TraceInfo(_(u8"开启数据检验").c_str()); ImGui::Text(_(u8"系统将在激光器关闭后退出").c_str());
// } ImGui::ProgressBar(exitProgress);
// if (ImGui::IsItemHovered()) { //if (!m_Controller.m_MachineCtrl->IsLaserActive() && exitProgress >= 1.0f) {
// ImGui::SetTooltip(_(u8"开启数据检验").c_str()); // ImGui::CloseCurrentPopup();
// } // glfwSetWindowShouldClose(m_GLFWWin, GLFW_TRUE);
// } //}
// ImGui::EndPopup();
// TextureBean* fit_view = (*m_UIController.m_TextureMap)[ChartletManager::FIT_VIEW]; }
// if (ImGui::ImageButton(fit_view->GetTex(), ImVec2(fit_view->m_Width, fit_view->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
// { ImGui::End();
// if (m_RenderToPreview) }
// m_PrevRenderer->ResetCamera();
// else void UIWin::DrawToolBar()
// m_Renderer->ResetCamera(); {
// ImGui::SetNextWindowPos(ImVec2(0, 70));
// g_log->TraceInfo(_(u8"复位渲染视图").c_str()); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
// } ImGui::Begin("toolbar", (bool*)0, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDecoration);
// if (ImGui::IsItemHovered()) { static bool show_toolbar = false;
// ImGui::SetTooltip(_(u8"复位渲染视图").c_str()); bool isStopAutoPurifier = false;
// } bool isStartAutoPurifier = false;
// if (!show_toolbar) {
// TextureBean* setPlatformLevelPos = ChartletManager::GetInstance()->m_SetPlatformLevelPos; //ImGui::Image((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(), ImVec2((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height));
// if (ImGui::ImageButton(setPlatformLevelPos->GetTex(), ImVec2(setPlatformLevelPos->m_Width, setPlatformLevelPos->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) if (ImGui::IsItemHovered())
// { show_toolbar = true;
// m_UIController.m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(true); }
// Sleep(100); else {
// m_UIController.m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(false); ImGui::BeginGroup();
// m_UIController.m_RunCfg->m_HadSetBasePlatformPoint = true; TextureBean* autoOxygenDisable = ChartletManager::GetInstance()->m_AutoOxygenDisable;
// g_Toast->AddToast(new ToastBean(_(u8"基板缸平面位置确定成功").c_str(), 3000, Toast::COLOR_GREEN)); TextureBean* autoOxygenEnable = ChartletManager::GetInstance()->m_AutoOxygenEnable;
// g_log->TraceInfo(_(u8"基板缸平面位置确定成功").c_str()); //if (m_Controller.m_Purifier->IsAutoDeoxygen()) {
// } // if (ImGui::ImageButton(autoOxygenEnable->GetTex(), ImVec2(autoOxygenEnable->m_Width, autoOxygenEnable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// if (ImGui::IsItemHovered()) { // isStopAutoPurifier = true;
// ImGui::SetTooltip(_(u8"基板缸平面位置确定").c_str()); // }
// } // if (ImGui::IsItemHovered()) {
// // ImGui::SetTooltip(_(u8"关闭一键除氧").c_str());
// TextureBean* resetException = ChartletManager::GetInstance()->m_ResetException; // }
// if (ImGui::ImageButton(resetException->GetTex(), ImVec2(resetException->m_Width, resetException->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) //}
// { /*else*/ {
// m_UIController.m_SignalStateWrapper->m_CylinderExceptionReset->SetValue(true); if (ImGui::ImageButton(autoOxygenDisable->GetTex(), ImVec2((float)autoOxygenDisable->m_Width, (float)autoOxygenDisable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// g_Toast->AddToast(new ToastBean(_(u8"复位异常成功").c_str(), 3000, Toast::COLOR_GREEN)); isStartAutoPurifier = true;
// g_log->TraceInfo(_(u8"复位异常").c_str()); }
// } if (ImGui::IsItemHovered()) {
// if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"开启一键除氧").c_str());
// ImGui::SetTooltip(_(u8"复位异常").c_str()); }
// } }
//
// ImGui::SameLine();
// ImGui::Image((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(), ImVec2((float)(*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (float)(*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height));
// ImGui::EndGroup();
// if (!ImGui::IsItemHovered()) TextureBean* laserOff = (*m_TextureMap)[ChartletManager::LASER_OFF];
// show_toolbar = false; TextureBean* laserOn = (*m_TextureMap)[ChartletManager::LASER_ON];
// }
// /*if (!m_Controller.m_MachineCtrl->IsLaserOn()) */{
// if (isStopAutoPurifier) { if (ImGui::ImageButton(laserOff->GetTex(), ImVec2((float)laserOff->m_Width, (float)laserOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
// ImGui::OpenPopup(_(u8"停止一键除氧确定").c_str()); {
// } //if (m_Controller.m_ScannerCtrl->IsStandBy()) {
// if (ImGui::BeginPopupModal(_(u8"停止一键除氧确定").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { // m_Controller.m_MachineCtrl->StartLaser(false);
// ImGui::Text(_(u8"是否确定停止一键除氧?").c_str()); //}
// ImGui::Spacing(); }
// ImGui::Separator(); if (ImGui::IsItemHovered()) {
// ImVec2 size = ImGui::GetWindowSize(); ImGui::SetTooltip(_(u8"开启激光").c_str());
// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(size.x / 2 - 10, 0))) { }
// /*if (m_UIController.m_ScannerCtrl->IsStandBy()) */{ }
// //m_UIController.m_Purifier->StopAutoDeoxygen(); /*else {
// //g_log->TraceInfo(_(u8"关闭一键除氧").c_str()); if (ImGui::ImageButton(laserOn->GetTex(), ImVec2(laserOn->m_Width, laserOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
// } {
// ImGui::CloseCurrentPopup(); if (m_Controller.m_ScannerCtrl->IsStandBy()) {
// } m_Controller.m_MachineCtrl->StopLaser(false);
// ImGui::SameLine(); }
// if (ImGui::Button(_(u8"取消").c_str(), ImVec2(size.x / 2 - 5, 0))) { }
// ImGui::CloseCurrentPopup(); if (ImGui::IsItemHovered()) {
// } ImGui::SetTooltip(_(u8"关闭激光").c_str());
// ImGui::Spacing(); }
// ImGui::EndPopup(); }*/
// }
// if (isStartAutoPurifier) { //IOCfg* lightCfg = m_Controller.m_IoCfgWrapper->m_LightOn;
// ImGui::OpenPopup(_(u8"开启一键除氧确定").c_str()); TextureBean* lightOn = (*m_TextureMap)[ChartletManager::LIGHT_ON];
// } TextureBean* lightOff = (*m_TextureMap)[ChartletManager::LIGHT_OFF];
// if (ImGui::BeginPopupModal(_(u8"开启一键除氧确定").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { /* if (!lightCfg->IsActive()) {
// ImGui::Text(_(u8"是否确定开启一键除氧?").c_str()); if (ImGui::ImageButton(lightOff->GetTex(), ImVec2(lightOff->m_Width, lightOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
// ImGui::Spacing(); {
// ImGui::Separator(); lightCfg->SetActive(true);
// ImVec2 size = ImGui::GetWindowSize(); g_log->TraceInfo(_(u8"开启照明").c_str());
// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(size.x / 2 - 5, 0))) { }
// if (m_UIController.m_ScannerCtrl->IsStandBy()) { if (ImGui::IsItemHovered()) {
// m_UIController.m_Purifier->StartAutoDeoxygen(); ImGui::SetTooltip(_(u8"开启照明").c_str());
// g_log->TraceInfo(_(u8"开启一键除氧").c_str()); }
// } }
// ImGui::CloseCurrentPopup(); else*/ {
// } if (ImGui::ImageButton(lightOn->GetTex(), ImVec2((float)lightOn->m_Width, (float)lightOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// ImGui::SameLine(); //lightCfg->SetActive(false);
// if (ImGui::Button(_(u8"取消").c_str(), ImVec2(size.x / 2 - 10, 0))) { g_log->TraceInfo(_(u8"关闭照明").c_str());
// ImGui::CloseCurrentPopup(); }
// } if (ImGui::IsItemHovered()) {
// ImGui::Spacing(); ImGui::SetTooltip(_(u8"关闭照明").c_str());
// ImGui::EndPopup(); }
// } }
// ImGui::End();
// ImGui::PopStyleVar(); // MachineCfg* mtc = ConfigManager::GetInstance()->GetMachineCfg();
//} // if (mtc->m_MachineType == MachineTypeCfg::HBD_280 || mtc->m_HeatingEnable) {
//IOCfg* heatCfg = m_Controller.m_IoCfgWrapper->m_Heating;
//if (heatCfg) {
// TextureBean* heatOn = (*m_TextureMap)[ChartletManager::HEAT_ON];
// TextureBean* heatOff = (*m_TextureMap)[ChartletManager::HEAT_OFF];
// if (!heatCfg->IsActive()) {
// if (ImGui::ImageButton(heatOff->GetTex(), ImVec2(heatOff->m_Width, heatOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
// {
// heatCfg->SetActive(true);
// m_Controller.m_ScannerCtrl->StartHeatingMotion();
// g_log->TraceInfo(_(u8"打开基板加热").c_str());
// }
// if (ImGui::IsItemHovered()) {
// ImGui::SetTooltip(_(u8"打开基板加热").c_str());
// }
// }
// else {
// if (ImGui::ImageButton(heatOn->GetTex(), ImVec2(heatOn->m_Width, heatOn->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// m_Controller.m_ScannerCtrl->StopHeatingMotion(false);
// heatCfg->SetActive(false);
// g_log->TraceInfo(_(u8"关闭基板加热").c_str());
// }
// if (ImGui::IsItemHovered()) {
// ImGui::SetTooltip(_(u8"关闭基板加热").c_str());
// }
// }
//}
// }
TextureBean* checkEnable = (*m_TextureMap)[ChartletManager::CHECK_ENABLE];
TextureBean* checkDiable = (*m_TextureMap)[ChartletManager::CHECK_DISABLE];
/* if (m_Controller.m_ExtCfg->m_CheckDataWhenInport) {
if (ImGui::ImageButton(checkEnable->GetTex(), ImVec2(checkEnable->m_Width, checkEnable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
m_Controller.m_ExtCfg->m_CheckDataWhenInport = !m_Controller.m_ExtCfg->m_CheckDataWhenInport;
g_log->TraceInfo(_(u8"关闭数据检验").c_str());
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"关闭数据检验").c_str());
}
}
else */{
if (ImGui::ImageButton(checkDiable->GetTex(), ImVec2((float)checkDiable->m_Width, (float)checkDiable->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0)) {
//m_Controller.m_ExtCfg->m_CheckDataWhenInport = !m_Controller.m_ExtCfg->m_CheckDataWhenInport;
g_log->TraceInfo(_(u8"开启数据检验").c_str());
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"开启数据检验").c_str());
}
}
TextureBean* fit_view = (*m_TextureMap)[ChartletManager::FIT_VIEW];
if (ImGui::ImageButton(fit_view->GetTex(), ImVec2((float)fit_view->m_Width, (float)fit_view->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
{
if (m_RenderToPreview)
m_PrevRenderer->ResetCamera();
else
m_Renderer->ResetCamera();
g_log->TraceInfo(_(u8"复位渲染视图").c_str());
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"复位渲染视图").c_str());
}
TextureBean* setPlatformLevelPos = ChartletManager::GetInstance()->m_SetPlatformLevelPos;
if (ImGui::ImageButton(setPlatformLevelPos->GetTex(), ImVec2((float)setPlatformLevelPos->m_Width, (float)setPlatformLevelPos->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
{
m_Controller.m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(true);
Sleep(100);
m_Controller.m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(false);
/*m_Controller.m_RunCfg->m_HadSetBasePlatformPoint = true;*/
g_Toast->AddToast(new ToastBean(_(u8"基板缸平面位置确定成功").c_str(), 3000, Toast::COLOR_GREEN));
g_log->TraceInfo(_(u8"基板缸平面位置确定成功").c_str());
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"基板缸平面位置确定").c_str());
}
TextureBean* resetException = ChartletManager::GetInstance()->m_ResetException;
if (ImGui::ImageButton(resetException->GetTex(), ImVec2((float)resetException->m_Width, (float)resetException->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
{
m_Controller.m_SignalStateWrapper->m_CylinderExceptionReset->SetValue(true);
g_Toast->AddToast(new ToastBean(_(u8"复位异常成功").c_str(), 3000, Toast::COLOR_GREEN));
g_log->TraceInfo(_(u8"复位异常").c_str());
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"复位异常").c_str());
}
ImGui::EndGroup();
if (!ImGui::IsItemHovered())
show_toolbar = false;
}
if (isStopAutoPurifier) {
ImGui::OpenPopup(_(u8"停止一键除氧确定").c_str());
}
if (ImGui::BeginPopupModal(_(u8"停止一键除氧确定").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text(_(u8"是否确定停止一键除氧?").c_str());
ImGui::Spacing();
ImGui::Separator();
ImVec2 size = ImGui::GetWindowSize();
if (ImGui::Button(_(u8"确定").c_str(), ImVec2(size.x / 2 - 10, 0))) {
/*if (m_Controller.m_ScannerCtrl->IsStandBy()) */{
//m_Controller.m_Purifier->StopAutoDeoxygen();
//g_log->TraceInfo(_(u8"关闭一键除氧").c_str());
}
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button(_(u8"取消").c_str(), ImVec2(size.x / 2 - 5, 0))) {
ImGui::CloseCurrentPopup();
}
ImGui::Spacing();
ImGui::EndPopup();
}
if (isStartAutoPurifier) {
ImGui::OpenPopup(_(u8"开启一键除氧确定").c_str());
}
if (ImGui::BeginPopupModal(_(u8"开启一键除氧确定").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text(_(u8"是否确定开启一键除氧?").c_str());
ImGui::Spacing();
ImGui::Separator();
ImVec2 size = ImGui::GetWindowSize();
if (ImGui::Button(_(u8"确定").c_str(), ImVec2(size.x / 2 - 5, 0))) {
//if (m_Controller.m_ScannerCtrl->IsStandBy()) {
// m_Controller.m_Purifier->StartAutoDeoxygen();
// g_log->TraceInfo(_(u8"开启一键除氧").c_str());
//}
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button(_(u8"取消").c_str(), ImVec2(size.x / 2 - 10, 0))) {
ImGui::CloseCurrentPopup();
}
ImGui::Spacing();
ImGui::EndPopup();
}
ImGui::End();
ImGui::PopStyleVar();
}
void UIWin::SetupDockSpace(void) void UIWin::SetupDockSpace(void)
{ {
@ -592,7 +603,7 @@ void UIWin::SetupDockSpace(void)
void UIWin::Display() { void UIWin::Display() {
//g_log->TraceInfo(_(u8"系统启动").c_str()); g_log->TraceInfo(_(u8"系统启动").c_str());
while (!glfwWindowShouldClose(m_GLFWWin)) while (!glfwWindowShouldClose(m_GLFWWin))
{ {
//glfwPollEvents(); //glfwPollEvents();
@ -602,7 +613,6 @@ void UIWin::Display() {
ImGui::NewFrame(); ImGui::NewFrame();
Draw(); Draw();
SetupDockSpace();
ImGui::Render(); ImGui::Render();
glfwGetFramebufferSize(m_GLFWWin, &m_winWidth, &m_winHeight); glfwGetFramebufferSize(m_GLFWWin, &m_winWidth, &m_winHeight);
@ -617,5 +627,5 @@ void UIWin::Display() {
glfwSwapBuffers(m_GLFWWin); glfwSwapBuffers(m_GLFWWin);
} }
//g_log->TraceInfo(_(u8"系统退出").c_str()); g_log->TraceInfo(_(u8"系统退出").c_str());
} }

View File

@ -4,9 +4,13 @@
#include "../external/imgui/glfw3.h" #include "../external/imgui/glfw3.h"
#include "../external/imgui/imgui.h" #include "../external/imgui/imgui.h"
#include "../Render/Renderer.h" #include "../Render/Renderer.h"
//#include "UIController.h" #include "Controller.h"
#include "UIBean.h" #include "UIBean.h"
#include "TextureBean.h"
#include "../Registration/Registration.h" #include "../Registration/Registration.h"
#include "../DataManage/DataHandle.h"
class UIWin { class UIWin {
public: public:
@ -17,9 +21,9 @@ public:
private: private:
void SetupDockSpace(void); void SetupDockSpace(void);
//void DrawTitleBar(); void DrawTitleBar();
void Draw(); void Draw();
//void DrawToolBar(); void DrawToolBar();
private: private:
GLFWwindow* m_GLFWWin; GLFWwindow* m_GLFWWin;
GLFWwindow* m_SplashWin; GLFWwindow* m_SplashWin;
@ -57,7 +61,7 @@ private:
const int DEFAULT_WIN_WIDTH = 1440; const int DEFAULT_WIN_WIDTH = 1440;
const int DEFAULT_WIN_HEIGHT = 900; const int DEFAULT_WIN_HEIGHT = 900;
int STATUS_HEIGHT = 45; int STATUS_HEIGHT = 45;
//UIController m_UIController; Controller m_Controller;
VLRenderer* m_Renderer; VLRenderer* m_Renderer;
VLRenderer* m_PrevRenderer; VLRenderer* m_PrevRenderer;
@ -79,4 +83,6 @@ private:
bool m_IsShowInitError; bool m_IsShowInitError;
string m_ProductVersion; string m_ProductVersion;
map<string, TextureBean*>* m_TextureMap ;
}; };

View File

@ -1,4 +1,4 @@
/**************************************************************************************/ /**************************************************************************************/
/* */ /* */
/* Visualization Library */ /* Visualization Library */
/* http://visualizationlibrary.org */ /* http://visualizationlibrary.org */
@ -228,7 +228,7 @@ namespace vl
//! @param tangent [out] Returns the tangent vector of the vertices. This parameter is mandatory. //! @param tangent [out] Returns the tangent vector of the vertices. This parameter is mandatory.
//! @param bitangent [out] Returns the bitangent vector of the vertics. This parameter can be NULL. //! @param bitangent [out] Returns the bitangent vector of the vertics. This parameter can be NULL.
// Based on: // Based on:
// Lengyel, Eric. “Computing Tangent Space Basis Vectors for an Arbitrary Mesh”. Terathon Software 3D Graphics Library, 2001. // Lengyel, Eric. 揅omputing Tangent Space Basis Vectors for an Arbitrary Mesh? Terathon Software 3D Graphics Library, 2001.
// http://www.terathon.com/code/tangent.html // http://www.terathon.com/code/tangent.html
static void computeTangentSpace( static void computeTangentSpace(
u32 vert_count, u32 vert_count,

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "stdafx.h" #include "stdafx.h"
//#include "config/bean/SystemBase.h" #include "config/bean/SystemBase.h"
extern std::string g_AppPath; extern std::string g_AppPath;
extern std::string g_AppDisk; extern std::string g_AppDisk;
extern bool g_isDebug; extern bool g_isDebug;
extern uint32_t g_ScanSerial; extern uint32_t g_ScanSerial;
extern string g_gno; extern string g_gno;
//extern UserType g_Admin; extern UserType g_Admin;

View File

@ -1,6 +1,6 @@
[Window][MainDockSpace] [Window][MainDockSpace]
Pos=0,40 Pos=0,40
Size=1920,995 Size=1536,779
Collapsed=0 Collapsed=0
[Window][Debug##Default] [Window][Debug##Default]
@ -8,6 +8,21 @@ Pos=60,60
Size=400,400 Size=400,400
Collapsed=0 Collapsed=0
[Docking][Data] [Window][Dear ImGui Demo]
DockSpace ID=0x0204CCDD Window=0xDEDC5B90 Pos=0,40 Size=1920,995 CentralNode=1 Pos=848,106
Size=550,680
Collapsed=0
[Window][TitleBar]
Pos=0,0
Size=1536,40
Collapsed=0
[Window][toolbar]
Pos=0,70
Size=32,32
Collapsed=0
[Docking][Data]
DockSpace ID=0x0204CCDD Window=0xDEDC5B90 Pos=0,40 Size=1536,779 CentralNode=1

View File

@ -1,4 +1,4 @@
// Copyright 2016 Google Inc. All Rights Reserved. // Copyright 2016 Google Inc. All Rights Reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -400,14 +400,13 @@ class civil_time {
preserves_data<U, T>* = nullptr) noexcept preserves_data<U, T>* = nullptr) noexcept
: civil_time(ct.f_) {} : civil_time(ct.f_) {}
// Factories for the maximum/minimum representable civil_time. static CONSTEXPR_F auto(max)() -> civil_time {
static CONSTEXPR_F civil_time(max)() { const auto max_year = (std::numeric_limits<std::int_least64_t>::max)();
const auto max_year = (std::numeric_limits<std::int_least64_t>::max)(); return civil_time(max_year, 12, 31, 23, 59, 59);
return civil_time(max_year, 12, 31, 23, 59, 59);
} }
static CONSTEXPR_F civil_time(min)() { static CONSTEXPR_F auto(min)() -> civil_time {
const auto min_year = (std::numeric_limits<std::int_least64_t>::min)(); const auto min_year = (std::numeric_limits<std::int_least64_t>::min)();
return civil_time(min_year, 1, 1, 0, 0, 0); return civil_time(min_year, 1, 1, 0, 0, 0);
} }
// Field accessors. Note: All but year() return an int. // Field accessors. Note: All but year() return an int.

View File

@ -4,7 +4,6 @@
#include <thread> #include <thread>
#include <codecvt> #include <codecvt>
#include <grpcpp/grpcpp.h> #include <grpcpp/grpcpp.h>
#include "DataManage/DataHandle.h"
#include "UI/UIWin.h" #include "UI/UIWin.h"
#include "global.h" #include "global.h"
#include "SystemInfo.h" #include "SystemInfo.h"
@ -17,7 +16,6 @@
#include "Machine/HBD1000.h" #include "Machine/HBD1000.h"
#include "LanguageManager.h" #include "LanguageManager.h"
//UserType g_Admin;
string g_AppPath; string g_AppPath;
string g_AppDisk; string g_AppDisk;
Logger* g_log; Logger* g_log;
@ -37,20 +35,36 @@ public:
~HBDSystem() ~HBDSystem()
{ {
if (m_win != nullptr)delete m_win;
//ConfigManager::GetInstance()->SaveConfig(); //ConfigManager::GetInstance()->SaveConfig();
DELP(g_log); DELP(g_log);
DELP(g_Toast); DELP(g_Toast);
DELP(m_controller);
DELP(m_win);
} }
bool init(){ bool init(){
char szFilePath[MAX_PATH + 1] = { 0 };
GetModuleFileName(NULL, szFilePath, MAX_PATH);
(strrchr(szFilePath, '\\'))[1] = 0;
g_AppPath = szFilePath;
g_AppDisk = g_AppPath.substr(0, 2);
g_isDebug = false; g_isDebug = false;
g_log = new Logger(); g_log = new Logger();
g_log->m_LogDao->Init(); g_log->m_LogDao->Init();
g_SystemInfo = new SystemInfo(); g_SystemInfo = new SystemInfo();
g_Toast = new Toast(); g_Toast = new Toast();
g_Lang = (char*)"zh_CN";
m_controller = new Controller();
m_controller->Init();
DataHandle::Instance()->Init();
m_win = new UIWin(); m_win = new UIWin();
if (!m_win->Init()) return false; if (!m_win->Init()) return false;
return true; return true;
} }
@ -59,37 +73,32 @@ public:
} }
private: private:
UIWin* m_win; UIWin* m_win;
Controller* m_controller;
}; };
int main(int argc, char** argv) { //int main(int argc, char** argv) {
printf("你好!" ); // printf("你好!" );
//
DataHandle* dataHandle = new DataHandle(); // DataHandle* dataHandle = new DataHandle();
dataHandle->Init(); // dataHandle->Init();
printf("你好fdfdfd"); // printf("你好fdfdfd");
HBDSystem* system = new HBDSystem(); // HBDSystem* system = new HBDSystem();
system->init(); // system->init();
system->run(); // system->run();
//
return 0; // return 0;
//
} //}
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,_In_opt_ HINSTANCE hPrevInstance,_In_ LPWSTR lpCmdLine,_In_ int nCmdShow) { 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(); HBDSystem* system = new HBDSystem();
system->init(); system->init();
system->run(); system->run();
DELP(system);
return 0; return 0;
} }

View File

@ -0,0 +1,23 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Dear ImGui Demo]
Pos=1049,244
Size=550,680
Collapsed=0
[Window][TitleBar]
Pos=0,0
Size=1536,40
Collapsed=0
[Window][MainDockSpace]
Pos=0,40
Size=1536,779
Collapsed=0
[Docking][Data]
DockSpace ID=0x0204CCDD Window=0xDEDC5B90 Pos=0,40 Size=1536,779 CentralNode=1

View File

@ -0,0 +1,15 @@
Visualization Library v2.0.0 [f32]
Dec 24 2020 - 15:48:43 - MSVC compiler [RELEASE] [x64]
--- Environment ---
VL_LOGFILE_PATH <not present>
VL_DATA_PATH <not present>
VL_VERBOSITY_LEVEL <not present>
VL_CHECK_GL_STATES <not present>
--- Global Settings ---
Log file = log.txt
Data path = ../data
Verbosity level = ERROR
Check OpenGL States = NO

Binary file not shown.

Binary file not shown.