?? message.c
字號(hào):
#include <graphics.h>
#include <bio.inc>
#include <menu.inc>
#include "feedef.h"
static UC old_cursor_stat;
extern UC Cursor_on;
extern UL far *Tick_cnt_ptr;
/* function : display message in the small status win according to mode
* calls : message_win
* called by : this is a general purposed routine
* input : mode -- information kind
* date : 1993.9.20
*/
void message(int mode)
{
UC back_in=8,echo_time=30;
if(mode != MAIN_MES)
sound_alarm();
switch(mode)
{
case MAIN_MES: /* -><- move, ENTER retify */
message_win(back_in, "←↓→↑ 選擇 Enter 選中",50);
break;
case PASS_ERR: /* error in password input */
message_win(back_in,"口令輸入錯(cuò)誤,請(qǐng)重新輸入",echo_time);
break;
case RE_PASS: /* pleae Re-enter the password */
message_win(back_in,"請(qǐng)?jiān)佥斎胍淮涡驴诹?quot;,echo_time);
break;
case RE_PASS_ERR: /* error in Re-entern the password */
message_win(back_in,"兩次輸入不同,請(qǐng)重新輸入",echo_time);
break;
case NEW_PASS_EN: /* the new password has been valid */
message_win(back_in,"口令變更成功, 新口令已經(jīng)生效",echo_time);
break;
case TIME_OUT: /* connecting time is out */
message_win(back_in,"打印機(jī)聯(lián)機(jī)錯(cuò)誤",echo_time);
break;
case IO_ERR: /* printer I/O error */
message_win(back_in,"打印機(jī)I/O錯(cuò)誤",echo_time);
break;
case NO_PAPER: /* printer no paper */
message_win(back_in,"打印機(jī)無(wú)紙",echo_time);
break;
case PRN_ERR: /* some error in printer */
message_win(back_in,"打印機(jī)錯(cuò)誤",echo_time);
break;
case PHO_FILE_ERR: /* input phone number first */
message_win(back_in,"應(yīng)先進(jìn)行分機(jī)號(hào)碼設(shè)定",echo_time);
break;
case SPRING_DAY: /* spring festival days must be input */
message_win(back_in,"必須輸入春節(jié)日期",echo_time);
break;
case CONN_ERR: /* connection error in SIO communication */
message_win(back_in,"聯(lián)機(jī)錯(cuò)誤",echo_time);
break;
case REC_TIMEOUT: /* timeout in receiving records or no B8 */
message_win(back_in,"接收錯(cuò)誤",echo_time);
break;
case RATE_FILE_ERR: /* input charge rate first */
message_win(back_in,"費(fèi)率文件出錯(cuò)",echo_time);
break;
case NO_NOT_EXIST: /* the phone number input does not exist */
message_win(back_in,"該分機(jī)號(hào)碼不存在",echo_time);
break;
case CASH_FILE_ERR:
message_win(back_in,"應(yīng)先進(jìn)行押金設(shè)定",echo_time);
break;
case USER_FILE_ERR:
message_win(back_in,"應(yīng)先進(jìn)行戶頭設(shè)定",echo_time);
break;
case PCODE_FILE_ERR:
message_win(back_in,"應(yīng)先設(shè)定立即打印分機(jī)",echo_time);
break;
case PCODE_ERR:
message_win(back_in,"存在沒設(shè)定分機(jī)內(nèi)碼",60);
break;
case UNO_NOT_EXIST:
message_win(back_in,"該戶頭號(hào)碼不存在",echo_time);
break;
case TFEE_FILE_ERR:
message_win(back_in,"應(yīng)先進(jìn)行話費(fèi)統(tǒng)計(jì)",echo_time);
break;
case DTIME_FILE_ERR:
message_win(back_in,"應(yīng)先進(jìn)行匯總統(tǒng)計(jì)",echo_time);
break;
case CANCEL_INPUT:
message_win(back_in,"取消剛才輸入項(xiàng)目",echo_time);
break;
case INVALID_INPUT:
message_win(back_in,"無(wú)效輸入項(xiàng)目, 輸入取消",echo_time);
break;
case AUTHCD_FILE_ERR:
message_win(back_in,"應(yīng)先進(jìn)行授權(quán)碼設(shè)定",echo_time);
break;
case AUTHCD_NOT_EXIST:
message_win(back_in,"該授權(quán)卡號(hào)不存在",echo_time);
break;
case ACCTIME_FILE_ERR:
message_win(back_in,"日期文件出錯(cuò)",echo_time);
break;
case ACCFEE_FILE_ERR:
message_win(back_in,"無(wú)話費(fèi)結(jié)算文件",echo_time);
break;
case BANACC_FILE_ERR:
message_win(back_in,"無(wú)單班營(yíng)業(yè)文件",echo_time);
break;
case DAYACC_FILE_ERR:
message_win(back_in,"無(wú)日營(yíng)業(yè)文件",echo_time);
break;
case MONACC_FILE_ERR:
message_win(back_in,"無(wú)月營(yíng)業(yè)文件",echo_time);
break;
case YEARACC_FILE_ERR:
message_win(back_in,"無(wú)年?duì)I業(yè)文件",echo_time);
break;
case HACCFEE_FILE_ERR:
message_win(back_in,"無(wú)話費(fèi)結(jié)算歷史文件",echo_time);
break;
case HBANACC_FILE_ERR:
message_win(back_in,"無(wú)單班營(yíng)業(yè)歷史文件",echo_time);
break;
case HDAYACC_FILE_ERR:
message_win(back_in,"無(wú)日營(yíng)業(yè)歷史文件",echo_time);
break;
case HMONACC_FILE_ERR:
message_win(back_in,"無(wú)月營(yíng)業(yè)歷史文件",echo_time);
break;
case HYEARACC_FILE_ERR:
message_win(back_in,"無(wú)年?duì)I業(yè)歷史文件",echo_time);
break;
case NULL_ACCOUNT_ERR:
message_win(back_in,"該住客話費(fèi)結(jié)算為零",echo_time);
break;
case NULL_CASH_ERR:
message_win(back_in,"無(wú)超限或透支分機(jī)",echo_time);
break;
}
return;
}
/* function : preserve the old message and display new message in the
* small status win. If anykey is pressed or the time is
* longer than "echo_time", the old message is poped back
* called by : message()
* input : back_in -- from what position in the status window to
* display the information
* msg -- the new information
* echo_time -- the longest displaying time
* date : 1993.9.20
*/
void message_win(UC back_in, UC *msg, UC echo_time)
{
UC old_cursor_stat;
UL start_time;
MOUSE_BAND_STRUCT mouse_band;
pop_back(M_EX+2,D_BOTTOM+1,MAX_X-S_XAD-2,MAX_Y,LIGHTRED);
hz16_disp(MES_LEFT+back_in,MES_TOP+1, msg, YELLOW);
old_cursor_stat = Cursor_on;
cursor_on();
get_mouse_band(&mouse_band);
clr_keybuf();
start_time = *Tick_cnt_ptr;
while (1)
{
if ( !keybuf_nul() )
{
get_key0();
break;
}
if ( left_pressed() )
break;
if (echo_time)
{
if (*Tick_cnt_ptr-start_time>echo_time)
break;
}
}
cursor_off();
rid_pop();
set_mouse_band(&mouse_band);
if (old_cursor_stat==TRUE)
cursor_on();
return;
}
/* function : display "msg" in the status window. The only method to
* retrieve the old message is to call "message_end", that
* is displaying time of "msg" is not limited by echo_time
* called by : set_record_add() (set_add.c)
* input : back_in, msg -- the same as those in "message_win()"
* date : 1993.9.22.
*/
void message_disp(UC back_in, UC *msg)
{
pop_back(M_EX,D_BOTTOM+1,MAX_X-S_XAD-2,MAX_Y,11);
hz16_disp(MES_LEFT+back_in,MES_TOP+1, msg,0);
old_cursor_stat = Cursor_on;
cursor_on();
return;
}
/* function : to retrieve the old message preserved by "message_disp()"
* called by : message_disp()
* date : 1993.9.22
*/
void message_end(void)
{
cursor_off();
rid_pop();
if (old_cursor_stat==TRUE)
cursor_on();
return;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -