Esempio n. 1
0
        internal void SetComponent(Component comp, bool add)
        {
            ActionData ad = null;

            _components.TryGetValue(comp, out ad);

            if (add)
            {
                if (ad == null)
                {
                    ad = new ActionData();
                    ad.Attach(this, comp, DesignMode);
                    _components[comp] = ad;
                }
            }
            else if (ad != null)
            {
                ad.Detach(DesignMode);
                _components.Remove(comp);
            }
        }
Esempio n. 2
0
        internal void SetComponent(Component comp, bool add)
        {
            ActionData ad = null;
            _components.TryGetValue(comp, out ad);

            if (add)
            {
                if (ad == null)
                {
                    ad = new ActionData();
                    ad.Attach(this, comp, DesignMode);
                    _components[comp] = ad;
                }
            }
            else if (ad != null)
            {
                ad.Detach(DesignMode);
                _components.Remove(comp);
            }
        }