Exemple #1
0
 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;
         }
     }
 }
Exemple #2
0
 public DetailsCommand(DetailsDisplayEnum display, Tribe tribe, VillageTools tool)
 {
     Tooltip = tribe.ToString();
     Display = display;
     if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village || Display == DetailsDisplayEnum.Player)
         Display = DetailsDisplayEnum.Tribe;
     UnderlyingDisplay = DetailsDisplayEnum.Tribe;
     Tribe = tribe;
     Tool = tool;
 }
Exemple #3
0
 /// <summary>
 /// Create a new command with the same underlying display
 /// </summary>
 /// <param name="previous">The previous command</param>
 /// <param name="display">The new display</param>
 public DetailsCommand(DetailsCommand previous, DetailsDisplayEnum display)
 {
     Tooltip = previous.Tooltip;
     Village = previous.Village;
     Player = previous.Player;
     Tribe = previous.Tribe;
     UnderlyingDisplay = display;
     Display = display;
     Tool = VillageTools.SelectVillage;
     SubLayout = true;
 }
Exemple #4
0
 public DetailsCommand(DetailsDisplayEnum display, Player player, VillageTools tool)
 {
     Tooltip = player.ToString();
     Display = display;
     if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village) Display = DetailsDisplayEnum.Player;
     else if (Display == DetailsDisplayEnum.Tribe && !player.HasTribe) Display = DetailsDisplayEnum.Player;
     UnderlyingDisplay = DetailsDisplayEnum.Player;
     Player = player;
     Tool = tool;
     Tribe = player.Tribe;
 }
Exemple #5
0
 /// <summary>
 /// Create a new command with the same underlying display
 /// </summary>
 /// <param name="previous">The previous command</param>
 /// <param name="display">The new display</param>
 public DetailsCommand(DetailsCommand previous, DetailsDisplayEnum display)
 {
     Tooltip           = previous.Tooltip;
     Village           = previous.Village;
     Player            = previous.Player;
     Tribe             = previous.Tribe;
     UnderlyingDisplay = display;
     Display           = display;
     Tool      = VillageTools.SelectVillage;
     SubLayout = true;
 }
Exemple #6
0
 public DetailsCommand(DetailsDisplayEnum display, Tribe tribe, VillageTools tool)
 {
     Tooltip = tribe.ToString();
     Display = display;
     if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village || Display == DetailsDisplayEnum.Player)
     {
         Display = DetailsDisplayEnum.Tribe;
     }
     UnderlyingDisplay = DetailsDisplayEnum.Tribe;
     Tribe             = tribe;
     Tool = tool;
 }
Exemple #7
0
 public DetailsCommand(DetailsDisplayEnum display, Player player, VillageTools tool)
 {
     Tooltip = player.ToString();
     Display = display;
     if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village)
     {
         Display = DetailsDisplayEnum.Player;
     }
     else if (Display == DetailsDisplayEnum.Tribe && !player.HasTribe)
     {
         Display = DetailsDisplayEnum.Player;
     }
     UnderlyingDisplay = DetailsDisplayEnum.Player;
     Player            = player;
     Tool  = tool;
     Tribe = player.Tribe;
 }
Exemple #8
0
 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;
         }
     }
 }
Exemple #9
0
 public DetailsCommand()
 {
     UnderlyingDisplay = DetailsDisplayEnum.None;
     Display           = DetailsDisplayEnum.None;
     Tooltip           = string.Empty;
 }