コード例 #1
0
ファイル: CMail.cs プロジェクト: isoundy000/wzry-1
 public void Read(CSDT_MAILOPTRES_READMAIL pkg)
 {
     this.isReceive = true;
     this.accessUseable.Clear();
     this.mailState = (COM_MAIL_STATE)pkg.bMailState;
     this.ParseContentAndHyperlink(pkg.szContent, pkg.wContentLen, ref this.mailContent, ref this.mailHyperlink);
     this.accessUseableGeted = 0;
     this.accessUseable      = CMailSys.StAccessToUseable(pkg.astAccess, null, pkg.bAccessCnt);
     for (int i = 0; i < this.accessUseable.Count; i++)
     {
         if (pkg.astAccess[i].bGeted == 1)
         {
             this.accessUseableGeted |= ((int)1) << i;
         }
     }
 }
コード例 #2
0
 public CMail(CustomMailType mailType, ref CSDT_GETMAIL_RES pkg)
 {
     this.mailType           = mailType;
     this.subType            = pkg.bMailType;
     this.mailIndex          = pkg.iMailIndex;
     this.mailState          = (COM_MAIL_STATE)pkg.bMailState;
     this.autoDel            = (pkg.bAutoDel > 0);
     this.from               = Utility.UTF8Convert(pkg.szFrom);
     this.sendTime           = pkg.dwSendTime;
     this.subject            = Utility.UTF8Convert(pkg.szSubject, (int)pkg.bSubjectLen);
     this.accessUseableGeted = 0;
     this.accessUseable.Clear();
     this.accessUseable = CMailSys.StAccessToUseable(pkg.astAccess, null, (int)pkg.bAccessCnt);
     for (int i = 0; i < this.accessUseable.Count; i++)
     {
         if (pkg.astAccess[i].bGeted == 1)
         {
             this.accessUseableGeted |= 1 << i;
         }
     }
 }