private void Manual1_NeedIntent2(object sender, EventArgs e) { var handler = (Core.ManualTeamHandler)sender; manualIntentAction = handler.SetIntent2; manualIntentTeam = Core.Teams.Team1; SetBlink(mainField.Game.Team1.Agent2); }
public HandlerPanel(Core.Teams team, KeyValuePair <string, Func <Core.TeamHandlerBase> > pair) { Pair = pair; TeamHandler = pair.Value(); Margin = new Thickness(10, 10, 0, 0); RadioButton.GroupName = team + "HandlerPanel"; RadioButton.Content = pair.Key; Children.Add(RadioButton); RadioButton.Checked += RadioButton_Checked; RadioButton.Unchecked += RadioButton_Unchecked; }
private void TeamPropertyChanged(Core.Teams oldValue, Core.Teams newValue) { switch (newValue) { case Core.Teams.Team1: Team1Radio.IsChecked = true; Team1View.Visibility = Visibility.Visible; Team2View.Visibility = Visibility.Collapsed; break; case Core.Teams.Team2: Team2Radio.IsChecked = true; Team1View.Visibility = Visibility.Collapsed; Team2View.Visibility = Visibility.Visible; break; } }
public TeamView(Core.Teams team) { TeamEnum = team; InitializeComponent(); RefreshHandlers(); }