📄 mmiqq.c
字号:
if( data->QQ->editorNumberwin )
{
editor_destroy(data->QQ->editorNumberwin);
data->QQ->editorNumberwin=0;
}
if( data->QQ->editorPWwin )
{
/* 2003/12/04 sunsj modify for new editor mode */
if( data->editor_data.mode == TEXTINPUT_MODE )
{
text_input_destroy(data->QQ->editorPWwin);
}
else
{
editor_destroy(data->QQ->editorPWwin);
}
data->QQ->editorPWwin=0;
}
//71/67“空格”自己的QQ号码“空格”密码
SmsSend_get_config_data(&sms_parameter);
wstrcpy(sc_addr, (char *)sms_parameter.sc_addr);
wstrcpy(info,"BD#");
wstrcat(info,data->QQ->edt_buf_number);
wstrcat(info,"#");
wstrcat(info,data->QQ->edt_buf_password);
pstrinfo = mmi_Sys_Sim((char *)info, &outLen,&(sms_parameter.dcs));
SmsSend_set_dcs_number (&sms_parameter);
QQsend.QQsendmsg=set_bind_QQ;
sms_submit(MFW_SMS_SUBMIT,QQSernumber,(UBYTE *)pstrinfo,outLen,sc_addr);
QQsend.sendingwin=QQShowInformation( win, 0, TxtSending,QQSernumber,FOREVER,SMS_SENDING_MSG,(T_VOID_FUNC)QQ_Inofrmation_cb);
}
else
{
if( (QQ->EditMODE==EditNUMBER) )
{
if( data->QQ->editorNumberwin )
{
editor_destroy(data->QQ->editorNumberwin);
data->QQ->editorNumberwin=0;
}
SEND_EVENT( data->win, INPUT_PW, NULL, NULL);
}
}
}
break;
case INFO_KCD_RIGHT:
case INFO_KCD_HUP:
{
if( data->QQ->editorNumberwin )
{
editor_destroy(data->QQ->editorNumberwin);
data->QQ->editorNumberwin=0;
}
if( data->QQ->editorPWwin )
{
/* 2003/12/04 sunsj modify for new editor mode */
if( data->editor_data.mode == TEXTINPUT_MODE )
{
text_input_destroy(data->QQ->editorPWwin);
}
else
{
editor_destroy(data->QQ->editorPWwin);
}
data->QQ->editorPWwin=0;
}
SEND_EVENT( data->win, INPUT_DESTROY, NULL, NULL);
}
break;
case INFO_EDT_UPDATE:
{
if( (strlen((char *)data->QQ->edt_buf_password)!=0)&&
(strlen((char *)data->QQ->edt_buf_number)!=0) )
{
displaySoftKeys(TxtSoftOK,TxtDelete);
#if(MAIN_LCD_SIZE==3)
draw_softkeybar_updown_arrow();//jhxu720
#endif
}
else
{
displaySoftKeys(TxtNull, TxtSoftBack);
}
CanReadQQ=1;
if( (HavenewQQ)&&(CanReadQQ) )
{
display3SoftKeys(TxtRead);
ReadbtnShow=1;
}
if( Identifier==1 )
{
if( (QQ->EditMODE==EditNUMBER)||(QQ->EditMODE==EditPW) )
{
dspl_DrawLine(0,143,119,143);
oldFontColor=dspl_SetFrgColor(0x0000ff);dspl_DrawLine(0,19,119,19);dspl_DrawLine(0,78,119,78);;dspl_SetFrgColor(oldFontColor);
dspl_TextOut(1,22,0,MmiRsrcGetText(TxtPhbkNumber));
oldFontColor=dspl_SetFrgColor(0x0000ff);dspl_DrawLine(0,81,119,81);dspl_DrawLine(0,140,119,140);;dspl_SetFrgColor(oldFontColor);
dspl_TextOut(1,84,0,MmiRsrcGetText(TxtPassword));
if( strlen((char *)QQ->edt_buf_number)!=0 )
dspl_TextOut(1,40,0,(char *)QQ->edt_buf_number);
if( strlen((char *)QQ->edt_buf_password)!=0 )
dspl_TextOut(1,102,0,(char *)QQ->edt_buf_password);
}
}
}
break;
case INFO_TOPREV_EDT:
if( (strlen((char *)data->QQ->edt_buf_number)!=0)&&
(strlen((char *)data->QQ->edt_buf_password)!=0) )
displaySoftKeys(TxtSoftOK,TxtNull);
else
displaySoftKeys(TxtNull, TxtNull);
switch( QQ->EditMODE )
{
case EditPW:
{
if( data->QQ->editorPWwin )
{
/* 2003/12/04 sunsj modify for new editor mode */
if( data->editor_data.mode == TEXTINPUT_MODE )
{
text_input_destroy(data->QQ->editorPWwin);
}
else
{
editor_destroy(data->QQ->editorPWwin);
}
data->QQ->editorPWwin=0;
}
QQ->EditMODE=EditNUMBER;
SEND_EVENT( data->win, INPUT_NUMBER, NULL , NULL);
}
break;
default: break;
}
break;
case INFO_TONEXT_EDT:
{
if( (QQ->EditMODE==EditNUMBER) )
{
if( data->QQ->editorNumberwin )
{
editor_destroy(data->QQ->editorNumberwin);
data->QQ->editorNumberwin=0;
}
QQ->EditMODE=EditPW;
SEND_EVENT( data->win, INPUT_PW, NULL, NULL);
}
}
break;
default:
break;
}
}
int FindQQ_Random(MfwMnu* m, MfwMnuItem* i)
{
T_MFW_HND win = mfwParent( mfw_header() );
UBYTE* pstrinfo;
char info[20];
USHORT outLen;
T_MFW_SMS_INFO sms_parameter;
char sc_addr[MAX_LEN]; /* service centre address */
MmiTrace("FindQQ_Random");
if( strlen(QQSernumber)==0 )
{//no network
QQShowInformation( win, TxtNoNetwork,0, NULL,300,only_info,(T_VOID_FUNC)QQ_Inofrmation_cb);
return MFW_EVENT_CONSUMED;
}
if( !smsidle_get_ready_state() )
{
QQShowInformation( win, TxtNotReady, TxtSim,NULL,300,only_info,(T_VOID_FUNC)QQ_Inofrmation_cb);
return MFW_EVENT_CONSUMED;
}
DataListType=find_fri_sel;
SmsSend_get_config_data(&sms_parameter);
wstrcpy(sc_addr, (char *)sms_parameter.sc_addr);
QQsend.QQsendmsg=Find_by_random;
wstrcpy(info,"CX");
pstrinfo = mmi_Sys_Sim((char *)info, &outLen,&(sms_parameter.dcs));
SmsSend_set_dcs_number (&sms_parameter);
sms_submit(MFW_SMS_SUBMIT,QQSernumber,(UBYTE *)pstrinfo,outLen,sc_addr);
QQsend.sendingpawin=win;
MmiTraceInt(win);
QQsend.sendingwin=QQShowInformation( win, 0, TxtSending,QQSernumber,FOREVER,SMS_SENDING_MSG,(T_VOID_FUNC)QQ_Inofrmation_cb);
return MFW_EVENT_CONSUMED;
}
int FindQQ_ByQQ(MfwMnu* m, MfwMnuItem* i)
{
T_MFW_HND parent_window = mfwParent( mfw_header() );
T_MFW_HND win ;
MmiTrace("FindQQ_ByQQ");
if( strlen(QQSernumber)==0 )
{//no network
QQShowInformation( win, TxtNoNetwork,0, NULL,300,only_info,(T_VOID_FUNC)QQ_Inofrmation_cb);
return MFW_EVENT_CONSUMED;
}
DataListType=find_fri_sel;
if( ( win = FindQQ_create( parent_window) ) != NULL )
SEND_EVENT( win, INPUT_NUMBER, 0, 0 );
return MFW_EVENT_CONSUMED;
}
int FindQQ_ByNick(MfwMnu* m, MfwMnuItem* i)
{
T_MFW_HND parent_window = mfwParent( mfw_header() );
T_MFW_HND win ;
MmiTrace("FindQQ_ByNick");
if( strlen(QQSernumber)==0 )
{//no network
QQShowInformation( win, TxtNoNetwork,0, NULL,300,only_info,(T_VOID_FUNC)QQ_Inofrmation_cb);
return MFW_EVENT_CONSUMED;
}
DataListType=find_fri_sel;
if( ( win = FindQQ_create( parent_window) ) != NULL )
SEND_EVENT( win, INPUT_NAME, 0, 0 );
return MFW_EVENT_CONSUMED;
}
/*******************************************************************************
$Function: QQShowInformation
$Description: general information dialog routine
$Returns: none
$Arguments: parent, window,
text, to be displayed,
cb_function, call back on completion of window
*******************************************************************************/
static MfwHnd QQShowAsk( MfwHnd parent, int txtId, int txtId2, char *str2, unsigned long time,USHORT identifier,T_VOID_FUNC cb_function )
{
T_DISPLAY_DATA display_info;
MmiTrace( "QQShowAsk()" );
In_QQInfo=1;
dialog_info_init(&display_info);
display_info.KeyEvents = KEY_RIGHT | KEY_HUP |KEY_LEFT | KEY_CLEAR;
display_info.TextId = txtId;
display_info.TextId2 = txtId2;
display_info.TextString = '\0';
display_info.TextString2 = str2;
display_info.LeftSoftKey = TxtSoftOK;
display_info.RightSoftKey = TxtCancel;
display_info.Time = time;
display_info.Callback = (T_VOID_FUNC) cb_function;
display_info.Identifier =identifier;
switch( display_info.Identifier )
{
case ask_info:
case delAllSys_ask_info:
case delAllChat_ask_info:
display_info.iconindex=REMIND_REQUIRE;
break;
default:
break;
}
// Call Info Screen
return info_dialog( parent, &display_info );
}
static int QQ_InfoAsk_cb(T_MFW_HND win, USHORT identifier, USHORT reason)
{
T_MFW_HND parwin = mfwParent( win);//win=bookmenu win;parwin=list win
T_MFW_HND paparwin = mfwParent( parwin);////listpa win
T_MFW_WIN *parwin_data = ((T_MFW_HDR *) paparwin)->data;
tQQStandard *pardata = (tQQStandard *) parwin_data->user;
int delidx=pardata->QQ->select_index;
int text;
MmiTrace("QQ_InfoAsk_cb()");
MmiTraceInt(delidx);
In_QQInfo=0;
switch( reason )
{
case INFO_KCD_RIGHT:
case INFO_KCD_HUP:
case INFO_KCD_CLEAR:
switch( identifier )
{
case ask_info://info parent is in selmenu
break;
default: break;
}
break;
case INFO_KCD_LEFT:
switch( identifier )
{
case ask_info://info parent is in selmenu
DeleteAllQQFunc(0);
switch( DataListType )
{
case Nvm_fri_list:
case Net_fri_list:
flash_QQSetWrite();
break;
default:
if( (DataListType==Unread_info_list)||(DataListType==Left_info_list) )
{
QQSmsItem[delidx].type=Blank;
if( QQSmsItem[delidx].QQSms!=NULL )
{
FREE_MEMORY((void *)QQSmsItem[delidx].QQSms,atoi(QQSmsItem[delidx].len)+3);
QQSmsItem[delidx].QQSms=NULL;
}
}
writeToQQFile(0);
idle_display_QQ_status(&text);//update havenewqq
break;
}
QQShowInformation( win, TxtDone, TxtDelete,NULL,300,backto_listpa,(T_VOID_FUNC)QQ_Inofrmation_cb);
break;
case delAllSys_ask_info:
DeleteAllQQFunc(Sys_info_list);
writeToQQFile(0);
idle_display_QQ_status(&text);//update havenewqq
QQShowInformation( win, TxtDone, TxtDelete,NULL,300,only_info,(T_VOID_FUNC)QQ_Inofrmation_cb);
break;
case delAllChat_as
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -