Exemple #1
0
 public new void Hide()
 {
     if (descriptionWindow != null)
     {
         descriptionWindow.Destroy();
         descriptionWindow = null;
     }
     agent.Hide();
 }
		public bool RemoveAgent(ISpaceReservationAgent agent) {
			if (agent == null)
				throw new ArgumentNullException(nameof(agent));
			if (!spaceReservationAgents.Remove(agent))
				return false;
			agent.GotFocus -= SpaceReservationAgent_GotFocus;
			agent.LostFocus -= SpaceReservationAgent_LostFocus;
			agent.Hide();
			AgentChanged?.Invoke(this, new SpaceReservationAgentChangedEventArgs(agent, null));
			UpdateAggregateFocus();
			wpfTextView.QueueSpaceReservationStackRefresh();
			return true;
		}
 public bool RemoveAgent(ISpaceReservationAgent agent)
 {
     if (agent == null)
     {
         throw new ArgumentNullException(nameof(agent));
     }
     if (!spaceReservationAgents.Remove(agent))
     {
         return(false);
     }
     agent.GotFocus  -= SpaceReservationAgent_GotFocus;
     agent.LostFocus -= SpaceReservationAgent_LostFocus;
     agent.Hide();
     AgentChanged?.Invoke(this, new SpaceReservationAgentChangedEventArgs(agent, null));
     UpdateAggregateFocus();
     wpfTextView.QueueSpaceReservationStackRefresh();
     return(true);
 }
Exemple #4
0
        internal void ChangeAgents(ISpaceReservationAgent oldAgent, ISpaceReservationAgent newAgent)
        {
            if (oldAgent != null)
            {
                oldAgent.LostFocus -= OnAgentLostFocus;
                oldAgent.GotFocus  -= OnAgentGotFocus;
                oldAgent.Hide();
            }

            EventHandler <SpaceReservationAgentChangedEventArgs> agentChanged = this.AgentChanged;

            if (agentChanged != null)
            {
                agentChanged(this, new SpaceReservationAgentChangedEventArgs(oldAgent, newAgent));
            }

            if (newAgent != null)
            {
                newAgent.LostFocus += OnAgentLostFocus;
                newAgent.GotFocus  += OnAgentGotFocus;
            }

            _view.QueueSpaceReservationStackRefresh();
        }
 public new void Hide()
 {
     HideDescription();
     agent.Hide();
 }