/********************************************************************* * * GUIDEMO_ShowInfo */ void GUIDEMO_ShowInfo(const char * acInfo) { TEXT_Handle hText; if (WM_IsVisible(_hDialogInfo)) { hText = WM_GetDialogItem(_hDialogInfo, GUI_ID_TEXT0); TEXT_SetWrapMode(hText, GUI_WRAPMODE_WORD); TEXT_SetText(hText, acInfo); } }
/********************************************************************* * * _cbDialog */ static void _cbDialog(WM_MESSAGE * pMsg) { WM_HWIN hItem; int NCode; int Id; // USER START (Optionally insert additional variables) // USER END GUI_DrawBitmap(&bmlogo,40,10); #if(Gradient_Rectangle) { GUI_DrawGradientRoundedH(220,120,580,380,20,REC_color1,REC_color2); } #endif #if(RoundedFrame) GUI_SetColor(GUI_GREEN); GUI_DrawRoundedFrame(218,118,582,382,20,3); #endif #if(FillRoundedRect) GUI_SetColor(RoundedRect); GUI_FillRoundedRect(220,120,580,380,20); #endif switch (pMsg->MsgId) { case WM_INIT_DIALOG: // // Initialization of 'ICcard' // hItem = pMsg->hWin; FRAMEWIN_SetTitleVis(hItem, 0); FRAMEWIN_SetClientColor( hItem, BACKCOLOR); FRAMEWIN_SetFont(hItem, GUI_FONT_8_1); FRAMEWIN_SetText(hItem, "Framewin"); FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER); FRAMEWIN_SetTextColor(hItem, 0x00000000); // // Initialization of 'Button' // // hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0); // BUTTON_SetFont(hItem, &GUI_Fonthz_song30); // BUTTON_SetText(hItem, "返回 "); // #if(Button_3Dskin) // BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX); //#endif //#if(!Button_3Dskin) // BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color); // BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color); //#endif // // Initialization of 'Button' // // hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1); // BUTTON_SetFont(hItem, GUI_FONT_13_1); // BUTTON_SetText(hItem, "exit"); //#if(Button_3Dskin) // BUTTON_SetSkin(hItem,BUTTON_SKIN_FLEX); //#endif //#if(!Button_3Dskin) // BUTTON_SetBkColor( hItem,BUTTON_CI_UNPRESSED,Button_unpress_color); // BUTTON_SetBkColor( hItem,BUTTON_CI_PRESSED,Button_press_color); //#endif hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0); TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP); TEXT_SetText(hItem, "安徽绿建科技有限公司 "); TEXT_SetTextColor(hItem, 0x00000000); TEXT_SetFont(hItem, &GUI_FontSong_60); // // Initialization of 'Text' // hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1); TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_TOP); TEXT_SetTextColor(hItem, 0x00000000); TEXT_SetText(hItem, "ANHUI GREEN BUILDING TECHNOLOGY CO.,LTD."); TEXT_SetFont(hItem, GUI_FONT_24_ASCII); // // Initialization of 'Text' // hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2); TEXT_SetFont(hItem, &GUI_Fonthz_song30); TEXT_SetWrapMode(hItem,GUI_WRAPMODE_WORD); TEXT_SetText(hItem, "您好像没有刷卡,系统将在2S后自动退出 "); TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER); TEXT_SetTextColor(hItem, 0x00FFFFFF); // USER START (Optionally insert additional code for further widget initialization) // USER END break; case WM_NOTIFY_PARENT: Id = WM_GetId(pMsg->hWinSrc); NCode = pMsg->Data.v; switch(Id) { case ID_BUTTON_0: // Notifications sent by 'Button' switch(NCode) { case WM_NOTIFICATION_CLICKED: // USER START (Optionally insert code for reacting on notification message) // USER END break; case WM_NOTIFICATION_RELEASED: // USER START (Optionally insert code for reacting on notification message) // USER END break; // USER START (Optionally insert additional code for further notification handling) // USER END } break; case ID_BUTTON_1: // Notifications sent by 'Button' switch(NCode) { case WM_NOTIFICATION_CLICKED: // USER START (Optionally insert code for reacting on notification message) // USER END break; case WM_NOTIFICATION_RELEASED: // USER START (Optionally insert code for reacting on notification message) // USER END break; // USER START (Optionally insert additional code for further notification handling) // USER END } break; // USER START (Optionally insert additional code for further Ids) // USER END } break; // USER START (Optionally insert additional message handling) // USER END default: WM_DefaultProc(pMsg); break; } }