Пример #1
0
        private void PostProcessLoadedData()
        {
            //For the time being we are only using Include data for this
            //Only store dictionary for it for now
            const int i = (int)CompileCategory.Include;

            //for(int i = 0; i < (int)CompileCategory.GahterCount; ++i)
            {
                CompileDataset dataset    = Datasets[i];
                List <uint>    onlyValues = new List <uint>();
                foreach (CompileValue entry in dataset.collection)
                {
                    onlyValues.Add(entry.Max);
                    dataset.dictionary.Add(entry.Name, entry);
                }
                ComputeNormalizedThresholds(dataset.normalizedThresholds, onlyValues);
            }

            //Process Totals
            Totals = new List <UnitTotal>();
            for (int k = 0; k < (int)CompileThresholds.Display; ++k)
            {
                Totals.Add(new UnitTotal((CompileCategory)k));
            }

            foreach (UnitValue unit in UnitsCollection)
            {
                for (int k = 0; k < (int)CompileThresholds.Display; ++k)
                {
                    Totals[k].Total += unit.ValuesList[k];
                }
            }
        }
Пример #2
0
 public CompileValue GetValue(CompileCategory category, int index)
 {
     if ((int)category < (int)CompileThresholds.Gather)
     {
         CompileDataset dataset = Datasets[(int)category];
         return(index >= 0 && index < dataset.collection.Count ? dataset.collection[index] : null);
     }
     return(null);
 }
Пример #3
0
 private void ClearDatasets()
 {
     for (int i = 0; i < (int)CompileThresholds.Gather; ++i)
     {
         CompileDataset dataset = Datasets[i];
         dataset.collection.Clear();
         dataset.dictionary.Clear();
         dataset.normalizedThresholds.Clear();
     }
 }
Пример #4
0
        public CompileValue GetValue(CompileCategory category, string fileName)
        {
            CompileDataset dataset = Datasets[(int)category];

            if (dataset.dictionary.ContainsKey(fileName))
            {
                return(dataset.dictionary[fileName]);
            }
            return(null);
        }
Пример #5
0
 private void ClearDatasets()
 {
     for (int i = 0; i < Enum.GetNames(typeof(CompileCategory)).Length; ++i)
     {
         CompileDataset dataset = _datasets[i];
         dataset.collection.Clear();
         dataset.dictionary.Clear();
         dataset.normalizedThresholds.Clear();
     }
 }
Пример #6
0
        private void RecomputeSeverities()
        {
            GeneralSettingsPageGrid settings = GetGeneralSettings();

            for (int i = 0; i < Enum.GetNames(typeof(CompileCategory)).Length; ++i)
            {
                CompileDataset dataset       = _datasets[(int)CompileCategory.Include];
                List <uint>    thresholdList = settings.OptionNormalizedSeverity ? dataset.normalizedThresholds : settings.GetOptionSeverities();
                foreach (CompileValue entry in dataset.collection)
                {
                    entry.Severity = ComputeSeverity(thresholdList, entry.Max);
                }
            }
        }
Пример #7
0
        private void RecomputeSeverities()
        {
            GeneralSettingsPageGrid settings = GetGeneralSettings();

            //For the time being we are only using Include data for this
            //Only compute it for include for now
            const int i = (int)CompileCategory.Include;

            //for (int i = 0; i < (int)CompileCategory.GatherCount; ++i)
            {
                CompileDataset dataset       = Datasets[i];
                List <uint>    thresholdList = settings.OptionNormalizedSeverity ? dataset.normalizedThresholds : settings.GetOptionSeverities();
                foreach (CompileValue entry in dataset.collection)
                {
                    entry.Severity = ComputeSeverity(thresholdList, entry.Max);
                }
            }
        }
Пример #8
0
        private void PostProcessLoadedData()
        {
            //TODO ~ ramonv ~ for the time being we are only using Include data for this
            //                Only store dictionary for it for now
            const int i = (int)CompileCategory.Include;

            //for(int i = 0; i < Enum.GetNames(typeof(CompileCategory)).Length; ++i)
            {
                CompileDataset dataset    = _datasets[i];
                List <uint>    onlyValues = new List <uint>();
                foreach (CompileValue entry in dataset.collection)
                {
                    onlyValues.Add(entry.Max);
                    dataset.dictionary.Add(entry.Name, entry);
                }
                ComputeNormalizedThresholds(dataset.normalizedThresholds, onlyValues);
            }
        }