Exemplo n.º 1
0
        private void fillLoadComboBox()
        {
            clearComboBox();

            ExperimentNode currentNode = LoopNodeControl.ExperimentNode;
            Dictionary <string, string> predeccessorsOutputsNameTypeLookup;

            // TLAB-174: we use the Owner instead of the application experiment to get only variables the scope can access
            //var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings (m_applicationContext.Application.Experiment);
            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings(m_loopControl.ExperimentNode.Owner);

            if (availableInputMappingsPerNode.TryGetValue(currentNode, out predeccessorsOutputsNameTypeLookup) == false)
            {
                predeccessorsOutputsNameTypeLookup = new Dictionary <string, string> (); //return empty - there is not path from start node to decision
            }

            String wrapper = "Load(\"";

            this.loadComboBox.AppendText(LOAD_A_VALUE);
            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys)
            {
                this.loadComboBox.AppendText(wrapper + workspaceUnitName + "\")");
            }

            setActiveComboBoxValue(loadComboBox, LOAD_A_VALUE);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Fills the items with incoming outputs from previous nodes.
        /// </summary>
        /// <param name="comboBox">The combo box.</param>
        private void FillItemsWithIncomingOutputsFromPreviousNodes(ComboBox comboBox)
        {
            comboBox.Items.Clear();
            ExperimentNodeInfo decisionNodeInfo = DataContext as ExperimentNodeInfo;
            ExperimentNode     currentNode      = decisionNodeInfo.Node;

            Dictionary <string, string> predeccessorsOutputsNameTypeLookup;

            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings(m_experiment);

            if (availableInputMappingsPerNode.TryGetValue(currentNode, out predeccessorsOutputsNameTypeLookup) == false)
            {
                predeccessorsOutputsNameTypeLookup = new Dictionary <string, string>(); //return empty - there is not path from start node to decision
            }

            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys)
            {
                comboBox.Items.Add(workspaceUnitName);
            }
        }
Exemplo n.º 3
0
        private void fillMetricVariable()
        {
            clearComboBox(metricCombobox);

            ExperimentNode currentNode = m_applicationViewModel.Experiment.StartNode as ExperimentNode;

            //ExperimentNode currentNode = DecisionControl.ExperimentNode;
            Dictionary <string, string> predeccessorsOutputsNameTypeLookup;
            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings(m_applicationViewModel.Experiment);

            if (availableInputMappingsPerNode.TryGetValue(currentNode, out predeccessorsOutputsNameTypeLookup) == false)
            {
                predeccessorsOutputsNameTypeLookup = new Dictionary <string, string> ();
            }

            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys)
            {
                this.metricCombobox.AppendText(workspaceUnitName);
            }

            // setActiveComboBoxValue (metricCombobox, SELECT_A_VALUE);
        }
Exemplo n.º 4
0
        private void fillMetricVariable (){
            clearComboBox (metricCombobox);

            ExperimentNode currentNode = m_applicationViewModel.Experiment.StartNode as ExperimentNode;

            //ExperimentNode currentNode = DecisionControl.ExperimentNode;
            Dictionary<string, string> predeccessorsOutputsNameTypeLookup;
            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings (m_applicationViewModel.Experiment);

            if (availableInputMappingsPerNode.TryGetValue (currentNode, out predeccessorsOutputsNameTypeLookup) == false) {
                predeccessorsOutputsNameTypeLookup = new Dictionary<string, string> (); 
            }

            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys) {
                this.metricCombobox.AppendText ( workspaceUnitName );
            }     

           // setActiveComboBoxValue (metricCombobox, SELECT_A_VALUE);  
        }
Exemplo n.º 5
0
        private void fillLoadComboBox ()
        {
            clearComboBox (loadComboBox1);

            ExperimentNode currentNode = DecisionControl.ExperimentNode;
            Dictionary<string, string> predeccessorsOutputsNameTypeLookup;
            
            // TLAB-174: we use the Owner instead of the application experiment to get only variables the scope can access
            //var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings (m_applicationContext.Application.Experiment);
            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings (m_decisionControl.ExperimentNode.Owner);

            if (availableInputMappingsPerNode.TryGetValue (currentNode, out predeccessorsOutputsNameTypeLookup) == false) {
                predeccessorsOutputsNameTypeLookup = new Dictionary<string, string> (); //return empty - there is not path from start node to decision
            }

            String wrapper = "Load(\"";
            this.loadComboBox1.AppendText (LOAD_A_VALUE);
            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys) {
                this.loadComboBox1.AppendText (wrapper + workspaceUnitName + "\")");
            }     

            setActiveComboBoxValue (loadComboBox1, LOAD_A_VALUE);
        }
        /// <summary>
        /// Fills the items with incoming outputs from previous nodes.
        /// </summary>
        /// <param name="comboBox">The combo box.</param>
        private void FillItemsWithIncomingOutputsFromPreviousNodes(ComboBox comboBox)
        {
            comboBox.Items.Clear();
            ExperimentNodeInfo decisionNodeInfo = DataContext as ExperimentNodeInfo;
            ExperimentNode currentNode = decisionNodeInfo.Node;

            Dictionary<string, string> predeccessorsOutputsNameTypeLookup;

            var availableInputMappingsPerNode = new TraceLab.Core.Utilities.InputMappings(m_experiment);

            if (availableInputMappingsPerNode.TryGetValue(currentNode, out predeccessorsOutputsNameTypeLookup) == false)
            {
                predeccessorsOutputsNameTypeLookup = new Dictionary<string, string>(); //return empty - there is not path from start node to decision
            }

            foreach (string workspaceUnitName in predeccessorsOutputsNameTypeLookup.Keys)
            {
                comboBox.Items.Add(workspaceUnitName);
            }

        }