Пример #1
0
static void nc_serinfo_display(UINT8 seridx,BOOL update)
{
	char strTemp[100],str2[20];
	UINT8 idx = seridx-1, i=0;
	UINT8 action;
	
	//memset(strTemp,0,sizeof(strTemp));
	//sprintf(strTemp,"%s",newcamd_serinfo[idx].name);
	//OSD_SetEditFieldContent(&nc_item_edit1, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	if(newcamd_serinfo[idx].use_ip_domain==1)
	{
		sprintf(strTemp,"%s",newcamd_serinfo[idx].domain);
		OSD_SetEditFieldPattern(&nc_item_edit2,string_pat);
		OSD_SetEditFieldContent(&nc_item_edit2, STRING_ANSI, (UINT32)strTemp);
	}
	else
	{
		OSD_SetEditFieldPattern(&nc_item_edit2,ip_pat);
		OSD_SetEditFieldContent(&nc_item_edit2, STRING_NUMBER, ntohl(newcamd_serinfo[idx].ip));
	}

	memset(strTemp,0,sizeof(strTemp));
	OSD_SetEditFieldContent(&nc_item_edit3, STRING_NUMBER, (UINT32)(newcamd_serinfo[idx].port));

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%s",newcamd_serinfo[idx].username);
	OSD_SetEditFieldContent(&nc_item_edit4, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%s",newcamd_serinfo[idx].userpwd);
	OSD_SetEditFieldContent(&nc_item_edit5, STRING_ANSI, (UINT32)strTemp);

	memset(strTemp,0,sizeof(strTemp));
	sprintf(strTemp,"%02X",newcamd_serinfo[idx].deskey[0]);
	for(i=1;i<DESKEY_LENTH;i++)
	{
		memset(str2,0,sizeof(str2));
		if((i*2)%(SEPERATE_MODE)==0)
			sprintf(str2,"%c%02X",seperate_ch[SEPERATE_CH],newcamd_serinfo[idx].deskey[i]);
		else
			sprintf(str2,"%02X",newcamd_serinfo[idx].deskey[i]);
		strcat(strTemp,str2);
	}
	OSD_SetEditFieldContent(&nc_item_edit6, STRING_ANSI, (UINT32)strTemp);

	nc_item_sel_active(newcamd_serinfo[idx].bActive,newcamd_serinfo[current_index-1].bAutouser,FALSE);
	nc_item_sel_DNSenable(newcamd_serinfo[idx].bDNS_enable,FALSE);
	//nc_item_sel_autouser(newcamd_serinfo[idx].bActive,newcamd_serinfo[idx].bAutouser,FALSE);
	
	if(update)
	{
		nc_redraw_items();
	}

}
Пример #2
0
void nc_change_domain_ip(BOOL update)
{
    char strTemp[100];
    UINT8 idx = current_index-1;

    if(newcamd_serinfo[idx].use_ip_domain==0)
    {
        newcamd_serinfo[idx].use_ip_domain=1;

        memset(strTemp,0,sizeof(strTemp));
        sprintf(strTemp,"Server Domain");
        OSD_SetTextFieldContent(&nc_item_txt2, STRING_ANSI, (UINT32)strTemp);

        memset(strTemp,0,sizeof(strTemp));
        sprintf(strTemp,"%s",newcamd_serinfo[idx].domain);
#if defined(ORDER_GZ1006005)||defined(ORDER_GZ1006006)
        OSD_SetEditFieldPattern(&nc_item_edit2,string2_pat);
#else
        OSD_SetEditFieldPattern(&nc_item_edit2,string_pat);
#endif
        OSD_SetEditFieldContent(&nc_item_edit2, STRING_ANSI, (UINT32)strTemp);
    }
    else
    {
        newcamd_serinfo[idx].use_ip_domain=0;

        memset(strTemp,0,sizeof(strTemp));
        sprintf(strTemp,"Server IP");
        OSD_SetTextFieldContent(&nc_item_txt2, STRING_ANSI, (UINT32)strTemp);

        OSD_SetEditFieldPattern(&nc_item_edit2,ip_pat);
        OSD_SetEditFieldContent(&nc_item_edit2, STRING_NUMBER, ntohl(newcamd_serinfo[idx].ip));
    }

    if(update)
    {
        OSD_TrackObject( (POBJECT_HEAD)&nc_item_con2, C_UPDATE_ALL);
    }

}