コード例 #1
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the sub-circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            m_inputPins  = new DomNodeListAdapter <ICircuitPin>(DomNode, InputChildInfo);
            m_outputPins = new DomNodeListAdapter <ICircuitPin>(DomNode, OutputChildInfo);

            base.OnNodeSet();
        }
コード例 #2
0
ファイル: SubCircuit.cs プロジェクト: vincenthamm/ATF
        /// <summary>
        /// Performs initialization when the adapter is connected to the sub-circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            m_inputPins = new DomNodeListAdapter<ICircuitPin>(DomNode, InputChildInfo);
            m_outputPins = new DomNodeListAdapter<ICircuitPin>(DomNode, OutputChildInfo);

            base.OnNodeSet();
        }
コード例 #3
0
ファイル: VisualScript.cs プロジェクト: blue3k/ATFClone
 /// <summary>
 /// Performs initialization when the adapter is connected to the circuit's DomNode</summary>
 protected override void OnNodeSet()
 {
     // cache these list wrapper objects
     m_modules     = new DomNodeListAdapter <ScriptNode>(DomNode, visualScriptType.moduleChild);
     m_connections = new DomNodeListAdapter <ScriptNodeConnection>(DomNode, visualScriptType.connectionChild);
     new DomNodeListAdapter <ScriptAnnotation>(DomNode, visualScriptType.annotationChild);
     base.OnNodeSet();
 }
コード例 #4
0
 /// <summary>
 /// Performs initialization when the adapter is connected to the circuit's DomNode</summary>
 protected override void OnNodeSet()
 {
     // cache these list wrapper objects
     m_modules     = new DomNodeListAdapter <Module>(DomNode, Schema.circuitType.moduleChild);
     m_connections = new DomNodeListAdapter <Connection>(DomNode, Schema.circuitType.connectionChild);
     new DomNodeListAdapter <Annotation>(DomNode, Schema.circuitType.annotationChild);
     base.OnNodeSet();
 }
コード例 #5
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            var documentClientInfo = DomNode.Type.GetTag<DocumentClientInfo>();
            if (documentClientInfo != null)
                SetEditorFileType(documentClientInfo.FileType);
            m_subCircuits = new DomNodeListAdapter<SubCircuit>(DomNode, SubCircuitChildInfo);

            base.OnNodeSet();
        }
コード例 #6
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the group's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing:
        /// creates a DomNodeListAdapter for various circuit elements.</summary>
        protected override void OnNodeSet()
        {
            m_modules     = new DomNodeListAdapter <Module>(DomNode, Schema.groupType.moduleChild);
            m_connections = new DomNodeListAdapter <Connection>(DomNode, Schema.groupType.connectionChild);
            new DomNodeListAdapter <Annotation>(DomNode, Schema.groupType.annotationChild);
            new DomNodeListAdapter <GroupPin>(DomNode, Schema.groupType.inputChild);
            new DomNodeListAdapter <GroupPin>(DomNode, Schema.groupType.outputChild);
            m_thisModule = DomNode.Cast <Module>();

            base.OnNodeSet();
        }
コード例 #7
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the group's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing:
        /// creates a DomNodeListAdapter for various circuit elements.</summary>
        protected override void OnNodeSet()
        {
            m_modules     = new DomNodeListAdapter <ScriptNode>(DomNode, groupType.moduleChild);
            m_connections = new DomNodeListAdapter <ScriptNodeConnection>(DomNode, groupType.connectionChild);
            new DomNodeListAdapter <ScriptAnnotation>(DomNode, groupType.annotationChild);
            new DomNodeListAdapter <ScriptGroupSocket>(DomNode, groupType.inputChild);
            new DomNodeListAdapter <ScriptGroupSocket>(DomNode, groupType.outputChild);
            m_thisModule = DomNode.Cast <ScriptNode>();

            base.OnNodeSet();
        }
