Beispiel #1
0
        void RemoveRow(TypeRow row, bool removeControls)
        {
            if (row.Control == null)
            {
                return;
            }

            row.ControlDynamic.SetBinding(null);

            if (bindingObject != null)
            {
                var o0 = row.GetValue(bindingObject) as Data.Value.EnumBase;
                var o1 = row.GetValue(bindingObject) as Data.Value.PathForImage;
                if (o0 != null && row.IsSelector)
                {
                    o0.OnChanged -= ChangeSelector;
                }
                else if (o1 != null)
                {
                    o1.OnChanged -= ChangeSelector;
                }
            }

            if (removeControls)
            {
                this.Controls.Remove(row.Control);
                this.Controls.Remove(row.Label);
            }
        }
Beispiel #2
0
        void RemoveRow(TypeRow row, bool removeControls)
        {
            if (row.Control == null)
            {
                return;
            }

            row.ControlDynamic.SetBinding(null);

            if (bindingObject != null)
            {
                var o0 = row.GetValue(bindingObject) as Data.Value.EnumBase;
                var o1 = row.GetValue(bindingObject) as Data.Value.PathForImage;
                if (o0 != null && row.IsSelector)
                {
                    o0.OnChanged -= ChangeSelector;
                }
                else if (o1 != null)
                {
                    o1.OnChanged -= ChangeSelector;
                }
            }

            if (removeControls)
            {
                if (row.Control is Control)
                {
                    var c = row.Control as Control;
                    c.DispatchDisposed();
                }
                else
                {
                    row.Control.OnDisposed();
                }
            }

            this.controlRows.Remove(row);
        }
Beispiel #3
0
        void RemoveRow(TypeRow row, bool removeControls)
        {
            if (row.Control == null) return;

            row.ControlDynamic.SetBinding(null);

            if (bindingObject != null)
            {
                var o0 = row.GetValue(bindingObject) as Data.Value.EnumBase;
                var o1 = row.GetValue(bindingObject) as Data.Value.PathForImage;
                if (o0 != null && row.IsSelector)
                {
                    o0.OnChanged -= ChangeSelector;
                }
                else if (o1 != null)
                {
                    o1.OnChanged -= ChangeSelector;
                }
            }

            if (removeControls)
            {
                this.Controls.Remove(row.Control);
                this.Controls.Remove(row.Label);
            }
        }