本文整理汇总了C#中Server.Items.BulletinMessage.GetTimeAsString方法的典型用法代码示例。如果您正苦于以下问题:C# BulletinMessage.GetTimeAsString方法的具体用法?C# BulletinMessage.GetTimeAsString怎么用?C# BulletinMessage.GetTimeAsString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.BulletinMessage
的用法示例。
在下文中一共展示了BulletinMessage.GetTimeAsString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BBMessageHeader
public BBMessageHeader( BaseBulletinBoard board, BulletinMessage msg )
: base(0x71)
{
string poster = SafeString( msg.PostedName );
string subject = SafeString( msg.Subject );
string time = SafeString( msg.GetTimeAsString() );
EnsureCapacity( 22 + poster.Length + subject.Length + time.Length );
m_Stream.Write( (byte) 0x01 ); // PacketID
m_Stream.Write( (int) board.Serial ); // Bulletin board serial
m_Stream.Write( (int) msg.Serial ); // Message serial
BulletinMessage thread = msg.Thread;
if ( thread == null )
m_Stream.Write( (int) 0 ); // Thread serial--root
else
m_Stream.Write( (int) thread.Serial ); // Thread serial--parent
WriteString( poster );
WriteString( subject );
WriteString( time );
}
示例2: BBMessageContent
public BBMessageContent( BaseBulletinBoard board, BulletinMessage msg )
: base(0x71)
{
string poster = SafeString( msg.PostedName );
string subject = SafeString( msg.Subject );
string time = SafeString( msg.GetTimeAsString() );
EnsureCapacity( 22 + poster.Length + subject.Length + time.Length );
m_Stream.Write( (byte) 0x02 ); // PacketID
m_Stream.Write( (int) board.Serial ); // Bulletin board serial
m_Stream.Write( (int) msg.Serial ); // Message serial
WriteString( poster );
WriteString( subject );
WriteString( time );
m_Stream.Write( (short) msg.PostedBody );
m_Stream.Write( (short) msg.PostedHue );
int len = msg.PostedEquip.Length;
if ( len > 255 )
len = 255;
m_Stream.Write( (byte) len );
for ( int i = 0; i < len; ++i )
{
BulletinEquip eq = msg.PostedEquip[i];
m_Stream.Write( (short) eq.itemID );
m_Stream.Write( (short) eq.hue );
}
len = msg.Lines.Length;
if ( len > 255 )
len = 255;
m_Stream.Write( (byte) len );
for ( int i = 0; i < len; ++i )
WriteString( msg.Lines[i] );
}