示例#1
0
        private Gtk.Widget CreateInfoWidget(BasicNodeControl basicComponentControl)
        {
            //case 1: Component Panel
            ComponentControl componentControl = basicComponentControl as ComponentControl;

            if (componentControl != null)
            {
                ComponentInfoPanel panel = new ComponentInfoPanel();
                panel.Component = componentControl;
                return(panel);
            }
            else
            {
                //case 2: decision panel
                DecisionNodeControl decisionControl = basicComponentControl as DecisionNodeControl;
                if (decisionControl != null)
                {
                    DecisionInfoPanel panel = new DecisionInfoPanel(m_applicationContext);
                    panel.DecisionControl = decisionControl;
                    return(panel);
                }
            }

            //invalid
            Gtk.Label errorLabel = new Gtk.Label("Not implemented. Panels not supported for the given component control.");
            return(errorLabel);
        }
示例#2
0
        public BasicNodeControl CreateNodeControl(ExperimentNode node)
        {
            BasicNodeControl control;

            if (node is ComponentNode)
            {
                control = new ComponentControl(node, m_applicationContext);
            }
            else if (node is ExperimentStartNode)
            {
                control = new StartNodeControl(node, m_applicationContext);
            }
            else if (node is ExperimentEndNode)
            {
                control = new EndNodeControl(node, m_applicationContext);
            }
            else if (node is ExperimentDecisionNode)
            {
                control = new DecisionNodeControl(node, m_applicationContext);
            }
            else if (node is CompositeComponentNode)
            {
                control = new CompositeComponentControl(node, m_applicationContext);
            }
            else
            {
                control = new BasicNodeControl(node, m_applicationContext);
            }

            m_mapNodesToControls.Add(node, control);

            return(control);
        }
        public BasicNodeControl CreateNodeControl(ExperimentNode node) 
        {
            BasicNodeControl control;

            if (node is ComponentNode) 
            {
                control = new ComponentControl(node, m_applicationContext);
            } 
            else if (node is ExperimentStartNode) 
            {
                control = new StartNodeControl(node, m_applicationContext);
            } 
            else if (node is ExperimentEndNode) 
            { 
                control = new EndNodeControl(node, m_applicationContext);
            }
            else if (node is ExperimentDecisionNode) 
            { 
                control = new DecisionNodeControl(node, m_applicationContext);
            }
            else if (node is CompositeComponentNode)
            {
                control = new CompositeComponentControl(node, m_applicationContext);
            }
            else 
            {
                control = new BasicNodeControl(node, m_applicationContext);
            }

            m_mapNodesToControls.Add(node, control);

            return control;
        }
示例#4
0
        public BasicNodeControl CreateNodeControl(ExperimentNode node) 
        {
            BasicNodeControl control;

            if (node is ComponentNode) 
            {
                control = new ComponentControl(node, m_applicationContext);
            } 
            else if (node is ExperimentStartNode) 
            {
                control = new StartNodeControl(node, m_applicationContext);
            } 
            else if (node is ExperimentEndNode) 
            { 
                control = new EndNodeControl(node, m_applicationContext);
            }
            else if (node is ExperimentDecisionNode) 
            { 
                control = new DecisionNodeControl(node, m_applicationContext);
            }
            else if (node is ExitDecisionNode)
            {
                // HERZUM  SPRINT 0.0
                // control = null;
                // throw new NotImplementedException();
                // HERZUM SPRINT 1.1 IF
                // control = new EndNodeControl(node, m_applicationContext);
                control = new ExitDecisionControl(node, m_applicationContext);
                // END HERZUM SPRINT 1.1 IF
                // END HERZUM 
            }
            else if (node is LoopScopeNode)
            {
                // HERZUM SPRINT 1.1 LOOP
                // control = null;
                // throw new NotImplementedException();
                control = new LoopNodeControl(node, m_applicationContext);
                // END HERZUM SPRINT 1.1 LOOP
            }
            else if (node is ScopeNode)
            {
                // HERZUM  SPRINT 0.0
                //control = null;
                //throw new NotImplementedException();
                control = new ScopeNodeControl(node, m_applicationContext);
                // END HERZUM 
            }
            // HERZUM SPRINT 2.0: TLAB-65 CLASS
            else if (node is ChallengeNode)
            {
                control = new ChallengeNodeControl(node, m_applicationContext);
            }
            // END HERZUM SPRINT 2.0: TLAB-65 CLASS
            else if (node is CompositeComponentNode)
            {
                control = new CompositeComponentControl(node, m_applicationContext);
            }
            // HERZUM SPRINT 1.0
            else if (node is CommentNode)
            {
                control = new CommentNodeControl(node, m_applicationContext);
            }
            // END HERZUM SPRINT 1.0
            else 
            {
                control = new BasicNodeControl(node, m_applicationContext);
            }

            m_mapNodesToControls.Add(node, control);

            return control;
        }