Esempio n. 1
0
        // END HERZUM SPRINT 3.0: TLAB-176

        public DefineCompositeComponentWizard(ApplicationContext context) : this()
        {
            //setup extracts selected nodes from current experiment and constructs composite component
            m_setup = new DefiningCompositeComponentSetup(context.Application.Experiment);

            // HERZUM SPRINT 3.0: TLAB-176
            if (IncludeChallenge(m_setup.CompositeComponentGraph))
            {
                ShowMessageDialog("Challenge Component Removed",
                                  "Define Composite", Gtk.ButtonsType.Ok, Gtk.MessageType.Warning);
            }
            // END HERZUM SPRINT 3.0: TLAB-176

            // HERZUM SPRINT 2.4 TLAB-157
            //create new experiment drawer with own factories

            /*
             * ExperimentDrawer drawer = new ExperimentDrawer(this.experimentcanvaswidget1,
             *                                             new NodeControlFactory(context),
             *                                             new NodeConnectionControlFactory(context));
             * //draw composite component that is being defined into canvas
             * drawer.DrawExperiment(m_setup.CompositeComponentGraph, false);
             */

            ExperimentCanvasPadFactory.CreateCompositeExperimentCanvasPad(context, this.experimentcanvaswidget1, m_setup.CompositeComponentGraph);
            // END HERZUM SPRINT 2.4 TLAB-157

            //zoom to fit moves view to display entire graph in the visible canvas
            //rather part that is not visible
            this.experimentcanvaswidget1.ZoomToFit();

            //if experiment is smaller than than the view scale it to original
            if (this.experimentcanvaswidget1.ZoomScale > 1)
            {
                this.experimentcanvaswidget1.ZoomToOriginal();
            }

            m_ioSpecSetupPage   = new IOSpecSetupPage(m_setup);
            m_configPage        = new ConfigSetupPage(m_setup);
            m_componentInfoPage = new ComponentInfoPage(m_setup, context.Application.Settings.ComponentPaths);
            m_confirmationPage  = new ConfirmationPage();

            this.mainVBox.Add(m_ioSpecSetupPage);
            this.mainVBox.Add(m_configPage);
            this.mainVBox.Add(m_componentInfoPage);
            this.mainVBox.Add(m_confirmationPage);

            m_componentInfoPage.ComponentNameChanged += delegate {
                RefreshDefineButton();
            };

            m_currentState = WizardState.IOSpec;

            DisplayCurrentPage();
        }
        public DefineCompositeComponentWizard(ApplicationContext context) : this()
        {
            //setup extracts selected nodes from current experiment and constructs composite component
            m_setup = new DefiningCompositeComponentSetup(context.Application.Experiment);

            //create new experiment drawer with own factories
            ExperimentDrawer drawer = new ExperimentDrawer(this.experimentcanvaswidget1,
                                                           new NodeControlFactory(context),
                                                           new NodeConnectionControlFactory(context));

            //draw composite component that is being defined into canvas
            drawer.DrawExperiment(m_setup.CompositeComponentGraph, false);

            //zoom to fit moves view to display entire graph in the visible canvas
            //rather part that is not visible
            this.experimentcanvaswidget1.ZoomToFit();

            //if experiment is smaller than than the view scale it to original
            if (this.experimentcanvaswidget1.ZoomScale > 1)
            {
                this.experimentcanvaswidget1.ZoomToOriginal();
            }

            m_ioSpecSetupPage   = new IOSpecSetupPage(m_setup);
            m_configPage        = new ConfigSetupPage(m_setup);
            m_componentInfoPage = new ComponentInfoPage(m_setup, context.Application.Settings.ComponentPaths);
            m_confirmationPage  = new ConfirmationPage();

            this.mainVBox.Add(m_ioSpecSetupPage);
            this.mainVBox.Add(m_configPage);
            this.mainVBox.Add(m_componentInfoPage);
            this.mainVBox.Add(m_confirmationPage);

            m_componentInfoPage.ComponentNameChanged += delegate {
                RefreshDefineButton();
            };

            m_currentState = WizardState.IOSpec;

            DisplayCurrentPage();
        }
        public DefineCompositeComponentWizard(ApplicationContext context) : this() 
        {
            //setup extracts selected nodes from current experiment and constructs composite component
            m_setup = new DefiningCompositeComponentSetup(context.Application.Experiment);
            
            //create new experiment drawer with own factories
            ExperimentDrawer drawer = new ExperimentDrawer(this.experimentcanvaswidget1,
                                                           new NodeControlFactory(context),
                                                           new NodeConnectionControlFactory(context));
            
            //draw composite component that is being defined into canvas
            drawer.DrawExperiment(m_setup.CompositeComponentGraph, false);
            
            //zoom to fit moves view to display entire graph in the visible canvas
            //rather part that is not visible
            this.experimentcanvaswidget1.ZoomToFit();
            
            //if experiment is smaller than than the view scale it to original 
            if(this.experimentcanvaswidget1.ZoomScale > 1)
            {
                this.experimentcanvaswidget1.ZoomToOriginal();
            }
            
            m_ioSpecSetupPage = new IOSpecSetupPage(m_setup);
            m_configPage = new ConfigSetupPage(m_setup);
            m_componentInfoPage = new ComponentInfoPage(m_setup, context.Application.Settings.ComponentPaths);
            m_confirmationPage = new ConfirmationPage();
            
            this.mainVBox.Add(m_ioSpecSetupPage);
            this.mainVBox.Add(m_configPage);
            this.mainVBox.Add(m_componentInfoPage);
            this.mainVBox.Add(m_confirmationPage);

            m_componentInfoPage.ComponentNameChanged += delegate {
                RefreshDefineButton();
            };

            m_currentState = WizardState.IOSpec;
            
            DisplayCurrentPage();
        }
        // END HERZUM SPRINT 3.0: TLAB-176

        public DefineCompositeComponentWizard(ApplicationContext context) : this() 
        {

            //setup extracts selected nodes from current experiment and constructs composite component
            m_setup = new DefiningCompositeComponentSetup(context.Application.Experiment);

            // HERZUM SPRINT 3.0: TLAB-176
            if (IncludeChallenge(m_setup.CompositeComponentGraph))
            {
                ShowMessageDialog("Challenge Component Removed",
                                  "Define Composite", Gtk.ButtonsType.Ok, Gtk.MessageType.Warning);
            }
            // END HERZUM SPRINT 3.0: TLAB-176

            // HERZUM SPRINT 2.4 TLAB-157
            //create new experiment drawer with own factories
            /*
            ExperimentDrawer drawer = new ExperimentDrawer(this.experimentcanvaswidget1,
                                                           new NodeControlFactory(context),
                                                           new NodeConnectionControlFactory(context));
            //draw composite component that is being defined into canvas
            drawer.DrawExperiment(m_setup.CompositeComponentGraph, false);
            */

            ExperimentCanvasPadFactory.CreateCompositeExperimentCanvasPad(context, this.experimentcanvaswidget1, m_setup.CompositeComponentGraph) ;
            // END HERZUM SPRINT 2.4 TLAB-157

            //zoom to fit moves view to display entire graph in the visible canvas
            //rather part that is not visible
            this.experimentcanvaswidget1.ZoomToFit();

            //if experiment is smaller than than the view scale it to original 
            if(this.experimentcanvaswidget1.ZoomScale > 1)
            {
                this.experimentcanvaswidget1.ZoomToOriginal();
            }
            
            m_ioSpecSetupPage = new IOSpecSetupPage(m_setup);
            m_configPage = new ConfigSetupPage(m_setup);
            m_componentInfoPage = new ComponentInfoPage(m_setup, context.Application.Settings.ComponentPaths);
            m_confirmationPage = new ConfirmationPage();
            
            this.mainVBox.Add(m_ioSpecSetupPage);
            this.mainVBox.Add(m_configPage);
            this.mainVBox.Add(m_componentInfoPage);
            this.mainVBox.Add(m_confirmationPage);

            m_componentInfoPage.ComponentNameChanged += delegate {
                RefreshDefineButton();
            };

            m_currentState = WizardState.IOSpec;
            
            DisplayCurrentPage();
        }