예제 #1
0
        private void scoreDataButton_Click(object sender, EventArgs e)
        {
            // Pass the controls for chart generation and reporting
            grader.setUIElements(form1Elements);

            // TODO: Show line invalid
            if (!grader.fileChecker())
            {
                MessageBox.Show("File not compatible!", "File not Compatible!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                // Enable Buttons
                printCurrentButton.Enabled = true;
                resetButton.Enabled        = true;

                // Get back the non-adjust scale values
                grader.gradeUserFile();

                // Get category abbreviations
                ScaleAbbreviations    abbrevStatic   = new ScaleAbbreviations();
                List <List <string> > categoryAbbrev = abbrevStatic.getCategoryAbbrev();

                // Output the scores of each category pre adjusted
                for (int x = 0; x < grader.categoryTotals.Count; x++)
                {
                    for (int y = 0; y < grader.categoryTotals[x].Count; y++)
                    {
                        this.mainOutput.Text += ("\r\n" + categoryAbbrev[x][y] + ": " + grader.categoryTotals[x][y]);
                    }
                    this.mainOutput.Text += "\r\n" + "----------";
                }

                // Calculate
                grader.finalCalc();

                // Output the calculated final scores
                for (int x = 0; x < grader.categoryTotals.Count; x++)
                {
                    for (int y = 0; y < grader.categoryTotals[x].Count; y++)
                    {
                        this.mainOutput.Text += ("\r\n" + categoryAbbrev[x][y] + ": " + grader.categoryTotals[x][y]);
                    }
                    this.mainOutput.Text += "\r\n" + "----------";
                }

                // Print out the critical output text section
                this.mainOutput.Text += grader.critOutput;
            }
        }
예제 #2
0
        public ChartGenerator(string filePath,
                              Chart chart1,
                              Chart chart2,
                              Chart chart3,
                              Chart chart4,
                              List <List <int> > finalTotals,
                              List <List <int> > nonAdjustedTotals
                              )
        {
            this.filePath = filePath;

            basicChart    = chart1;
            chartSection2 = chart2;
            chartSection3 = chart3;
            chartSection4 = chart4;

            this.finalTotals       = finalTotals;
            this.nonAdjustedTotals = nonAdjustedTotals;

            categoryAbbrev = abbrevHolder.getCategoryAbbrev();
        }