Beispiel #1
0
        internal void onPropertyChanged(CustomProperty _owner, object value)
        {
            WElement wc = getSelectedElementControl();
            CElement el = getSelectedElement();

            if (wc == null)
            {
                return;
            }

            if (_owner.Name.Trim().ToLower() == "visible" && _owner.WProp)
            {
                wc.Visibility = (bool)value == true ? Visibility.Visible : Visibility.Hidden;
            }

            if (_owner.WProp && _owner.Category.Trim().ToLower() == "rect")
            {
                if (_owner.Name.Trim() == "Width")
                {
                    el.setWidth((int)value);
                }
                if (_owner.Name.Trim() == "Height")
                {
                    el.setHeight((int)value);
                }
                if (_owner.Name.Trim() == "Left")
                {
                    el.setLeft((int)value);
                }
                if (_owner.Name.Trim() == "Top")
                {
                    el.setTop((int)value);
                }

                updateElementControl(el.ID);
            }
        }
Beispiel #2
0
 public void Add(CustomProperty customProperty)
 {
     this.Properties.Add(customProperty);
 }