⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print.c

📁 用于小商品消费的SMS消费机程序
💻 C
📖 第 1 页 / 共 2 页
字号:
//		Print_Line(buf, 10, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"(元)", 6, 3);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		buf[2] = 17;
//		Printer_CreateTable(3, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易金额", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		if(ChargeMode2 ==MODE_CHARGE_INC)
//		{
//			sprintf(buf, ": %7.2f", (float)CardInfo.hChargeMoney/100);
//		}
//		else
//		{
//			sprintf(buf, ": %7.2f", -(float)CardInfo.hChargeMoney/100);
//		}
//		for(i=10;i>1;i--)
//		{
//			if(buf[i]==' ')
//			{
//				buf[i] = '*';
//				break;
//			}
//		}
//		Print_Line(buf, 10, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"(元)", 6, 3);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		buf[2] = 17;
//		Printer_CreateTable(3, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"现存金额", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		sprintf(buf, ": %7.2f", (float)CardInfo.Money/100);
//		for(i=10;i>1;i--)
//		{
//			if(buf[i]==' ')
//			{
//				buf[i] = '*';
//				break;
//			}
//		}
//		Print_Line(buf, 10, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"(元)", 6, 3);
//
//		buf[0] = 1;
//		Printer_CreateTable(1, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易情况:已完成", 16, 3);
//
//		get_date(ASCDateTime);
//		get_time(ASCDateTime+8);
//		buf[0] = 1;//交易时间
//		buf[1] = 7;//: 2002
//		buf[2] = 13;//年
//		buf[3] = 15;//09
//		buf[4] = 17;//月
//		buf[5] = 19;//03
//		buf[6] = 21;//日
//		buf[7] = 24;//10:30:00
//		Printer_CreateTable(8, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易时间", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		buf[0] = ':';
//		buf[1] = ' ';
//		memcpy(buf+2, ASCDateTime, 4);
//		Print_Line(buf, 6, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"年", 2, 2);
//		Printer_MoveTable(4);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+4 , 2);
//		Print_Line(buf, 2, 0);
//		Printer_MoveTable(5);
//		Print_Line((unsigned char*)"月", 2, 2);
//		Printer_MoveTable(6);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+6 , 2);
//		Print_Line(buf, 2, 0);
//		Printer_MoveTable(7);
//		Print_Line((unsigned char*)"日", 2, 2);
//		Printer_MoveTable(8);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+8 , 2);
//		buf[2] = ':';
//		memcpy(buf+3, ASCDateTime+10 , 2);
//		buf[5] = ':';
//		memcpy(buf+6, ASCDateTime+12 , 2);
//		Print_Line(buf, 8, 1);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		Printer_CreateTable(2, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"充值员号", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		memcpy(buf, ": ", 2);
//		memcpy(buf+2, BCD2ASC(Worker, 4), 8);
//		Print_Line(buf, 10, 1);		
//
//		Print_SetColor(1);
//		Print_Line((unsigned char*)"=================================", 33, 1);
//
//		Print_SetColor(0);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Cut(0);
//	}
//	else if(mode==1)
//	{
//		buf[0] = 1;
//		buf[1] = 7;
//		Printer_CreateTable(2, buf);
//		Printer_MoveTable(2);		
//		Print_Title((unsigned char*)"株洲公交IC卡交易凭条", 22);
//
//		Print_SetColor(1);
//		Print_Line((unsigned char*)"=================================", 33, 1);
//		Print_SetColor(0);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		Printer_CreateTable(2, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"客户卡号", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		sprintf(buf, ": %012ld", CardInfo.CardNo);
//		Print_Line(buf, 14, 1);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		buf[2] = 18;
//		buf[3] = 22;
//		Printer_CreateTable(4, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"充值机号", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		buf[20] = DeviceNo[3];
//		buf[21] = DeviceNo[2];
//		buf[22] = DeviceNo[1];
//		buf[23] = DeviceNo[0];
//		sprintf(buf, ": %8s", BCD2ASC(buf+20,4));
//		Print_Line(buf, 10, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"流水号", 6, 2);
//		Printer_MoveTable(4);
//		memset(buf, 0 ,40);
//		sprintf(buf, ": %08ld", TradeCounter);
//		Print_Line(buf, 10, 1);
//
//		buf[0] = 1;//交易次数
//		buf[1] = 7;//:2002
//		buf[2] = 13;//年
//		buf[3] = 15;//09
//		buf[4] = 17;//月
//		buf[5] = 19;//0000
//		buf[6] = 23;//(次) 
//		Printer_CreateTable(7, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易月票", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		for(i=0;i<3;i++)
//			buf[i] = ((ChargeTimesDate[i]/10)<<4)+ChargeTimesDate[i]%10;
//		memcpy(ASCDateTime, BCD2ASC(buf, 3), 6);
//		buf[0] = ':';
//		buf[1] = ' ';
//		memcpy(buf+2, ASCDateTime, 4);
//		Print_Line(buf, 6, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"年", 2, 2);
//		Printer_MoveTable(4);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+4 , 2);
//		Print_Line(buf, 2, 0);
//		Printer_MoveTable(5);
//		Print_Line((unsigned char*)"月", 2, 2);
//		Printer_MoveTable(6);
//		memset(buf, 0 ,40);
//		if(ChargeMode2 ==MODE_CHARGE_INC)
//		{
//			sprintf(buf, "%4d", (uint)TimesCardPrice[TimesCardPriceIndex].Times);
//		}
//		else
//		{
//			sprintf(buf, "%4d", -(uint)TimesCardPrice[TimesCardPriceIndex].Times);
//		}
//		for(i=4;i>=0;i--)
//		{
//			if(buf[i]==' ')
//			{
//				buf[i] = '*';
//				break;
//			}
//		}
//		Print_Line(buf, 4, 0);
//		Printer_MoveTable(7);
//		Print_Line((unsigned char*)"(次)", 6, 3);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		buf[2] = 17;
//		Printer_CreateTable(3, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易金额", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		if(ChargeMode2 ==MODE_CHARGE_INC)
//		{
//			sprintf(buf, ": %7.2f", (float)TimesCardPrice[TimesCardPriceIndex].Price);
//		}
//		else
//		{
//			sprintf(buf, ": %7.2f", -(float)TimesCardPrice[TimesCardPriceIndex].Price);
//		}
//		for(i=10;i>1;i--)
//		{
//			if(buf[i]==' ')
//			{
//				buf[i] = '*';
//				break;
//			}
//		}
//		Print_Line(buf, 10, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"(元)", 6, 3);
//
//		buf[0] = 1;
//		Printer_CreateTable(1, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易情况:已完成", 16, 3);
//
//		get_date(ASCDateTime);
//		get_time(ASCDateTime+8);
//		buf[0] = 1;//交易时间
//		buf[1] = 7;//: 2002
//		buf[2] = 13;//年
//		buf[3] = 15;//09
//		buf[4] = 17;//月
//		buf[5] = 19;//03
//		buf[6] = 21;//日
//		buf[7] = 24;//10:30:00
//		Printer_CreateTable(8, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"交易时间", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		buf[0] = ':';
//		buf[1] = ' ';
//		memcpy(buf+2, ASCDateTime, 4);
//		Print_Line(buf, 6, 0);
//		Printer_MoveTable(3);
//		Print_Line((unsigned char*)"年", 2, 2);
//		Printer_MoveTable(4);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+4 , 2);
//		Print_Line(buf, 2, 0);
//		Printer_MoveTable(5);
//		Print_Line((unsigned char*)"月", 2, 2);
//		Printer_MoveTable(6);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+6 , 2);
//		Print_Line(buf, 2, 0);
//		Printer_MoveTable(7);
//		Print_Line((unsigned char*)"日", 2, 2);
//		Printer_MoveTable(8);
//		memset(buf, 0 ,40);
//		memcpy(buf, ASCDateTime+8 , 2);
//		buf[2] = ':';
//		memcpy(buf+3, ASCDateTime+10 , 2);
//		buf[5] = ':';
//		memcpy(buf+6, ASCDateTime+12 , 2);
//		Print_Line(buf, 8, 1);
//
//		buf[0] = 1;
//		buf[1] = 7;
//		Printer_CreateTable(2, buf);
//		Printer_MoveTable(1);
//		Print_Line((unsigned char*)"充值员号", 8, 2);
//		Printer_MoveTable(2);
//		memset(buf, 0 ,40);
//		memcpy(buf, ": ", 2);
//		memcpy(buf+2, BCD2ASC(Worker, 4), 8);
//		Print_Line(buf, 10, 1);		
//
//		Print_SetColor(1);
//		Print_Line((unsigned char*)"=================================", 33, 1);
//
//		Print_SetColor(0);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Line((unsigned char*)"", 0, 1);
//		Print_Cut(0);
//	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -