name(TEXT("")),
community(TEXT("")),
bgcolor(INIT_COLOR),
-writePropertyFlag(FALSE),
time(0),
-onlyCommunityFlag(FALSE)
+onlyCommunityFlag(FALSE),
+nameColor(INIT_COLOR)
{}
+VOID ListenerData::SetNameColor(COLORREF nameColor_in){
+ nameColor = nameColor_in;
+
+ return;
+}
+
VOID ListenerData::SetBkColor(COLORREF bkColor_in){
bgcolor = bkColor_in;
- writePropertyFlag = TRUE;
+
return;
}
VOID ListenerData::SetUserName(LPCTSTR name){
this->name = name;
- this->writePropertyFlag = TRUE;
+
}
auto end = m_listenerList.end();
for(;begin != end;++begin){
- if(begin->writePropertyFlag == TRUE){
+ if(begin->name.Length() > 0 || begin->nameColor != ListenerData::INIT_COLOR || begin->bgcolor != ListenerData::INIT_COLOR){
pWriter->WriteStartElement(NULL,TEXT("user"),NULL);
if(begin->name.Length() > 0) NLITE_ATTRIBUTE_WRITE_STR(pWriter,(*begin).name);
if(begin->community.Length()> 0) NLITE_ATTRIBUTE_WRITE_STR(pWriter,(*begin).community);
NLITE_ATTRIBUTE_WRITE_INT(pWriter,(*begin).time);
if(begin->bgcolor != ListenerData::INIT_COLOR)NLITE_ATTRIBUTE_WRITE_INT(pWriter,(*begin).bgcolor);
+ if(begin->nameColor != ListenerData::INIT_COLOR)NLITE_ATTRIBUTE_WRITE_INT(pWriter,(*begin).nameColor);
pWriter->WriteString(begin->user_id);
pWriter->WriteEndElement();
}
NLITE_READ_USER_STRING(papszAttrs,listenerBuff,name);
NLITE_READ_USER_STRING(papszAttrs,listenerBuff,community);
NLITE_READ_USER_INT(papszAttrs,listenerBuff,bgcolor);
+ NLITE_READ_USER_INT(papszAttrs,listenerBuff,nameColor);
NLITE_READ_USER_INT(papszAttrs,listenerBuff,time);
}
if(_tcstol(listenerBuff.user_id,NULL,10) != 0 || ((difftime(time(NULL),604800)) <listenerBuff.time)){
- listenerBuff.writePropertyFlag = TRUE;
listenerBuff.user_id.Append(pszData,nLength);
}