public void AddPlayInfo(PlayInfo playInfo) { string strFormationName = string.Empty; if (ScoutType == ScoutTypes.Offensive) { strFormationName = playInfo.OffensiveFormation; } if (ScoutType == ScoutTypes.Defensive) { strFormationName = playInfo.DefensiveFormation; } FVFormationModel fvfM = Formations.Find(f => f.FormationName == strFormationName); if (fvfM == null) { fvfM = new FVFormationModel(strFormationName, ScoutType); Formations.Add(fvfM); } fvfM.AddPlay(playInfo.PlayName); }
public FVFormationViewModel(FVFormationModel fVFFormation, ScoutTypeViewModel stvm) : base(stvm, false) { FVFFormation = fVFFormation; if (stvm.ScoutType.ScoutType == ScoutTypes.Offensive) { this.Image = AppDomain.CurrentDomain.BaseDirectory + @"Resource\Off Formation.ico"; } if (stvm.ScoutType.ScoutType == ScoutTypes.Defensive) { this.Image = AppDomain.CurrentDomain.BaseDirectory + @"Resource\Def Formation.ico"; } this.formationName = FVFFormation.FormationName; }