private void AddTarget() { foreach (var target in TargetsList) { var newTargetViewModel = new TargetViewModel(target); //var newTarget = new Target("newTarget", 0, 0, 0, true); //// But we need to wrap this target with a view model so that //// the button (kill) will work //var newTargetViewModel = new TargetViewModel(newTarget); TargetsCollection.Add(newTargetViewModel); SelectedTarget = newTargetViewModel; } }
/// <summary>Adds the specified competition target.</summary> /// <param name="competitionTarget">The competition target.</param> public void Add(CompetitionTarget competitionTarget) { Code.AssertState(!Initialized, "The targets is initialized already."); _targets.Add(competitionTarget); }