Пример #1
0
        private void Desktop_NodeRemoved(object sender, NodeEventArgs e)
        {
            MyNode node = (e.Node as MyNodeView).Node;
            if (node != null)
            {
                Target.RemoveChild(node);
            }

            if (node is MyNodeGroup)
            {
                m_mainForm.CloseGraphLayout(node as MyNodeGroup);
            }
            else if (node is MyScriptableNode)
            {
                m_mainForm.CloseTextEditor(node as MyScriptableNode);
            }

            m_mainForm.CloseObservers(node);
            m_mainForm.RemoveFromDashboard(node);
        }
Пример #2
0
        private void Desktop_NodeRemoved(object sender, NodeEventArgs e)
        {
            MyNode node = (e.Node as MyNodeView).Node;
            if (node != null)
            {
                Target.RemoveChild(node);
            }

            if (node is MyNodeGroup)
            {
                m_mainForm.CloseGraphLayout(node as MyNodeGroup);
            }

            m_mainForm.CloseObservers(node);
        }
Пример #3
0
        private void Desktop_NodeRemoved(object sender, NodeEventArgs e)
        {
            MyNode node = (e.Node as MyNodeView).Node;
            if (node == null)
                return;

            Target.RemoveChild(node);
            if (node is MyNodeGroup)
            {
                m_mainForm.CloseGraphLayout(node as MyNodeGroup);
            }
            else if (node is IScriptableNode)
            {
                m_mainForm.CloseTextEditor(node as IScriptableNode);
            }

            m_mainForm.CloseObservers(node);
            m_mainForm.RemoveFromDashboard(node);

            // End state saving suppression, we'll need to save one state after the node is removed.
            m_mainForm.SuppressStateSaving = false;

            m_mainForm.ProjectStateChanged("Node removed");
        }