private void GoldExpToHeroes_Click(object sender, RoutedEventArgs e) { MoneyArgs ma = new MoneyArgs(); MoneyShare ms = new MoneyShare(ma); if (ms.ShowDialog() == false) { return; } if (ma.Mode == ShareMode.ToAll && ma.Status == HeroStatus.All) { GiveMoney(ma.Amount, heroes); } if (ma.Mode == ShareMode.ToAll && ma.Status == HeroStatus.Active) { GiveMoney(ma.Amount, HeroesListView.SelectedItems.Cast <Hero>()); } }
public MoneyShare(MoneyArgs ma) { InitializeComponent(); MoneyArguments = ma; }