使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 4905e2e7537d507f218e8e9595485e09d9f3a2b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include "StdAfx.h"
#include "MBTransExtendEvents.h"
 
 
 
EventTransReqList::EventTransReqList(SObject *pSender)
    :TplEventArgs<EventTransReqList>(pSender)
{
    RemoveAllDownloadFileInfo();
}
 
EventTransReqList::~EventTransReqList()
    RemoveAllDownloadFileInfo();
}
 
bool EventTransReqList::AddDownloadFileInfo(CMBDownFileInfo *pDownFileInfo)
{
    if( NULL ==  pDownFileInfo || pDownFileInfo->m_strID.IsEmpty() )
        return false;
 
    CMBDownloadFileInfoMap::iterator    it;
    CString strID;
 
    strID = pDownFileInfo->m_strID;
    it = m_mapDownloadFileInfo.find(strID);
 
    // Èç¹ûÕҵõ½ ·µ»Ø
    if( it != m_mapDownloadFileInfo.end() )
        return false; 
 
    m_mapDownloadFileInfo[strID] = pDownFileInfo; 
    m_vectorDownloadFileInfo.push_back(pDownFileInfo);
 
    return true;       
}
 
int  EventTransReqList::GetCount()
{
    return m_mapDownloadFileInfo.size();
 
CString EventTransReqList::GetIDS()
    int nCount = m_mapDownloadFileInfo.size();
    if( 0 == nCount  )        
        return _T("");
    
    CString strIDS;
    CMBDownloadFileInfoMap::iterator    it;
    CMBDownFileInfo *pDownFileInfo = NULL;
    for( it = m_mapDownloadFileInfo.begin();it != m_mapDownloadFileInfo.end();it++ )
    {
        pDownFileInfo = it->second;
        strIDS += pDownFileInfo->m_strID;
        strIDS += _T(";");
    } 
        
    return strIDS.Left(strIDS.GetLength()-1);
}
 
 
bool EventTransReqList::RemoveAllDownloadFileInfo()
{
    CMBDownloadFileInfoMap::iterator    it;
    CMBDownFileInfo *pDownFileInfo = NULL;
 
    for( it = m_mapDownloadFileInfo.begin();it != m_mapDownloadFileInfo.end();it++ )
    {
        pDownFileInfo = it->second;
        delete pDownFileInfo;
        pDownFileInfo = NULL;        
    }
    m_mapDownloadFileInfo.clear(); 
    m_vectorDownloadFileInfo.clear();
 
    return true;
}