加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
fuquanyuo 提交于 2024-04-28 11:13 . V1.00
#define _CRT_SECURE_NO_WARNING
#include "config\help.h"
#include"frontend/Ch.h"
#include"frontend/Emoji.h"
#include"frontend/login/F_Login.h"
#include"frontend/login/interface/F_L_Login.h"
#include"frontend/login/interface/F_L_Start.h"
#include"frontend/login/interface/F_L_Regist.h"
#include"frontend/center/F_Center.h"
#include"backend/center/B_Center.h"
#include"utils/db-lite/LiteConn.h"
#include"backend/center/GetFilePath.h"
#include <windows.h>
#include <iostream>
int main() {
//std::cout << "hello world" << std::endl;
//删除AccountTable
//LiteConn db("EmojiSystem");
//std::string deleteTableSQL = R"(
// drop table AccountTable
// )";
//db.update(deleteTableSQL);
B_Login b_login;
b_login.initAccountTable();
B_Center b_center;
b_center.initCenterTable();
//---创建窗口---
initgraph(1120, 700);
setbkcolor(WHITE);
cleardevice();
Front* Interface = new F_L_Start;
BeginBatchDraw();
while (1)
{
ExMessage msg;
if (peekmessage(&msg))
{
//1、绘制界面
Interface->Draw();
//2、更新界面
Interface->Update(msg);
//3、退出界面
ButtonDistinction distinction = Interface->Quit(msg);
if (distinction == QuitSystem)
{
delete Interface;
EndBatchDraw();
closegraph();
return 0;
}
else if (distinction == Start)
{
delete Interface;
Interface = new F_L_Start;
}
else if (distinction == Login)
{
delete Interface;
Interface = new F_L_Login;
}
else if (distinction == Regist)
{
delete Interface;
Interface = new F_L_Regist;
}
else if (distinction == Center)
{
string tempAccount = Interface->Account;
delete Interface;
Interface = new F_Center(tempAccount);
/*Interface = new F_Center;
F_Center->Account = account1;*/
}
FlushBatchDraw();
}
}
EndBatchDraw();
delete Interface;
system("pause");
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化