Ejemplo n.º 1
0
 public void NotifyAll()
 {
     if (observers != null)
     {
         foreach (ModelComponentObserver o in observers)
         {
             o.notify(this);
         }
         if (container != null)
         {
             container.NotifyAll();
         }
     }
 }
Ejemplo n.º 2
0
        public void SetContainer(ModelComponent composite)
        {
            ModelComponent tempContainer = container;

            if (container != null)
            {
                container.GetChildren().Remove(this);
            }
            container = composite;

            // Notify the new tree.
            NotifyAll();

            if (tempContainer != null)
            {
                // Notify the old tree.
                tempContainer.NotifyAll();
            }
        }