本文整理汇总了C#中Race.Description方法的典型用法代码示例。如果您正苦于以下问题:C# Race.Description方法的具体用法?C# Race.Description怎么用?C# Race.Description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Race
的用法示例。
在下文中一共展示了Race.Description方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetRace
private void SetRace(Race race)
{
Starship.CrewRace = race;
if (race == Race.Servitor)
{
if (Starship.CrewRating != 0 && Enum.IsDefined(typeof(ServitorQuality), Starship.CrewRating))
Servitor.SelectedItem = (ServitorQuality)Starship.CrewRating;
else
Servitor.SelectedItem = ServitorQuality.Common;
Servitor.Visibility = Visibility.Visible;
CrewQuality.Visibility = Visibility.Hidden;
}
else
{
if (Starship.CrewRating != 0 && Enum.IsDefined(typeof(StarshipGenerator.Utils.CrewRating), Starship.CrewRating))
CrewQuality.SelectedItem = (StarshipGenerator.Utils.CrewRating)Starship.CrewRating;
else
CrewQuality.SelectedItem = StarshipGenerator.Utils.CrewRating.Competent;
CrewQuality.Visibility = Visibility.Visible;
Servitor.Visibility = Visibility.Hidden;
}
RaceName.Content = race.Name() + ":";
RaceDesc.Text = race.Description();
}