void CreateTownInfoBox( void )
{
	// create basic box
 CreatePopUpBox(&ghTownMineBox, TownMineDimensions, TownMinePosition, (POPUP_BOX_FLAG_CLIP_TEXT ));

 // which buffer will box render to
 SetBoxBuffer(ghTownMineBox, FRAME_BUFFER);

 // border type?
 SetBorderType(ghTownMineBox, guiPOPUPBORDERS);

 // background texture
 SetBackGroundSurface(ghTownMineBox, guiPOPUPTEX);

 // margin sizes
 SetMargins(ghTownMineBox, 6,6,8,6);

 // space between lines
 SetLineSpace(ghTownMineBox, 2);

 // set current box to this one
 SetCurrentBox( ghTownMineBox );

 return;
}
Ejemplo n.º 2
0
//按钮7:双向打印参数
void CSysArgMenu::OnButton7(int iEvent, unsigned char * pEventData, int iDataLen)
{
	string strErr = "是否放入白纸打印?";
	if(YesNoMsBox(strErr)==SUCCESS)
	{
		if (isPaper() != 0)
		{ 
			CaMsgBox::ShowMsg("打印机未检测到纸");
			return;
		}
#if (POS_TYPE != POS_APE4000RG)		
		char chValue[256];
		
		UINT8 i =0;
		for(i=0;i<10;i++)
		{
			memset(chValue, 0, sizeof(chValue));
			DBG_PRINT(("i=%u", i));
			
			PrinterIni(i);
			sprintf(chValue, "双向打印参数打印:航天信息蜂鸣器正常异常状态 参数%u",i);
			//PrintStr(chValue);
			
			//PrintChineseLine(chValue, strlen(chValue));
			PrintAsciiLine(chValue, strlen(chValue));
			
			SetLineSpace(0);
			sprintf(chValue, "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
			//PrintChineseLine(chValue, strlen(chValue));
			PrintAsciiLine(chValue, strlen(chValue));
			sprintf(chValue, "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
			//PrintChineseLine(chValue, strlen(chValue));
			PrintAsciiLine(chValue, strlen(chValue));

			CarriageReturn();
		}	
		ForwardNLine(FORWARD_LINES);
#else
		BidirectionalParaTest();
		ForwardNLine(FORWARD_LINES);
#endif
	}
	
	m_EditSysArgID = SYS_BIDIRECTION_PRINT;
	m_pSysArgEditWin->ReFresh();
	ChangeWin(SYS_ARG_EDIT_WIN);
}
Ejemplo n.º 3
0
void CSelfTestMenu::OnButton6(int iEvent, unsigned char * pEventData, int iDataLen)
{
//	string strErr = "是否调整打印参数?";
	string strErr = "是否放入白纸打印?";	
	if(YesNoMsBox(strErr)==FAILURE)
	{
		this->ReFresh();
		return;
	}

	if (isPaper() != 0)
	{ 
		CaMsgBox::ShowMsg("打印机未检测到纸");
		return;
	}
#if (POS_TYPE != POS_APE4000RG)
	char chValue[256];
	
	UINT8 i =0;
	for(i=0;i<10;i++)
	{
		memset(chValue, 0, sizeof(chValue));

		//bidirection = i;
		DBG_PRINT(("i=%u", i));
		DBG_PRINT(("bidirection=%u", bidirection));

		PrinterIni(i);	
		
//		sprintf(chValue, "双向打印参数打印:航天信息蜂鸣器正常异常状态 参数%uHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH",i);
		sprintf(chValue, "双向打印参数打印:航天信息蜂鸣器正常异常状态 参数%u",i);
		
		//PrintChineseLine(chValue, strlen(chValue));
		PrintAsciiLine(chValue, strlen(chValue));
		SetLineSpace(0);
		sprintf(chValue, "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
		//PrintChineseLine(chValue, strlen(chValue));
		PrintAsciiLine(chValue, strlen(chValue));
		sprintf(chValue, "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
		//PrintStr(chValue);
		//PrintChineseLine(chValue, strlen(chValue));
	    PrintAsciiLine(chValue, strlen(chValue));
		CarriageReturn();
	}

	ForwardNLine(FORWARD_LINES);
	PrinterIni(bidirection);
#else
	BidirectionalParaTest();//双向打印参数检测功能并不改变当前设置的双向打印参数,无需再次设置
	ForwardNLine(FORWARD_LINES);
#endif

	m_pSysArgEditWin = (CSysArgEditWin *)(m_pFrame->GetWin(SYS_ARG_EDIT_WIN));

	((CSysArgMenu *)m_pFrame->GetWin(SYSTEM_ARG_MENU))->m_EditSysArgID = SYS_BIDIRECTION_PRINT;

//	m_pSysArgEditWin = (CSysArgEditWin *)(m_pFrame->GetWin(SYS_ARG_EDIT_WIN));

	
	m_pSysArgEditWin->ReFresh();
	ChangeWin(SYS_ARG_EDIT_WIN);


//	this->ReFresh();
}