예제 #1
0
        public override void Destroy()
        {
            m_mainPreviewNode = null;

            base.Destroy();

            if (ContainerGraph.ParentWindow.OutsideGraph.CurrentStandardSurface != null)
            {
                for (int i = 0; i < m_includes.Count; i++)
                {
                    if (ContainerGraph.ParentWindow.OutsideGraph.CurrentStandardSurface.AdditionalIncludes.OutsideList.Contains(m_includes[i]))
                    {
                        ContainerGraph.ParentWindow.OutsideGraph.CurrentStandardSurface.AdditionalIncludes.OutsideList.Remove(m_includes[i]);
                    }
                }
            }

            if (m_reordenator != null)
            {
                ParentGraph cachedGraph = ContainerGraph.ParentWindow.CustomGraph;
                ContainerGraph.ParentWindow.CustomGraph = null;
                UIUtils.UnregisterPropertyNode(m_reordenator);
                ContainerGraph.ParentWindow.CustomGraph = cachedGraph;

                m_reordenator.Destroy();
                m_reordenator = null;
            }

            UIUtils.UnregisterFunctionNode(this);

            ParentGraph cachedGraph2 = ContainerGraph.ParentWindow.CustomGraph;

            ContainerGraph.ParentWindow.CustomGraph = m_functionGraph;

            if (m_allFunctionInputs != null)
            {
                m_allFunctionInputs.Clear();
            }
            m_allFunctionInputs = null;

            if (m_allFunctionOutputs != null)
            {
                m_allFunctionOutputs.Clear();
            }
            m_allFunctionOutputs = null;

            if (m_functionGraph != null)
            {
                m_functionGraph.Destroy();
            }
            m_functionGraph = null;

            ContainerGraph.ParentWindow.CustomGraph = cachedGraph2;
            m_function = null;
        }
예제 #2
0
        public override void Destroy()
        {
            base.Destroy();

            if (m_reordenator != null)
            {
                ParentGraph cachedGraph = ContainerGraph.ParentWindow.CustomGraph;
                ContainerGraph.ParentWindow.CustomGraph = null;
                UIUtils.UnregisterPropertyNode(m_reordenator);
                ContainerGraph.ParentWindow.CustomGraph = cachedGraph;

                m_reordenator.Destroy();
                m_reordenator = null;
            }

            UIUtils.UnregisterFunctionNode(this);

            ParentGraph cachedGraph2 = ContainerGraph.ParentWindow.CustomGraph;

            ContainerGraph.ParentWindow.CustomGraph = m_functionGraph;

            if (m_allFunctionInputs != null)
            {
                m_allFunctionInputs.Clear();
            }
            m_allFunctionInputs = null;

            if (m_allFunctionOutputs != null)
            {
                m_allFunctionOutputs.Clear();
            }
            m_allFunctionOutputs = null;

            if (m_functionGraph != null)
            {
                m_functionGraph.Destroy();
            }
            m_functionGraph = null;

            ContainerGraph.ParentWindow.CustomGraph = cachedGraph2;
            m_function = null;
        }