Beispiel #1
0
        public SingleEditor(EntityComponent component, ComponentPropertyItem property)
            : base(component, property)
        {
            InitializeComponent();

            PropertyName.Text = property.Name;
            UpdateValues(false);

            AddNumericBoxEvents(OnValueChanged, Value);
        }
        public UnsupportedEditor(EntityComponent component, ComponentPropertyItem property)
            : base(component, property)
        {
            InitializeComponent();

            PropertyName.Text = property.Name;
            var value = property.GetValue(component);

            Value.Text = value == null ? "null" : value.ToString();
        }
        public BooleanEditor(EntityComponent component, ComponentPropertyItem property)
            : base(component, property)
        {
            InitializeComponent();

            PropertyName.Text = property.Name;

            UpdateValues(false);

            Value.Click += OnValueChanged;
        }
        public EnumEditor(EntityComponent component, ComponentPropertyItem property)
        {
            InitializeComponent();

            Component         = component;
            ComponentProperty = property;

            PropertyName.Text = property.Name;

            Value.ItemsSource = Enum.GetNames(property.PropertyType);

            UpdateValues(false);

            Value.SelectionChanged += Value_SelectionChanged;
        }
Beispiel #5
0
 public BaseEditor(EntityComponent component, ComponentPropertyItem property)
 {
     Component         = component;
     ComponentProperty = property;
 }