Example #1
0
        private void OnAfterSelect(object sender, TreeViewEventArgs e)
        {
            MementoStack.EndCompoundMemento();

            var type = mNodeTreeView.SelectedDataNode.GetType();

            if (mNodeTreeView.SelectedDataNode is ReferenceNode referenceNode)
            {
                mPropertyGrid.SelectedObject = referenceNode.Node;
            }

#if !DEBUG
            else if (type.IsGenericType && typeof(ListNode <>).IsAssignableFrom(type.GetGenericTypeDefinition()))
            {
                mPropertyGrid.SelectedObjects = mNodeTreeView.SelectedDataNode.Nodes.ToArray();

                MementoStack.BeginCompoundMemento();
            }
#endif
            else
            {
                mPropertyGrid.SelectedObject = mNodeTreeView.SelectedDataNode;
            }

            // Set the control on the left to the node's control
            SetSplitContainerControl(mNodeTreeView.ControlOfSelectedDataNode);
        }
Example #2
0
 private void OnPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     MementoStack.EndCompoundMemento();
     MementoStack.BeginCompoundMemento();
 }