📄 disp_txt_prc.c
字号:
/***********************************************************/
/* */
/* CPU:AT89c55 20MHZ */
/* Copyright 2004.09 Comelit */
/* AUTHOR: LV_XIAO_LU */
/* */
/***********************************************************/
#include <reg52.h>
#include "define.h"
#include "typedef.h"
#include "variable.h"
#include "function.h"
sbit MES_SW = P1^7;
void Dummy_disp(void) ;
void First_menu_disp(void);
extern void Mes_list_disp(void) ;
void Mes_content_disp(void);
void Disp_prc(void);
/***********************************************************/
/*信息列表界面如下:
/***********************************************************/
/* 进入信息查询后界面显示如下 */
/***********************************************************/
/* 信息浏览 */
/* 第X条 */
/* 第X条 */
/* 第X条 */
/* 第X条 */
/* 第X条 */
/* */
/* 下页 返回 */
/***********************************************************/
/***********************************************************/
/***********************************************************/
void Dummy_disp(void)
{
MES_SW = SW_OFF;
mes_sw_F = 0;
sw_delay = TM500MS;
read_mes_F = 0;
return;
}
/***********************************************************/
/***********************************************************/
void (*const code dummy_tbl[])(void)=
{
Dummy_disp
};
/***********************************************************/
/***********************************************************/
void ( *const code first_tbl[])(void)=
{
First_menu_disp
};
/***********************************************************/
/***********************************************************/
void (*const code second_tbl[])(void) =
{
Mes_list_disp
};
/***********************************************************/
/***********************************************************/
void (*const code third_tbl[])(void)=
{
Mes_content_disp,
Mes_content_disp,
Mes_content_disp,
Mes_content_disp,
Mes_content_disp
};
/***********************************************************/
/***********************************************************/
void ( *const *const code disp_tbl[])(void)=
{
dummy_tbl,
first_tbl,
second_tbl,
third_tbl
};
/***********************************************************/
/***********************************************************/
void First_menu_disp(void)
{
// Disp_str("ABC",0,1,2,7,CHA_COLOR_WHITE,0); //TEST ASCII
Disp_str("科曼利信息系统",0,1,3,7,CHA_COLOR_WHITE,0);
if(select_position == MES_READ_POSITION)
at_label = 1;
else
at_label = 0;
Disp_str("查询信息",1,3,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
// Disp_str("READ",1,3,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label); //test
if(select_position == CLOSE_POSITION)
at_label = 1;
else
at_label = 0;
Disp_str("退出",2,3,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
// Disp_str("EX",2,3,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
}
/***********************************************************/
/***********************************************************/
void Mes_content_disp(void)
{
if(disp_no_u_old != disp_no_u)
{
if(disp_no_u == 0)
{
// mes_content =(unsigned char *)mes_list->mes_addr.address.address ;
content_disp_end_F = 0 ;
content_row = 0;
content_col = 2;
}
/* 保存这一屏显示信息*/
if(content_disp_F == P_DISP)
{
content_list[disp_no_u].page_content = mes_content ;
content_list[disp_no_u].row = content_row;
content_list[disp_no_u].col = content_col ;
}
else
{
mes_content = content_list[disp_no_u].page_content;
content_row = content_list[disp_no_u].row;
content_col = content_list[disp_no_u].col ;
}
// Page_switch(mes_list->mes_addr.address.page_addr); //切换页模式
Page_switch(read_mes_page_adr);
Disp_content(mes_content,content_row,content_col,3,7,CHA_COLOR_WHITE,0);
Page_switch(PAGE_0); //换回正常状态
disp_no_u_old = disp_no_u ;
}
/* 如果一屏已显示完内容*/
if(content_disp_end_F == 1)
{
if(select_position == 0)
at_label =1;
else
at_label = 0;
if(disp_no_u == 0) //如果是第一屏
Disp_str("删除",7,1,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
else
// Disp_str("上页",7,1,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("上页",7,1,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
if(select_position == 1)
at_label = 1;
else
at_label = 0;
if(disp_no_u == 0)
// Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
{
Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
return;
}
else
// Disp_str("删除",7,5,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("删除",7,4,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
if(select_position == 2)
at_label = 1;
else
at_label =0 ;
// Disp_str("返回",7,8,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
if(disp_no_u !=0)
Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
}
else //内容没显示完时
{
if(select_position == 0)
at_label = 1;
else
at_label = 0;
if(disp_no_u == 0) //内容没显示完,但是第一页
// Disp_str("下页",9,1,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("下页",7,1,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
else
// Disp_str("上页",9,1,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("上页",7,1,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
if(select_position == 1)
at_label = 1;
else
at_label = 0;
if(disp_no_u == 0)
// Disp_str("返回",9,7,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
{
Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
return;
}
else
// Disp_str("下页",7,5,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("下页",7,4,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
if(select_position == 2)
at_label = 1;
else
at_label = 0;
// Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_RED,at_label);
Disp_str("返回",7,7,3,BACK_COLOR_BLACK,CHA_COLOR_WHITE,at_label);
}
}
/***********************************************************/
/***********************************************************/
void Disp_prc(void)
{
if(write_F == 0)
{
if(disp_mode_old != disp_mode)
{
disp_no_u = 0 ;
// disp_no_u_old = 0;
Vram_clear();
disp_tbl[disp_mode][disp_no_u]();
disp_mode_old = disp_mode ;
disp_change_F = 0;
return;
}
// else if(disp_no_u_old != disp_no_u)
else if(disp_change_F == 1) //同一模式下的不同显示方式处理
{
if((mes_list_F == 1)||(clear_scr_F == 1))
{
Vram_clear();
clear_scr_F = 0;
}
disp_tbl[ disp_mode ][ disp_no_u ]();
disp_change_F = 0;
return;
}
}
}
/***********************************************************/
/***********************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -