门诊病历信息管理系统实验报告内容摘要:

pplication help,About the author}。 /*help菜单项的下拉选项 */ char temp。 /*用于存储临时字符 */ L0: init_menu()。 /*初始化菜单 */ gettext(17,2,25,11,file_buf2)。 /*将一块区域存储到 file_buf2中 */ gettext(36,2,44,15,edit_buf2)。 gettext(55,2,73,7,help_buf2)。 for(。 ) /*死循环 ,一直检测按键 ,直到退出*/ { L1: while(bioskey(1)==0)。 /*有键按下时才继续 */ key0=key1=bioskey(0)。 key0=key0amp。 0xff。 key1=key1amp。 0xff?0:key18。 if(key1==KEY_ALT_X) /*若按下 alt+x,则退出程序 */ { window(1,1,80,25)。 gotoxy(25,10)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 cprintf(Do you really want to exit?(Y or N))。 temp=getche()。 if(temp==39。 y39。 ||temp==39。 Y39。 ) exit(0)。 else goto L0。 } if(key1==KEY_ALT_F) /*Alt+F拉出 file下拉菜单 */ { L2: window(17,2,25,2)。 textbackground(BLACK)。 textcolor(WHITE)。 clrscr()。 gotoxy(2,1)。 cprintf(%s,menu[0])。 /*按下 alt+f后让 file显示为白色 ,背景为黑 ,表示选中 */ window(17,3,25,11)。 textbackground(LIGHTCYAN)。 /*背景为洋青 */ textcolor(BLACK)。 clrscr()。 for(k=0。 k4。 k++) /*输出 file的下拉菜单 */ { gotoxy(3,2*k+2)。 cprintf(%s,file[k])。 } gettext(17,3,25,11,file_buf)。 /*保存被 File下拉菜单覆盖的区域 */ /*gettext()和puttext()参数的坐标始终是相对于屏幕的 (即绝对坐标 )*/ textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,2)。 cprintf(%s,file[0])。 while(bioskey(1)==0)。 key0=key1=bioskey(0)。 key0=key0amp。 0xff。 key1=key1amp。 0xff?0:key18。 y=3。 /*y是当前选中项目的纵坐标 */ for(。 ) { if(key1==KEY_ALT_X) /*Alt+X:退出 */ { window(1,1,80,25)。 puttext(17,2,25,11,file_buf2)。 /*还原已经拉下的file下拉菜单 */ gotoxy(25,10)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 cprintf(Do you really want to exit?(Y or N))。 /*提示是否退出 */ temp=getche()。 if(temp==39。 y39。 ||temp==39。 Y39。 ) exit(0)。 else goto L0。 } if(key0==KEY_ESC) /*esc用于还原已经拉下的下拉菜单 */ goto L0。 if(key1==KEY_ALT_E) /*Alt+E拉出 edit下拉菜单 */ { init_menu()。 goto L3。 } if(key1==KEY_ALT_H) /*Alt+F拉出 help下拉菜单 */ { init_menu()。 goto L4。 } if(key1==KEY_RIGHT) /*向右的箭头可以使下拉菜单移动到下一个菜单中 */ { init_menu()。 goto L3。 } if(key1==KEY_LEFT) /*向左的箭头可以使下拉菜单移动到下一个菜单中 */ { init_menu()。 goto L4。 } if(key1==KEY_DOWN) /*向下的箭头选择下一个菜单项 */ { puttext(17,3,25,11,file_buf)。 if(y==3) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,4)。 cprintf(%s,file[1])。 y=5。 } else if(y==5) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,6)。 cprintf(%s,file[2])。 y=7。 } else if(y==7) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,8)。 cprintf(%s,file[3])。 y=9。 } else if(y==9) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,2)。 cprintf(%s,file[0])。 y=3。 } } if(key1==KEY_UP) /*向上的箭头选择上一个菜单项 */ { puttext(17,3,25,11,file_buf)。 if(y==3) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,8)。 cprintf(%s,file[3])。 y=9。 } else if(y==9) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,6)。 cprintf(%s,file[2])。 y=7。 } else if(y==7) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,4)。 cprintf(%s,file[1])。 y=5。 } else if(y==5) { textbackground(BLACK)。 textcolor(WHITE)。 gotoxy(3,2)。 cprintf(%s,file[0])。 y=3。 } } if(key0==KEY_ENTER) /*回车键表示进行某项操作 */ { switch(y) { case 3: window(1,1,80,25)。 puttext(17,2,25,11,file_buf2)。 window(2,4,78,23)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 clrscr()。 num=create(amp。 head)。 system(cls)。 goto L0。 case 5: window(1,1,80,25)。 puttext(17,2,25,11,file_buf2)。 window(2,4,78,23)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 clrscr()。 save(head)。 system(cls)。 goto L0。 case 7: window(1,1,80,25)。 puttext(17,2,25,11,file_buf2)。 window(2,4,78,23)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 clrscr()。 load(amp。 head)。 system(cls)。 goto L0。 case 9: window(1,1,80,25)。 puttext(17,2,25,11,file_buf2)。 gotoxy(25,10)。 textbackground(LIGHTGRAY)。 textcolor(BLACK)。 cprintf(Do you really want to exit?(Y or N))。 temp=getche()。 if(temp==39。 y39。 ||temp==39。 Y39。 ) exit(0)。 else goto L0。 } } while(bioskey(1)==0)。 key0=key1=bioskey(0)。 key0=key0amp。 0xff。 key1=key1amp。 0xff?0:key18。 } } if(key1==KEY_ALT_E) /*Alt+E拉出 edit下拉菜单 */ { L3: window(36,2,44,2)。 textbackground(BLACK)。 textcolor(WHITE)。 clrscr()。 gotoxy(2,1)。 cprintf(%s,menu[1])。 window(36,3,44,15)。 textbackground(LIGHTCYAN)。 textcol。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。