public SelectedNodeWindow(IEditorPropertyAccessor accessor, IToolElementTreeFactory toolElementTreeFactory) { _accessor = accessor; _subscription = accessor.OnSelectedNodeChanged.Subscribe( x => _selectedToolElements = toolElementTreeFactory.CreateToolElements(accessor.Selected)); }
/// <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(); } }
public ToolElementFactory(IToolElementTreeFactory toolElementTreeFactory) { _toolElementTreeFactory = toolElementTreeFactory; }
/// <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)); }