Exemple #1
0
        //capability heatmap open
        private void capabilityGapHeatmapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List<float> capAsIs = new List<float>();
            List<float> capToBe = new List<float>();
            List<float> capGap = new List<float>();
            List<float> entGap = new List<float>();
            List<string> capName = new List<string>();
            List<string> domName = new List<string>();
            List<int> capPerDom = new List<int>();
            List<bool> notAFocus = new List<bool>();
            List<int> entPerCap = new List<int>();
            List<string> capGapType = new List<string>();
            int counting = 0;

            int domCount = domains.Count;
            int capCount = capabilities.Count;

            foreach (Domain dom in domains)
            {
                counting = 0;
                foreach (Capability cap in dom.CapabilitiesOwned)
                {

                    capAsIs.Add(cap.AsIsScore);
                    capToBe.Add(cap.ToBeScore);
                    if (cap.AsIsScore == 0 && cap.ToBeScore == 0)
                        notAFocus.Add(true);
                    else
                        notAFocus.Add(false);
                    capGap.Add(cap.ToBeScore - cap.AsIsScore);
                    capName.Add(cap.CapName);

                    if (cap.GapType1 == ScoringEntity.GapType.High)
                        capGapType.Add("High");
                    else if (cap.GapType1 == ScoringEntity.GapType.Middle)
                        capGapType.Add("Middle");
                    else if (cap.GapType1 == ScoringEntity.GapType.Low)
                        capGapType.Add("Low");
                    else
                        capGapType.Add("None");
                    counting++;
                }
                capPerDom.Add(counting);
                domName.Add(dom.Name);
            }

            float gap = CalculateGap(capGap);
            float total = CalculateTotalGap(capGap, notAFocus);

            HeatMapChart chart = new HeatMapChart(domName, capName, capPerDom, capGap, gap, notAFocus, total, numberOfGap, capGapType, "Capability Gap");
            chart.Show();
        }
Exemple #2
0
        private void prioritizedCapabilityGapsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List<float> capAsIs = new List<float>();
            List<float> capToBe = new List<float>();
            List<float> capGap = new List<float>();
            List<float> entGap = new List<float>();
            List<string> capName = new List<string>();
            List<string> domName = new List<string>();
            List<int> capPerDom = new List<int>();
            List<bool> notAFocus = new List<bool>();
            List<int> entPerCap = new List<int>();
            List<string> capGapType = new List<string>();
            int counting = 0;

            int domCount = domains.Count;
            int capCount = capabilities.Count;

            foreach (Domain dom in domains)
            {
                counting = 0;
                foreach (Capability cap in dom.CapabilitiesOwned)
                {

                    capAsIs.Add(cap.AsIsScore);
                    capToBe.Add(cap.ToBeScore);
                    if (cap.AsIsScore == 0 && cap.ToBeScore == 0)
                        notAFocus.Add(true);
                    else
                        notAFocus.Add(false);
                    capGap.Add(cap.PrioritizedCapabilityGap);
                    capName.Add(cap.CapName);

                    if (cap.PrioritizedGapType1 == ScoringEntity.PrioritizedGapType.High)
                        capGapType.Add("High");
                    else if (cap.PrioritizedGapType1 == ScoringEntity.PrioritizedGapType.Middle)
                        capGapType.Add("Middle");
                    else if (cap.PrioritizedGapType1 == ScoringEntity.PrioritizedGapType.Low)
                        capGapType.Add("Low");
                    else
                        capGapType.Add("None");
                    counting++;
                }
                capPerDom.Add(counting);
                domName.Add(dom.Name);
            }

            float gap = CalculateGap(capGap);
            float total = CalculateTotalGap(capGap, notAFocus);

            HeatMapChart chart = new HeatMapChart(domName, capName, capPerDom, capGap, gap, notAFocus, total, numberOfGap, capGapType, "Prioritized Capability Gap");
            chart.Show();

            /*Bitmap bmp = new Bitmap(chart.Width, chart.Height);
            chart.DrawToBitmap(bmp, new Rectangle(Point.Empty, bmp.Size));
            bmp.Save(Directory.GetCurrentDirectory() + @"/Charts/" + "Heat Map Prioritized Capability Gap.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);*/
        }