/// <summary> /// Publishes an event for one tribe /// </summary> public void SelectTribe(object sender, Tribe tribe, VillageTools tool) { if (TribeSelected != null) { TribeSelected(sender, new TribeEventArgs(tribe, tool)); } }
/// <summary> /// Publishes an event for one player /// </summary> public void SelectPlayer(object sender, Player player, VillageTools tool) { if (PlayerSelected != null) { PlayerSelected(sender, new PlayerEventArgs(player, tool)); } }
/// <summary> /// Publishes an event for the villages of one player /// </summary> public void SelectVillages(object sender, Player ply, VillageTools action) { if (ply != null) { VillagesSelected(sender, new PlayerEventArgs(ply, action)); } }
/// <summary> /// Publishes an event for all the villages in one tribe /// </summary> public void SelectVillages(object sender, Tribe tribe, VillageTools action) { if (tribe != null) { VillagesSelected(sender, new TribeEventArgs(tribe, action)); } }
/// <summary> /// Publishes an event for several villages /// </summary> public void SelectVillages(object sender, IEnumerable <Village> vil, VillageTools action) { if (VillagesSelected != null) { VillagesSelected(sender, new VillagesEventArgs(vil, action)); } }
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; } } }
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; }
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; }
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; }
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; }
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; } } }
/// <summary> /// Prepares the user control for player details viewing /// </summary> private void SetQuickFinder(Player player, VillageTools tool) { SetQuickFinder(new DetailsCommand(_current.Display, player, tool)); }
public PlayerEventArgs(Player ply, VillageTools tool) : base(ply, tool) { SelectedPlayer = ply; }
/// <summary> /// Publishes an event for the villages of one player /// </summary> public void SelectVillages(object sender, Player ply, VillageTools action) { if (ply != null) VillagesSelected(sender, new PlayerEventArgs(ply, action)); }
public VillageEventArgs(Village vil, VillageTools tool) : base(vil, tool) { SelectedVillage = vil; }
public VillageCommand(VillageTools tool) { Tool = tool; }
public TribesEventArgs(IEnumerable<Tribe> tribe, VillageTools tool) { Tribes = tribe; Tool = tool; }
/// <summary> /// Publishes an event for several villages /// </summary> public void SelectVillages(object sender, IEnumerable<Village> vil, VillageTools action) { if (VillagesSelected != null) { VillagesSelected(sender, new VillagesEventArgs(vil, action)); } }
/// <summary> /// Publishes an event for all the villages in one tribe /// </summary> public void SelectVillages(object sender, Tribe tribe, VillageTools action) { if (tribe != null) VillagesSelected(sender, new TribeEventArgs(tribe, action)); }
public VillagesEventArgs(IEnumerable <Village> vil, VillageTools tool) { Villages = vil; Action = new VillageCommand(tool); }
public TribeEventArgs(Tribe tribe, VillageTools tool) : base(tribe, tool) { SelectedTribe = tribe; }
public VillagesEventArgs(IEnumerable<Village> vil, VillageTools tool) { Villages = vil; Action = new VillageCommand(tool); }
public PlayersEventArgs(IEnumerable<Player> ply, VillageTools tool) { Players = ply; Tool = tool; }
/// <summary> /// Prepares the user control for tribe details viewing /// </summary> private void SetQuickFinder(Tribe tribe, VillageTools tool) { SetQuickFinder(new DetailsCommand(_current.Display, tribe, tool)); }
public PlayersEventArgs(IEnumerable <Player> ply, VillageTools tool) { Players = ply; Tool = tool; }
public TribesEventArgs(IEnumerable <Tribe> tribe, VillageTools tool) { Tribes = tribe; Tool = tool; }