public void AddUseCase() { if (Actors == null || !Actors.Any()) { return; } this.mainViewModelHandler.UseCases.Add(new UseCaseViewModel(selectedActor, selectedUseCaseType, name)); }
public bool IsValid() { if (ScheduleStartsAt != DateTime.MinValue && ScheduleEndsAt != DateTime.MinValue && Actors != null && Busy != null && Tasks != null) { return(Actors.Any() && Busy.Any() && Tasks.Any()); } return(false); }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { List <ValidationResult> errors = new List <ValidationResult>(); if (Actors != null && Actors.Any()) { bool duplicates = Actors.GroupBy(a => a).Any(a => a.Count() > 1); if (duplicates) { errors.Add(new ValidationResult("Duplicate actors", new[] { "Actors" })); } } return(errors); }
public VoiceActorInformationViewModel(Project project) { m_currentId = 0; m_project = project; if (Actors.Any()) { m_currentId = Actors.Max(a => a.Id) + 1; } foreach (var actor in Actors) { var characterGroup = project.CharacterGroupList.GetGroupsAssignedToActor(actor.Id).FirstOrDefault(); m_originalActors.Add(new Tuple <VoiceActor.VoiceActor, CharacterGroup>(actor.MakeCopy(), characterGroup)); } }
public GameTile[] GetMaskedViewportWithViewcones(Point2i size, Point2i position, GameGrid <bool> visibilityGrid, GameGrid <bool> guardVisibilityGrid) { var maskedViewport = GetMaskedViewport(size, position, visibilityGrid); foreach (var kvp in Items) { if (visibilityGrid[kvp.Key] && !Actors.Any(a => a.Position == kvp.Key)) { maskedViewport[PositionToIndex(kvp.Key)] = kvp.Value.Presentation; } } for (var i = 0; i < maskedViewport.Length; i++) { if (guardVisibilityGrid[i] && visibilityGrid[i]) { maskedViewport[i] = new GameTile(maskedViewport[i].Glyph, maskedViewport[i].Foreground, Colors.GuardVisibility); } } return(maskedViewport); }
public bool ShouldSerializeActors() { return(Actors.Any()); }
public bool IsActor(Cell cell) { return(Actors.Any(entry => entry.Position != null && entry.Position.Cell == cell)); }
public bool IsActorOnPoint(Point point) { return(IsPawnOnPoint(point) || Actors.Any(actor => point == actor.Position)); }