Exemplo n.º 1
0
        public void ProcessComment(byte[] packet)
        {
            CComment commentCMD=new CComment(new MemoryStream(packet));

            m_Comment=commentCMD.comment;
            m_Rating=commentCMD.rating;

            if ((m_DownloadElement==null)&&(DownFileHash!=null))
            {
                m_DownloadElement=CKernel.FilesList[DownFileHash];
            }

            if ((m_DownloadElement!=null)&&(m_DownloadElement.Comments!=null))
            {
                m_DownloadElement.Comments.NewComment(m_UserName,m_Rating,m_Comment);
            }
        }
Exemplo n.º 2
0
 private void m_SendComment()
 {
     if ((m_EmuleProtocol)
         &&(!m_SentComment)
         &&(m_VersionComments>0)
         &&(m_UploadElement.File.HasComment))
     {
         MemoryStream paqueteComment=new MemoryStream();
         CComment Comment=new CComment(paqueteComment,m_UploadElement.File.Rating,m_UploadElement.File.Comment);
         if (connection!=null)
         {
             connection.SendPacket(paqueteComment);
         }
         m_SentComment=true;
     }
 }