コード例 #1
0
 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();
 }
コード例 #2
0
 private void ActiveAgentChanged(GameObject agent)
 {
     AgentChanged?.Invoke(agent);
 }