コード例 #1
0
        private void RemoveControlGrouped(ExtendedControl control, Type wType = null)
        {
            if (control == null)
            {
                return;
            }

            if (wType == null)
            {
                wType = control.GetType();
            }

            if (!controlsGrouped.ContainsKey(wType))
            {
                return;
            }

            controlsGrouped[wType].Remove(control);

            if (wType.BaseType != null)
            {
                RemoveControlGrouped(control, wType.BaseType);
            }
        }
コード例 #2
0
        private void AddControlGrouped(ExtendedControl control, Type wType = null)
        {
            if (control == null)
            {
                return;
            }

            if (wType == null)
            {
                wType = control.GetType();
            }

            if (!controlsGrouped.ContainsKey(wType))
            {
                controlsGrouped.Add(wType, new List <ExtendedControl>());
            }

            controlsGrouped[wType].Add(control);

            if (wType.BaseType != null)
            {
                AddControlGrouped(control, wType.BaseType);
            }
        }