Example #1
0
        private static void ConnectInspector(ShaderDocumentViewModel shaderDoc)
        {
            var inspectorTool = IoC.Get <IInspectorTool>();
            var objBuilder    = new InspectableObjectBuilder().WithObjectProperties(shaderDoc, pd => true);

            inspectorTool.SelectedObject = objBuilder.ToInspectableObject();
        }
Example #2
0
        public void OnSelectedItemChanged(TraceListItem selectedItem)
        {
            if (mInspectorTool == null)
            {
                return;
            }

            if (selectedItem == null)
            {
                mInspectorTool.SelectedObject = null;
                return;
            }

            var item_inspector = new InspectableObjectBuilder()
                                 .WithObjectProperties(selectedItem, TraceListItemPropertyFilter);

            if (selectedItem.HasData)
            {
                item_inspector
                .WithEditor(selectedItem, x => x.Data, new Inspectors.TraceDataEditorViewModel());
            }

            mInspectorTool.SelectedObject = item_inspector.ToInspectableObject();
        }