餐餐馆馆点点菜菜系系统统C语语言言源源代代码码
餐馆点菜系统c语言的源代码,一些封装的函数,对链表的操作,还有文件的存取,供 家参考,具体内容如下
#include "public.h"
struct NODE *myhead;
struct NODE *orderhead;
struct NODE *ashead;
char waiter_ID[ +1];
/*******************************设置输入框颜色******************************************
*
名称:设置输入框颜色
参数:
iNum 表示: 编辑框的长度
功能:
*************************************************************************************/
void SetColorEdit(int iNum)
{
SetColor( ,1 );
while (iNum--)
{
putchar(' ');
}
}
void SetColor(unsigned short ForeColor,unsigned short BackGroundColor)
{
HANDLE hCon=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon,(ForeColor%16)|(BackGroundColor%16*16));
}
/*******************************编辑框aUI函数*******************************************
名称:编辑框aUI函数
参数:
iLong 表示: 编辑框的长度
iWide 表示: 编辑框的宽度
x 表示: 编辑框起始行位置
y 表示: 编辑框起始列位置
acBuffer
表示: 编辑框显示的内容
功能:
在x行y列制作一个长为iLong宽为iWide的编辑框,框中文本显示acBuffer字符串的内容
*************************************************************************************/
void UI_EditBox(int iLong,int iWide,int x,int y,char acBuffer[30])
{
int i; /*宽*/
int j; /*长*/
Gotoxy(x,y);
for(i = 0; i <= iWide; i++)
{
Gotoxy(x+i,y);
if(i == 0 || i == iWide)
{
for(j = 0; j <= iLong; j++)
{
if(i == 0 && j == 0)
{
printf("┏");
}
else if(i == 0 && j == iLong)
{
printf("┓");
}
else if(i == iWide && j == 0)
{
printf("┗");
}
else if(i == iWide && j == iLong)
{
printf("┛");
}
else
{
printf("┅");
}
}
}
else
{
Gotoxy(x+i,y);
printf ("┇");
Gotoxy(x+i,y+2*iLong);
printf ("┇");
}
putchar ('\n');
}
Gotoxy(x + 1,y + 2);
printf ("%s",acBuffer);
}
/*************************
如果觉得《餐厅点菜c语言程序代码 餐馆点菜系统C语言源代码.pdf》对你有帮助,请点赞、收藏,并留下你的观点哦!