public void AddAgent(ISpaceReservationAgent agent) { if (wpfTextView.IsClosed) { throw new InvalidOperationException(); } if (agent == null) { throw new ArgumentNullException(nameof(agent)); } if (spaceReservationAgents.Contains(agent)) { throw new InvalidOperationException(); } spaceReservationAgents.Add(agent); agent.GotFocus += SpaceReservationAgent_GotFocus; agent.LostFocus += SpaceReservationAgent_LostFocus; AgentChanged?.Invoke(this, new SpaceReservationAgentChangedEventArgs(null, agent)); UpdateAggregateFocus(); wpfTextView.QueueSpaceReservationStackRefresh(); }
private void ActiveAgentChanged(GameObject agent) { AgentChanged?.Invoke(agent); }