Beispiel #1
0
        internal virtual void Initialize(CustomEditorPresenter presenter, LayoutElementsContainer layout, ValueContainer values)
        {
            _layout    = layout;
            _presenter = presenter;
            _values    = values;

            var prev = CurrentCustomEditor;

            CurrentCustomEditor = this;

            _isSetBlocked = true;
            Initialize(layout);
            Refresh();
            _isSetBlocked = false;

            CurrentCustomEditor = prev;
        }
Beispiel #2
0
            /// <inheritdoc />
            public override void Initialize(LayoutElementsContainer layout)
            {
                var selection = Presenter.Selection;

                if (selection.Count > 0)
                {
                    Type type = typeof(object);
                    if (selection.HasDiffrentTypes == false)
                    {
                        type = selection[0].GetType();
                    }
                    Editor = CustomEditorsUtil.CreateEditor(type, false);
                    Editor.Initialize(Presenter, Presenter, selection);
                    OnChildCreated(Editor);
                }
                else
                {
                    var label = layout.Label(_noSelectionText, TextAlignment.Center);
                    label.Label.Height = 20.0f;
                }

                base.Initialize(layout);
            }
 /// <inheritdoc />
 public override void Initialize(LayoutElementsContainer layout)
 {
     _isDirty = false;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes this editor.
 /// </summary>
 /// <param name="layout">The layout builder.</param>
 public abstract void Initialize(LayoutElementsContainer layout);
Beispiel #5
0
        /// <inheritdoc />
        public override void Initialize(LayoutElementsContainer layout)
        {
            EndUndoRecord();

            _isDirty = false;
        }