1、/查询设备结果 void delequ();/删除设备界面 void change();/修改界面 void user();/用户界面 void report();/上报信息界面 void findreport();/上报信息显示界面 void about();/关于我们界面 void help();/帮助界面 void thank();/退出界面 int save();/文件保存 int load();/文件读取 struct Equipt /结构体(设备信息) char equiptname20;/设备名称 char equiptnumber20;/设备编号 char price20;/设
2、备价格 char buytime20 ;/购买时间 char location20;/所在位置 char condition20;/设备状态 char staff20;/操作人员 char number20;/联系方式 char usetime20;/操作时间 ;Equipt Et100; struct Report/结构体(上报信息) char roomnumber20;/教室编号 char fault20;/故障现象 char reporter20;/上报人员/联系方式 char reporttime20;/上报时间 ;Report Rt100; struct User/结构体 char
3、username30;/用户名 char bianhao30;/编号 char number30;User ur100; char username50; /用户名 char userpassword50;/密码 char glyname50;/管理员账户 char glypassword50;/管理员密码 char* inputstring(int x,int y) PIMAGE img = newimage(); setbkmode(TRANSPARENT); getimage(img,x,y-20,200,50); char str20; char c; int i=0; setcolo
4、r(0x3FA61F); setfont(26,0,宋体); while(1) c=getch(); if(c=27) /ESC return #ESC; else if(i0&c=b) i-; stri=0 putimage(x,y-20,img,PATCOPY); putimage(x,y-20,img,SRCCOPY); outtextxy(x,y,str); else if(c!=r stri+=c; stri= else return str;int main() setinitmode(0);/去掉启动动画 initgraph(690,500); / 初始化,显示一个窗口,这里和
5、TC 略有区别 welcome(); return 0;void welcome()/欢迎界面 PIMAGE welcomeing=newimage();/定义变量 getimage(welcomeing,image/welcome.jpg/获取图片数据 putimage(0,0,welcomeing);/图片显示在屏幕窗体上 char key=getch(); switch(key) case0:exit(0); break; default:login(); return ;void login()/登陆界面 PIMAGE logining=newimage(); getimage(log
6、ining,image/login.jpg putimage(0,0,logining);1logingly();2loginuser(); case 27: save();void logingly()/管理员登陆界面 PIMAGE loginglying=newimage(); getimage(loginglying,image/login1.jpg while(1) putimage(0,0,loginglying); strcpy(glyname,inputstring(410,115); strcpy(glypassword,inputstring(410,160); if(str
7、cmp(glyname,guanliyuan)=0&strcmp(glypassword,123456)=0) manner(); outtextxy(420,340,用户名或密码错误reggly();3password();4about();5help();void loginuser()/用户登录界面 PIMAGE loginusering=newimage(); getimage(loginusering, putimage(0,0,loginusering); strcpy(username,inputstring(410,115); strcpy(userpassword,input
8、string(410,160); if(strcmp(username,userstrcmp(userpassword, user();void reggly()/管理员注册界面 PIMAGE regglying=newimage(); getimage(regglying,image/reg.jpg putimage(0,0,regglying); strcpy(glyname,inputstring(175,74); if(strcmp(glyname, return ; strcpy(glypassword,inputstring(175,140); if(strcmp(glypassw
9、ord, strcpy(glypassword,inputstring(175,197); strcpy(glypassword,inputstring(175,267); strcpy(glypassword,inputstring(175,333); regok();void reguser()/注册界面 PIMAGE regusering=newimage(); getimage(regusering, putimage(0,0,regusering); strcpy(username,inputstring(175,74); if(strcmp(username, strcpy(use
10、rpassword,inputstring(175,140); if(strcmp(userpassword, strcpy(userpassword,inputstring(175,197); strcpy(userpassword,inputstring(175,267); strcpy(userpassword,inputstring(175,333);void regok()/注册成功页面 PIMAGE regoking=newimage(); getimage(regoking,image/regok.jpg putimage(0,0,regoking); getch(); logi
11、n();void password()/修改密码页面 PIMAGE passwording=newimage(); getimage(passwording,image/password.jpg putimage(0,0,passwording); strcpy(userpassword,inputstring(221,121 ); strcpy(userpassword,inputstring(221,123); strcpy(userpassword,inputstring(221,188); strcpy(userpassword,inputstring(221,252); strcpy
12、(userpassword,inputstring(221,317); passwordok();void passwordok()/修改密码成功页面 PIMAGE passwordoking=newimage(); getimage(passwordoking,image/passwordok.png putimage(0,0,passwordoking);void manner()/管理员界面 PIMAGE mannering=newimage(); getimage(mannering,image/manner.png putimage(0,0,mannering);mannerS();
13、usermanner();findreport();void usermanner()/用户管理界面 PIMAGE usermannering=newimage(); getimage(usermannering,image/usermanner.png putimage(0,0,usermannering); char c=getch(); switch(c) casedel();break;userinfo();manner();void userinfo()/用户信息界面 PIMAGE userinfoing=newimage(); getimage(userinfoing,image/
14、userinfo.jpg putimage(0,0,userinfoing); char username20=u,ser printf(%s,username); char bianhao20= char number20=6 for(int i=0;i0) outtextxy(124,184+40*i,bianhao); outtextxy(248,184+40*i,username); outtextxy(406,184+40*i,number); char key=getch(); switch(key) user();break ; return;void del()/删除用户界面
15、cleardevice();/清屏 PIMAGE deling=newimage(); getimage(deling,image/del.jpg putimage(0,0,deling); char bianhao20; strcpy(bianhao,inputstring(170,203); for(int i=0;100; if(strcmp(bianhao,uri.bianhao)=0) for(int j=i+1;j100-i;j+) Eti=Etj; outtextxy(100,450, 删除成功/设置位置 char c=ege:getch();void mannerS()/设备管
16、理界面 PIMAGE mannerSing=newimage(); getimage(mannerSing,image/mannerS.png putimage(0,0,mannerSing); char bb10;add();/跳转添加设备界面 delequ();/跳转删除界面 change();/跳转修改界面find();/跳转查询界面 case 27:void add()/设备添加界面 PIMAGE adding=newimage(); getimage(adding,image/add.png putimage(0,0,adding); PIMAGE h=newimage(); get
17、image(h, setbkmode(TRANSPARENT); char c; putimage(0,0,adding); setfont(25,0, if(strlen(Eti.equiptname)1) /发现空位置 strcpy(Eti.equiptname,inputstring(203,55); strcpy(Eti.equiptnumber,inputstring(203,99); strcpy(Eti.price,inputstring(203,141); strcpy(Eti.buytime,inputstring(203,184); strcpy(Eti.location,
18、inputstring(203,228); strcpy(Eti.condition,inputstring(203,271); strcpy(Eti.staff,inputstring(203,323); strcpy(Eti.number,inputstring(203,366); strcpy(Eti.usetime,inputstring(203,411); break; setfont(30,0,黑体/设置字体大小 类型 outtextxy(65, 446, 录入成功: switch(c) case 27:void user()/用户界面 PIMAGE usering=newimage(); getimage(usering,image/user.png putimage(0,0,usering);report();void report()/上报信息界面 PIMAGE reporting=newimage(); getimage(reporting,image/report.jpg putimage(0,0,reporting); if(strlen(Rti.
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1