Ejemplo n.º 1
0
 /// <summary>
 /// Build a packed message from Hudsonbase header and body
 /// </summary>
 /// <param name="header"></param>
 /// <param name="body"></param>
 public HudsonPackedMessage(Messages msgbase, int msgnum) : this()
 {
     MsgHdr.MsgHdrRecord header = msgbase.Headers.Data[msgnum - 1];
     Text      = new MsgText(msgbase.MsgBodies[msgnum]);
     Text.Area = msgbase.Areas[header.Board];
     orig      = new FidoAddress(header.OrigZone, header.OrigNet, header.OrigNode, 0);
     dest      = new FidoAddress(header.DestZone, header.DestNet, header.DestNode, 0);
     FromUser  = header.WhoFrom;
     DestUser  = header.WhoTo;
     Subject   = header.Subject;
     Timestamp = FidonetHelpers.FidoFormatDatetime(header.Timestamp);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// builds message from database entity
 /// </summary>
 /// <param name="m"></param>
 public BBSPackedMessage(Message m) : base()
 {
     orig         = new FidoAddress(m.OrigZone, m.OrigNet, m.OrigNode, m.OrigPoint);
     dest         = new FidoAddress(m.DestZone, m.DestNet, m.DestNode, m.DestPoint);
     FromUser     = m.MessageFrom;
     DestUser     = m.MessageTo;
     Timestamp    = FidonetHelpers.FidoFormatDatetime(m.DateTime);
     Subject      = m.Subject;
     attr         = new MsgAttributes((ushort)m.Attributes);
     Text.Area    = m.Area;
     Text.MsgId   = m.FidoId;
     Text.ReplyId = m.FidoReplyTo;
     Text.Tear    = m.TearLine;
     Text.Origin  = m.OriginLine;
     Text.Lines   = TextHelper.SplitString(m.Body);
     Text.Path    = m.PathLines;
     Text.SeenBy  = m.SeenByLines;
 }