1 #pragma once 2 #include "SongInfo.h" 3 4 class CPropertyDlgHelper 5 { 6 public: 7 CPropertyDlgHelper(const vector<SongInfo>& songs); 8 ~CPropertyDlgHelper(); 9 10 wstring GetMultiFileName(); 11 wstring GetMultiFilePath(); 12 wstring GetMultiType(); 13 wstring GetMultiLength(); 14 wstring GetMultiSize(); 15 wstring GetMultiBitrate(); 16 wstring GetMultiChannels(); 17 wstring GetMultiFreq(); 18 wstring GetMultiBits(); 19 20 wstring GetMultiTitle(); 21 wstring GetMultiArtist(); 22 wstring GetMultiAlbum(); 23 wstring GetMultiTrack(); 24 wstring GetMultiYear(); 25 wstring GetMultiGenre(); 26 wstring GetMultiComment(); 27 28 bool IsMultiWritable(); 29 bool IsMultiCoverWritable(); 30 31 bool IsTitleModified(const vector<SongInfo>& list_ori); 32 bool IsArtistModified(const vector<SongInfo>& list_ori); 33 bool IsAlbumModified(const vector<SongInfo>& list_ori); 34 bool IsTrackModified(const vector<SongInfo>& list_ori); 35 bool IsYearModified(const vector<SongInfo>& list_ori); 36 bool IsGenreModified(const vector<SongInfo>& list_ori); 37 bool IsCommentModified(const vector<SongInfo>& list_ori); 38 39 private: 40 //获取m_song_info中一个字段的值,如果该字段全部相同,则返回该值,如果有一个不同,则返回“多个数值” 41 static wstring GetMultiValue(std::function<wstring(const SongInfo&)> fun_get_value, const vector<SongInfo>& song_list); 42 43 //判断m_song_info中的一个字段和list_ori是否有不同,如果有则返回true 44 bool IsValueModified(std::function<wstring(const SongInfo&)> fun_get_value, const vector<SongInfo>& list_ori); 45 46 private: 47 const vector<SongInfo>& m_song_info; 48 }; 49