public SelectedNodeWindow(IEditorPropertyAccessor accessor, IToolElementTreeFactory toolElementTreeFactory)
        {
            _accessor = accessor;

            _subscription = accessor.OnSelectedNodeChanged.Subscribe(
                x => _selectedToolElements = toolElementTreeFactory.CreateToolElements(accessor.Selected));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="name"></param>
        /// <param name="source"></param>
        /// <param name="propertyName"></param>
        /// <param name="toolElementTreeFactory"></param>
        public GroupToolElement(string name, object source, string propertyName, IToolElementTreeFactory toolElementTreeFactory)
            : base(name, source, propertyName)
        {
            _toolElementTreeFactory = toolElementTreeFactory;
            object target = PropertyInfo?.GetValue(source);

            if (target != null)
            {
                Target       = new WeakReference <object>(target);
                ToolElements = toolElementTreeFactory.CreateToolElements(target).ToList();
            }
        }
예제 #3
0
 public ToolElementFactory(IToolElementTreeFactory toolElementTreeFactory)
 {
     _toolElementTreeFactory = toolElementTreeFactory;
 }
예제 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="guiInfo"></param>
 /// <param name="toolElementTreeFactory"></param>
 /// <returns></returns>
 public static GroupToolElement Create(object source, MemberGuiInfo guiInfo, IToolElementTreeFactory toolElementTreeFactory)
 {
     return(new GroupToolElement(guiInfo.Name, source, guiInfo.PropertyName, toolElementTreeFactory));
 }