本文整理汇总了C#中Village.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Village.ToString方法的具体用法?C# Village.ToString怎么用?C# Village.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Village
的用法示例。
在下文中一共展示了Village.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailsCommand
public DetailsCommand(DetailsDisplayEnum display, Village village, VillageTools tool)
{
Tooltip = village.ToString();
Display = display;
if (Display == DetailsDisplayEnum.None) Display = DetailsDisplayEnum.Village;
else if (Display == DetailsDisplayEnum.Player && !village.HasPlayer) Display = DetailsDisplayEnum.Village;
else if (Display == DetailsDisplayEnum.Tribe && !village.HasTribe) Display = DetailsDisplayEnum.Village;
UnderlyingDisplay = DetailsDisplayEnum.Village;
Village = village;
Tool = tool;
if (village.HasPlayer)
{
Player = village.Player;
if (Player.HasTribe)
{
Tribe = Player.Tribe;
}
}
}
示例2: Match
/// <summary>
/// Checks if the village matches the current search criteria
/// </summary>
public bool Match(Village village)
{
if (SearchStrategy == FinderOptionsEnum.Nobled)
{
if (!village.HasPlayer || village.PreviousVillageDetails == null || village.Player.Equals(village.PreviousVillageDetails.Player))
return false;
if (Tribe != null &&
(
(!village.HasTribe || !Tribe.Equals(village.Player.Tribe))
&&
(!village.PreviousVillageDetails.HasTribe || !Tribe.Equals(village.PreviousVillageDetails.Player.Tribe))
)
)
return false;
}
else
{
if (Tribe != null && (!village.HasTribe || !Tribe.Equals(village.Player.Tribe)))
return false;
switch (SearchStrategy)
{
case FinderOptionsEnum.NewInactives:
if (village.HasPlayer || village.PreviousVillageDetails == null || !village.PreviousVillageDetails.HasPlayer)
return false;
break;
case FinderOptionsEnum.LostPoints:
if (village.PreviousVillageDetails == null || village.Points >= village.PreviousVillageDetails.Points)
return false;
break;
}
}
if (!string.IsNullOrEmpty(Text) && !village.ToString().ToUpper(CultureInfo.InvariantCulture).Contains(Text))
{
return false;
}
if (village.Points < PointsBetweenStart || (PointsBetweenEnd > 0 && village.Points > PointsBetweenEnd))
return false;
return true;
}
示例3: Map_MouseMoved
private void Map_MouseMoved(MouseEventArgs e, Point mapLocation, Village village, Point activeLocation, Point activeVillage)
{
StatusXY.Text = string.Format("{0}|{1}", activeLocation.X, activeLocation.Y);
if (village == null)
{
StatusPlayer.Text = string.Empty;
StatusTribe.Text = string.Empty;
StatusVillage.Text = string.Empty;
}
else
{
StatusPlayer.Text = village.HasPlayer ? string.Format("{0} (#{1})", village.Player.Name, village.Player.Rank) : string.Empty;
StatusTribe.Text = village.HasTribe ? village.Player.Tribe.ToString() : string.Empty;
StatusVillage.Text = village.ToString();
}
}