コード例 #8
0
ファイル: CircuitDocument.cs プロジェクト: zparr/ATF
        /// <summary>
        /// Performs initialization when the adapter is connected to the circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            var documentClientInfo = DomNode.Type.GetTag <DocumentClientInfo>();

            if (documentClientInfo != null)
            {
                SetEditorFileType(documentClientInfo.FileType);
            }
            m_subCircuits = new DomNodeListAdapter <SubCircuit>(DomNode, SubCircuitChildInfo);

            base.OnNodeSet();
        }
コード例 #9
0
ファイル: CircuitDocument.cs プロジェクト: GeertVL/ATF
        /// <summary>
        /// Performs initialization when the adapter is connected to the circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            var documentClientInfo = DomNode.Type.GetTag<DocumentClientInfo>();
            if (documentClientInfo != null)
                SetEditorFileType(documentClientInfo.FileType);
            
            #pragma warning disable 618 //mastered sub-circuits are obsolete
            if (SubCircuitChildInfo != null)
                m_subCircuits = new DomNodeListAdapter<SubCircuit>(DomNode, SubCircuitChildInfo);
            #pragma warning restore 618

            base.OnNodeSet();
        }
コード例 #10
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the editing context's DomNode.
        /// Raises the EditingContext NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            m_statechart     = DomNode.Cast <Statechart>();
            m_document       = DomNode.Cast <Document>();
            m_viewingContext = DomNode.Cast <ViewingContext>();

            m_transitions = new DomNodeListAdapter <Transition>(DomNode, Schema.statechartDocumentType.transitionChild);

            DomNode.AttributeChanged += new EventHandler <AttributeEventArgs>(DomNode_AttributeChanged);
            DomNode.ChildInserted    += new EventHandler <ChildEventArgs>(DomNode_ChildInserted);
            DomNode.ChildRemoved     += new EventHandler <ChildEventArgs>(DomNode_ChildRemoved);

            base.OnNodeSet();
        }
コード例 #11
0
        protected override void OnNodeSet()
        {  
            var gameDocRegistry = Globals.MEFContainer.GetExportedValue<GameDocumentRegistry>();
            if (gameDocRegistry.MasterDocument == null || gameDocRegistry.MasterDocument == this.As<IGameDocument>())
            {
                // get the root of bookmarks.
                // bookmarks is a child element of gametype.
                m_bookmarkRoot = this.DomNode.GetChild(Schema.gameType.bookmarksChild);
                m_bookmarkList = new DomNodeListAdapter<Bookmark>(m_bookmarkRoot, Schema.bookmarksType.bookmarkChild);

                m_bookmarkRoot.AttributeChanged += DomNode_AttributeChanged;
                m_bookmarkRoot.ChildInserted += DomNode_ChildInserted;
                m_bookmarkRoot.ChildRemoved += DomNode_ChildRemoved;
            }
        }
コード例 #12
0
        protected override void OnNodeSet()
        {
            var gameDocRegistry = Globals.MEFContainer.GetExportedValue <GameDocumentRegistry>();

            if (gameDocRegistry.MasterDocument == null || gameDocRegistry.MasterDocument == this.As <IGameDocument>())
            {
                // get the root of bookmarks.
                // bookmarks is a child element of gametype.
                m_bookmarkRoot = this.DomNode.GetChild(Schema.gameType.bookmarksChild);
                m_bookmarkList = new DomNodeListAdapter <Bookmark>(m_bookmarkRoot, Schema.bookmarksType.bookmarkChild);

                m_bookmarkRoot.AttributeChanged += DomNode_AttributeChanged;
                m_bookmarkRoot.ChildInserted    += DomNode_ChildInserted;
                m_bookmarkRoot.ChildRemoved     += DomNode_ChildRemoved;
            }
        }
