本文整理匯總了C#中Server.Rectangle2D.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# Rectangle2D.ToString方法的具體用法?C# Rectangle2D.ToString怎麽用?C# Rectangle2D.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Rectangle2D
的用法示例。
在下文中一共展示了Rectangle2D.ToString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnSingleClick
public override void OnSingleClick( Mobile from )
{
base.OnSingleClick( from );
if ( m_Active )
{
Rectangle2D rect = new Rectangle2D(m_RectStart.X,m_RectStart.Y,m_RectEnd.X,m_RectEnd.Y);
if ( m_MapDest != null && m_PointDest != Point3D.Zero )
LabelTo( from, "{0} [{1}]", m_PointDest, m_MapDest );
else if ( m_MapDest != null )
LabelTo( from, "[{0}]", m_MapDest );
else if ( m_PointDest != Point3D.Zero )
LabelTo( from, m_PointDest.ToString() );
else if ( m_PointDest2 != Point3D.Zero )
LabelTo( from, m_PointDest2.ToString() );
else if ( m_PointDest3 != Point3D.Zero )
LabelTo( from, m_PointDest3.ToString() );
else if ( m_PointDest4 != Point3D.Zero )
LabelTo( from, m_PointDest4.ToString() );
else if ( m_PointDest5 != Point3D.Zero )
LabelTo( from, m_PointDest5.ToString() );
else if ( m_RectStart != Point2D.Zero && m_RectEnd != Point2D.Zero )
LabelTo( from, rect.ToString() );
}
else
{
LabelTo( from, "(inactive)" );
}
}