Example #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);
        }
        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;
        }
Example #3
0
        private Gtk.Widget CreateInfoWidget(BasicNodeControl basicComponentControl)
        {
            //case 1: decision panel
            //must be check first, as it inherits from ComponentControl
            DecisionNodeControl decisionControl = basicComponentControl as DecisionNodeControl;

            if (decisionControl != null)
            {
                DecisionInfoPanel panel = new DecisionInfoPanel(m_applicationContext);
                panel.DecisionControl = decisionControl;
                return(panel);
            }
            else
            {
                //case 2: Component Panel
                if (basicComponentControl is ComponentControl || basicComponentControl is CompositeComponentControl)
                {
                    ComponentInfoPanel panel = new ComponentInfoPanel();
                    panel.Component = basicComponentControl;
                    return(panel);
                }
            }

            //invalid
            Gtk.Label errorLabel = new Gtk.Label("Not implemented. Panels not supported for the given component control.");
            return(errorLabel);
        }
        private Gtk.Widget CreateInfoWidget(BasicNodeControl basicComponentControl)
        {
            //case 1: decision panel
            //must be check first, as it inherits from ComponentControl
            DecisionNodeControl decisionControl = basicComponentControl as DecisionNodeControl;
            if(decisionControl != null) 
            {
                DecisionInfoPanel panel = new DecisionInfoPanel(m_applicationContext);
                panel.DecisionControl = decisionControl;
                return panel;
            }
            else 
            {
                //case 2: Component Panel
                if(basicComponentControl is ComponentControl || basicComponentControl is CompositeComponentControl) 
                {
                    ComponentInfoPanel panel = new ComponentInfoPanel();
                    panel.Component = basicComponentControl;
                    return panel;
                }
            }

            //invalid
            Gtk.Label errorLabel = new Gtk.Label("Not implemented. Panels not supported for the given component control.");
            return errorLabel;
        }
Example #5
0
        private Gtk.Widget CreateInfoWidget(BasicNodeControl basicComponentControl)
        {
            //case 1: decision panel
            //must be check first, as it inherits from ComponentControl
            DecisionNodeControl decisionControl = basicComponentControl as DecisionNodeControl;
            // HERZUM SPRINT 1.1 LOOP
            // TO DO New LoopInfoPanel

            // HERZUM SPRINT 2.0: TLAB-65

            /*
             * ChallengeNodeControl challengeControl = basicComponentControl as ChallengeNodeControl;
             * if(challengeControl != null)
             * {
             *  AboutExperimentDialog  dialog = new AboutExperimentDialog(m_applicationContext.MainWindow.);
             *  return dialog;
             * }
             */
            // END HERZUM SPRINT 2.0: TLAB-65

            LoopNodeControl loopControl = basicComponentControl as LoopNodeControl;

            if (loopControl != null)
            {
                LoopDecisionInfoPanel panel = new LoopDecisionInfoPanel(m_applicationContext);
                panel.LoopNodeControl = loopControl;
                return(panel);
            }

            // END HERZUM SPRINT 1.1 LOOP
            if (decisionControl != null)
            {
                DecisionInfoPanel panel = new DecisionInfoPanel(m_applicationContext);
                panel.DecisionControl = decisionControl;
                return(panel);
            }
            else
            {
                // SPRINT 2: TLAB-98, TLAB-127
                //case 2: Component Panel
                if (basicComponentControl is ScopeNodeControl || basicComponentControl is CommentNodeControl)
                {
                    BaseInfoPanel panel = new BaseInfoPanel();
                    panel.Component = basicComponentControl;
                    return(panel);
                }
                // END SPRINT2: TLAB-98, TLAB-127
                //case 3: Component Panel
                if (basicComponentControl is ComponentControl || basicComponentControl is CompositeComponentControl)
                {
                    // HERZUM SPRINT 2.4: TLAB-162
                    ComponentInfoPanel panel = new ComponentInfoPanel(m_applicationContext);
                    // END HERZUM SPRINT 2.4: TLAB-162

                    panel.Component = basicComponentControl;

                    return(panel);
                }
            }

            //invalid
            Gtk.Label errorLabel = new Gtk.Label("Not implemented. Panels not supported for the given component control.");
            return(errorLabel);
        }
Example #6
0
        private Gtk.Widget CreateInfoWidget(BasicNodeControl basicComponentControl)
        {
            //case 1: decision panel
            //must be check first, as it inherits from ComponentControl
            DecisionNodeControl decisionControl = basicComponentControl as DecisionNodeControl;
            // HERZUM SPRINT 1.1 LOOP
            // TO DO New LoopInfoPanel

            // HERZUM SPRINT 2.0: TLAB-65
            /*
            ChallengeNodeControl challengeControl = basicComponentControl as ChallengeNodeControl;
            if(challengeControl != null) 
            {
                AboutExperimentDialog  dialog = new AboutExperimentDialog(m_applicationContext.MainWindow.);
                return dialog;
            }
            */
            // END HERZUM SPRINT 2.0: TLAB-65

            LoopNodeControl loopControl = basicComponentControl as LoopNodeControl;
            if(loopControl != null) 
            {
                LoopDecisionInfoPanel panel = new LoopDecisionInfoPanel(m_applicationContext);
                panel.LoopNodeControl = loopControl;
                return panel;
            } 

            // END HERZUM SPRINT 1.1 LOOP
            if(decisionControl != null) 
            {
                DecisionInfoPanel panel = new DecisionInfoPanel(m_applicationContext);
                panel.DecisionControl = decisionControl;
                return panel;
            }
            else 
            {
                // SPRINT 2: TLAB-98, TLAB-127
                //case 2: Component Panel
                if(basicComponentControl is ScopeNodeControl || basicComponentControl is CommentNodeControl) 
                {
                    BaseInfoPanel panel = new BaseInfoPanel();
                    panel.Component = basicComponentControl;
                    return panel;
                }
                // END SPRINT2: TLAB-98, TLAB-127
                //case 3: Component Panel
                if(basicComponentControl is ComponentControl || basicComponentControl is CompositeComponentControl) 
                {
                    // HERZUM SPRINT 2.4: TLAB-162
                    ComponentInfoPanel panel = new ComponentInfoPanel(m_applicationContext);
                    // END HERZUM SPRINT 2.4: TLAB-162

                    panel.Component = basicComponentControl;

                    return panel;
                }
            }

            //invalid
            Gtk.Label errorLabel = new Gtk.Label("Not implemented. Panels not supported for the given component control.");
            return errorLabel;
        }