コード例 #13
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the circuit's DomNode.
        /// Raises the DomNodeAdapter NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            var documentClientInfo = DomNode.Type.GetTag <DocumentClientInfo>();

            if (documentClientInfo != null)
            {
                SetEditorFileType(documentClientInfo.FileType);
            }

            #pragma warning disable 618 //mastered sub-circuits are obsolete
            if (SubCircuitChildInfo != null)
            {
                m_subCircuits = new DomNodeListAdapter <SubCircuit>(DomNode, SubCircuitChildInfo);
            }
            #pragma warning restore 618

            base.OnNodeSet();
        }
コード例 #14
0
        protected override void OnNodeSet()
        {
            base.OnNodeSet();

            var gameDocRegistry = Globals.MEFContainer.GetExportedValue<GameDocumentRegistry>();

            if (gameDocRegistry.MasterDocument == null || gameDocRegistry.MasterDocument == this.As<IGameDocument>())
            {
                m_layerRoot = DomNode.GetChild(Schema.gameType.layersChild);
                m_layers = new DomNodeListAdapter<ILayer>(m_layerRoot, Schema.layersType.layerChild);
                
                m_layerRoot.ChildInserted += DomNode_ChildInserted;
                m_layerRoot.ChildRemoved += DomNode_ChildRemoved;
                m_layerRoot.AttributeChanged += DomNode_AttributeChanged;
                GameContext gameContext = DomNode.Cast<GameContext>();
                IValidationContext validationContext = (IValidationContext)gameContext;
                validationContext.Ended += validationContext_Ended;
                m_activeItem = m_layerRoot;                
            }
        }
コード例 #15
0
        protected override void OnNodeSet()
        {
            base.OnNodeSet();

            var gameDocRegistry = Globals.MEFContainer.GetExportedValue <GameDocumentRegistry>();

            if (gameDocRegistry.MasterDocument == null || gameDocRegistry.MasterDocument == this.As <IGameDocument>())
            {
                m_layerRoot = DomNode.GetChild(Schema.gameType.layersChild);
                m_layers    = new DomNodeListAdapter <ILayer>(m_layerRoot, Schema.layersType.layerChild);

                m_layerRoot.ChildInserted    += DomNode_ChildInserted;
                m_layerRoot.ChildRemoved     += DomNode_ChildRemoved;
                m_layerRoot.AttributeChanged += DomNode_AttributeChanged;
                GameContext        gameContext       = DomNode.Cast <GameContext>();
                IValidationContext validationContext = (IValidationContext)gameContext;
                validationContext.Ended += validationContext_Ended;
                m_activeItem             = m_layerRoot;
            }
        }
コード例 #16
0
ファイル: Circuit.cs プロジェクト: zoombapup/ATF
        /// <summary>
        /// Performs initialization when the adapter is connected to the circuit's DomNode</summary>
        protected override void OnNodeSet()
        {
            // cache these list wrapper objects
            m_elements = new DomNodeListAdapter <Element>(DomNode, ElementChildInfo);
            m_wires    = new DomNodeListAdapter <Wire>(DomNode, WireChildInfo);
            if (AnnotationChildInfo != null)
            {
                m_annotations = new DomNodeListAdapter <Annotation>(DomNode, AnnotationChildInfo);
            }

            foreach (var connection in Wires)
            {
                connection.SetPinTarget();
            }

            DomNode.AttributeChanged += DomNode_AttributeChanged;
            DomNode.ChildInserted    += DomNode_ChildInserted;
            DomNode.ChildRemoved     += DomNode_ChildRemoved;

            base.OnNodeSet();
        }
コード例 #17
0
ファイル: Fsm.cs プロジェクト: zoombapup/ATF
 /// <summary>
 /// Performs initialization when the adapter is connected to the finite state machine's DomNode</summary>
 protected override void OnNodeSet()
 {
     m_states      = new DomNodeListAdapter <State>(DomNode, Schema.fsmType.stateChild);
     m_transitions = new DomNodeListAdapter <Transition>(DomNode, Schema.fsmType.transitionChild);
     m_annotations = new DomNodeListAdapter <Annotation>(DomNode, Schema.fsmType.annotationChild);
 }