private void Desktop_NodeRemoving(object sender, AcceptNodeEventArgs e)
        {
            e.Cancel = TestIfInsideSimulation();

            MyNodeView nodeView = e.Node as MyNodeView;

            e.Cancel |= nodeView.Node is MyParentInput || nodeView.Node is MyOutput;
        }
        private void OnNodeAdded(object sender, AcceptNodeEventArgs e)
        {
            var nodeView = e.Node as NodeView;
            var node     = nodeView?.Node as Region;

            if (node != null && !AgentBlueprint.Brain.Regions.Contains(node))
            {
                AgentBlueprint.Brain.Regions.Add(node);
            }
        }
Exemple #3
0
        private void onNodeAdded(object sender, AcceptNodeEventArgs e)
        {
            List <Node> nodes = (List <Node>)graphCtrl.Nodes;

            if (nodes.Count > 0)
            {
                m_dirty = true;
            }
            graphCtrl.Focus();
        }
        private void Desktop_NodeRemoving(object sender, AcceptNodeEventArgs e)
        {
            e.Cancel = CanChangeGraph();

            // Suppress state saving - connections will get removed which would generate multiple steps.
            m_mainForm.SuppressStateSaving = true;

            MyNodeView nodeView = e.Node as MyNodeView;

            e.Cancel |= nodeView.Node is MyParentInput || nodeView.Node is MyOutput;
        }
Exemple #5
0
 private void OnNodeAdded(object sender, AcceptNodeEventArgs args)
 {
     OnNodesChange();
 }
 private void OnNodeRemoving(object sender, AcceptNodeEventArgs e)
 {
 }