Example #1
0
void FileData::Copy( const FileData& fileData )
{
    m_fileName = fileData.GetFileName();
    m_filePath = fileData.GetFilePath();
    m_size = fileData.GetSize();
    m_dateTime = fileData.GetDateTime();
    m_permissions = fileData.GetPermissions();
    m_type = fileData.GetType();
    m_image = fileData.GetImageId();
}
Example #2
0
void FileCtrl::UpdateItem(const wxListItem &item)
{
    FileData *fd = (FileData*)GetItemData(item);
    wxCHECK_RET(fd, wxT("invalid filedata"));

    fd->ReadData();

    SetItemText(item, fd->GetFileName());
    SetItemImage(item, fd->GetImageId());

    if (GetWindowStyleFlag() & wxLC_REPORT)
    {
        for (int i = 1; i < FileData::FileList_Max; i++)
            SetItem( item.m_itemId, i, fd->GetEntry((FileData::fileListFieldType)i) );
    }
}