Ejemplo n.º 1
0
 /// <summary>
 /// Registers a help element.
 /// </summary>
 /// <param name="listener">The element to register</param>
 /// <returns>If the element was succesfully registered</returns>
 public bool AddListener(ShowHelp listener)
 {
     if (_helpListeners.Contains(listener))
         return false;
     _helpListeners.Add(listener);
     if (_helpShown)
         listener.Show();
     return true;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Unregisters a help element.
 /// </summary>
 /// <param name="listener">The element to unregister</param>
 /// <returns>If the element was succesfully unregistered</returns>
 public bool RemoveListener(ShowHelp listener)
 {
     if (!_helpListeners.Contains(listener))
         return false;
     _helpListeners.Remove(listener);
     if (!_helpShown)
         listener.Hide();
     return true;
 }