Ejemplo n.º 1
0
        private void addResultFile_Click(object sender, EventArgs e)
        {
            if (resultFile == null)
            {
                informatioLabel.Text = "No configuration file specified!";
                return;
            }


            // identify selected nfps
            List <NFProperty> selectedProperties = new List <NFProperty>();

            foreach (KeyValuePair <CheckBox, NFProperty> cBox in nfpSelection_resultFile)
            {
                if (cBox.Key.Checked == true)
                {
                    selectedProperties.Add(cBox.Value);
                }
            }
            if (selectedProperties.Count == 0)
            {
                informatioLabel.Text = "No non-functional property selected!";
                return;
            }

            // identify selected variability models
            List <Container> selectedVariabilityModelContainers = new List <Container>();

            foreach (int indice in defineVMforResultcheckedListBox.SelectedIndices)
            {
                selectedVariabilityModelContainers.Add(variabilityModelIndexToObject[indice]);
            }
            if (selectedVariabilityModelContainers.Count == 0)
            {
                informatioLabel.Text = "No variability model selected!";
                return;
            }

            // add result file to the information of the variability model.
            Container measurements = new ScriptGenerator.Container("measurements", resultFile);

            measurements.addAdditionalInformation(new Container("nfpsToConsider", selectedProperties));
            foreach (Container c in selectedVariabilityModelContainers)
            {
                c.addAdditionalInformation(measurements);
            }
        }
Ejemplo n.º 2
0
        private void addResultFile_Click(object sender, EventArgs e)
        {
            if (resultFile == null)
            {
                informatioLabel.Text = "No configuration file specified!";
                return;
            }

            // identify selected nfps
            List<NFProperty> selectedProperties = new List<NFProperty>();
            foreach (KeyValuePair<CheckBox, NFProperty> cBox in nfpSelection_resultFile)
            {
                if (cBox.Key.Checked == true)
                    selectedProperties.Add(cBox.Value);
            }
            if (selectedProperties.Count == 0)
            {
                informatioLabel.Text = "No non-functional property selected!";
                return;
            }

            // identify selected variability models
            List<Container> selectedVariabilityModelContainers = new List<Container>();
            foreach (int indice in defineVMforResultcheckedListBox.SelectedIndices)
            {
                selectedVariabilityModelContainers.Add(variabilityModelIndexToObject[indice]);
            }
            if (selectedVariabilityModelContainers.Count == 0)
            {
                informatioLabel.Text = "No variability model selected!";
                return;
            }

            // add result file to the information of the variability model.
            Container measurements = new ScriptGenerator.Container("measurements", resultFile);
            measurements.addAdditionalInformation(new Container("nfpsToConsider", selectedProperties));
            foreach (Container c in selectedVariabilityModelContainers)
            {
                c.addAdditionalInformation(measurements);
            }
        }