¼Ò½º ´Ù¿î·Îµå "bioset.zip" (GNU) /* ¹ÙÀÌ¿À¸®µëÀº µ¥ÀÌŸ¸¦ AppStatus ¿¡ ÀúÀåÇÕ´Ï´Ù. ¹ÙÀÌ¿À¸®µëÀÇ AppStatus ¸¦ º¯°æÇÏ¿© ½ÇÇà ½ÃÅ°¸é ÀÓÀÇÀÇ µ¥ÀÌŸ·ÎÀÇ º¯°æÀÌ °¡´ÉÇÕ´Ï´Ù. */ // ¹ÙÀÌ¿À¸®µë AppID #define BioAppID (U32)(0x42494f72) // BIOr // ¹ÙÀÌ¿À¸®µë AppStatus typedef struct _BIOPROGINFO{ Timestamp b_date; // »ýÀÏ Timestamp t_date; // ³¯Â¥ bool bP; // ½Åü ¸®µëÀ» º¸¿©ÁÙÁö ¿©ºÎ bool bS; // °¨¼º ¸®µëÀ» º¸¿©ÁÙÁö ¿©ºÎ bool bI; // Áö¼º ¸®µëÀ» º¸¿©ÁÙÁö ¿©ºÎ U32 colorP; // ½Åü Ä®¶ó (µðÆúÆ® COLOR_RED ) U32 colorS; // °¨¼º Ä®¶ó (µðÆúÆ® COLOR_BLUE ) U32 colorI; // Áö¼º Ä®¶ó (µðÆúÆ® COLOR_GREEN ) bool bt_date;// t_date »õ·ÎÇÒ°ÍÀÎÁö bool bLoad; // ÇöÀç »ç¿ëÇÏÁö ¾ÊÀ½. }BIOPROGINFO; Timestamp b_date; // »ýÀÏ Timestamp t_date; // º¸°íÀÚ ÇÏ´Â ³¯Â¥ // »ýÀÏ ¹öÆ°ÀÇ ·¹À̺íÀ» º¯°æÇÑ´Ù. // true : Áï½Ã º¯°æ void DrawBDate( bool draw ) { static S8 datebuf[20]; SnPrintf( datebuf, 20, "%04d³â %02d¿ù %02dÀÏ", b_date.year, b_date.month, b_date.date ); GenericButtonSetLabel( FormGetComponentPtr(Main_DBoxTrg_bDate_1006), datebuf, draw ); } // ³¯Â¥ ¹öÆ°ÀÇ ·¹À̺íÀ» º¯°æÇÑ´Ù. // true : Áï½Ã º¯°æ void DrawTDate( bool draw ) { static S8 datebuf[20]; SnPrintf( datebuf, 20, "%04d³â %02d¿ù %02dÀÏ", t_date.year, t_date.month, t_date.date ); GenericButtonSetLabel( FormGetComponentPtr(Main_DBoxTrg_tDate_1015), datebuf, draw ); } // OpenSelectDate ¸¦ ½ÇÇàÇÏ¿© »ýÀÏ¿¡ ÀúÀåÇÑ´Ù. void SelectBDate( void ) { U32 rtnDate; // OpenSelectDate ¿¡¼ »ç¿ëÇÏ´Â ¸®Åϳ¯Â¥ Timestamp ts; // Àӽú¯¼ö // ³¯Â¥¸¦ Àӽú¯¼ö¿¡ Ä«ÇÇÇÑ´Ù. memcpy( &ts, &b_date, sizeof( Timestamp ) ); // ³¯Â¥ ¼±Åà ´ÙÀÌ¾Ë·Î±× ½ÇÇà if( OpenSelectDate( (P_U8)"»ýÀÏ ¼±ÅÃ", ts.year, ts.month, ts.date, &rtnDate ) ) { // ³¯Â¥ Çü½Ä º¯°æ DecodeDate( rtnDate, &(ts.year), &(ts.month), &(ts.date) ); // ³¯Â¥¸¦ »ýÀÏ¿¡ ÀúÀå memcpy( &b_date, &ts, sizeof( Timestamp ) ); // Áï½Ã ¹öÆ° ·¹ÀÌºí º¯°æ DrawBDate( TRUE ); } } // OpenSelectDate ¸¦ ½ÇÇàÇÏ¿© ³¯Â¥¿¡ ÀúÀåÇÑ´Ù. void SelectTDate( void ) { U32 rtnDate; Timestamp ts; memcpy( &ts, &t_date, sizeof( Timestamp ) ); if( OpenSelectDate( (P_U8)"³¯Â¥ ¼±ÅÃ", ts.year, ts.month, ts.date, &rtnDate ) ) { DecodeDate( rtnDate, &(ts.year), &(ts.month), &(ts.date) ); memcpy( &t_date, &ts, sizeof( Timestamp ) ); DrawTDate( TRUE ); } } // ¹ÙÀÌ¿À¸®µëÀÇ AppSatus ¸¦ ¼³Á¤ÇÑ ÈÄ // ¹ÙÀÌ¿À¸®µë ÇÁ·Î±×·¥À» ½ÇÇàÇÑ´Ù. void btnStartOnClick(void) { APPSTATUSINFO asi; BIOPROGINFO biopi; // BIOPROGINFO ¼³Á¤ memset( &biopi, 0, sizeof( BIOPROGINFO ) ); memcpy( &(biopi.b_date), &b_date, sizeof( Timestamp )); // »ýÀÏ memcpy( &(biopi.t_date), &t_date, sizeof( Timestamp )); // ³¯Â¥ biopi.bP = TRUE; // ½Åü¸®µëÀ» º¸¿©ÁØ´Ù. biopi.bS = TRUE; // °¨¼º¸®µëÀ» º¸¿©ÁØ´Ù. biopi.bI = TRUE; // Áö¼º¸®µëÀ» º¸¿©ÁØ´Ù. biopi.colorP = COLOR_RED; // ½Åü ¸®µë Ä®¶ó biopi.colorS = COLOR_BLUE; // °¨¼º ¸®µë Ä®¶ó biopi.colorI = COLOR_GREEN; // Áö¼º ¸®µë Ä®¶ó biopi.bt_date = FALSE; // º¸·Á°í ÇÏ´Â ³¯Â¥¸¦ ¿À´ÃÀÇ ³¯Â¥°¡ ¾Æ´Ò°æ¿ì ¼³Á¤ // AppStatus ¼³Á¤ InitASIBlock(&asi); asi.AppID = BioAppID; // ¹ÙÀÌ¿À¸®µë Application ID asi.BlobLen1 = sizeof(BIOPROGINFO);// Å©±â asi.pBlob1 = &biopi; if(!SetAppStatusInfo(&asi)) { MsgBoxDo(MK_ERROR, (P_S8)"½Ã½ºÅÛ ¿µ¿ª ÀúÀå ¿À·ù", (P_S8)"SetAppStatusInfo()¿¡¼ ¿¡·¯°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.", MSGBOX_OK); } // ÇÁ·Î±×·¥ ½ÇÇà if( RequestToApplication( BioAppID, NORMAL_START, 0 ) == CVOS_OK ) ChangeToApplication( GetCurAppID(), NORMAL_START, 0 ); else (void)MsgBoxDo( MK_ERROR, "BIOSET", "ÇÁ·Î±×·¥À» ãÀ» ¼ö°¡ ¾ø½À´Ï´Ù.", MSGBOX_OK ); } |