|
发表于 2017-1-7 23:15:34
|
显示全部楼层
源码挺大的,我懒得上传!
把以下代码添加到ForShareView.cpp int Tmpi=0;
for( Tmpi = 0 ; Tmpi < nCnt ; Tmpi++ )
{
if( m_pListCtrl->GetItemText( nCnt , 2 ) == m_pListCtrl->GetItemText( Tmpi , 2 ))
{//先判断外网IP
if( m_pListCtrl->GetItemText( nCnt , 3 ) == m_pListCtrl->GetItemText( Tmpi , 3 ))
{//再判断内网IP
CString strOSCount;
strOSCount = m_pListCtrl->GetItemText( i, 5 );
if ( strOSCount.Find(_T("NT")) != -1 )
{
g_pFrame->nOSCount[0]--;
}
if ( strOSCount.Find(_T("2000")) != -1 )
{
g_pFrame->nOSCount[1]--;
}
if ( strOSCount.Find(_T("XP")) != -1 )
{
g_pFrame->nOSCount[2]--;
}
if ( strOSCount.Find(_T("2003")) != -1 )
{
g_pFrame->nOSCount[3]--;
}
if ( strOSCount.Find(_T("Vista")) != -1 )
{
g_pFrame->nOSCount[4]--;
}
if ( strOSCount.Find(_T("2008")) != -1 )
{
g_pFrame->nOSCount[5]--;
}
if ( strOSCount.Find(_T("Win 7")) != -1 )
{
g_pFrame->nOSCount[6]--;
}
if ( strOSCount.Find(_T("Win 8")) != -1 )
{
g_pFrame->nOSCount[7]--;
}
if ( strOSCount.Find(_T("Win 8.1")) != -1 )
{
g_pFrame->nOSCount[7]--;
}
if ( strOSCount.Find(_T("2012")) != -1 )
{
g_pFrame->nOSCount[8]--;
}
if ( strOSCount.Find(_T("Win 10")) != -1 )
{
g_pFrame->nOSCount[9]--;
}
if ( strOSCount.Find(_T("Win 2016")) != -1 )
{
g_pFrame->nOSCount[10]--;
}
//
m_pListCtrl->DeleteItem(Tmpi);
g_pFrame->m_nCount--;
// // strLogText.Format( "重复上线: [%s] -> 系统: [%s] -> 分组: [%s] -> 区域: [%s]", IPAddress, strOS, LoginInfo->UpGroup, str );
// // g_pLogView->InsertLogItem( strLogText, 0, 2);
}
}
}
}catch(...){}
// 更新当前连接总数
g_pFrame->ShowConnectionsNumber();
g_pTabView->UpDateNumber();
//g_pFrame->ShowOSCount();
return 0;
}
然后在MainFrm.h的public:里面添加
int nOSCount [10];
至于XTP库文件,你去下载最新的XTP库文件,然后全部放到ForShare目录就好了!
|
|