Exemplo n.º 1
0
        public Component AddComponent(Component comp)
        {
            if(!_components.Contains(comp))
            {
                _components.Add(comp);

                if(this.ComponentsChanged != null)
                    this.ComponentsChanged(this,
                        new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, comp));
            }
            return comp;
        }
Exemplo n.º 2
0
        public void RemoveComponent(Component comp)
        {
            _components.Remove(comp);

            if(this.ComponentsChanged != null)
                    this.ComponentsChanged(this,
                        new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, comp));
        }
Exemplo n.º 3
0
 public ComponentViewModel(Component component)
 {
     _component = component;
 }
Exemplo n.º 4
0
 public ComponentAddedEventArgs(Component newComponent)
 {
     this.NewComponent = newComponent;
 }
Exemplo n.º 5
0
 public Component(string name, Component parent)
 {
     Properties = new Dictionary<string, string>();
     Properties.Add("Name", name);
     _parent = parent;
 }