示例#1
0
        // Load the Data Table with all of the JSONManager data
        public void LoadAllResults()
        {
            string line;
            string filename;

            string[][]         arrays = { JsonManager.array100, JsonManager.array1000, JsonManager.array10000, JsonManager.array100000, JsonManager.array1000000 };
            JsonManager.Result result;

            for (int i = 0; i < arrays.Length; i++)
            {
                for (int j = 0; j < arrays[i].Length; j++)
                {
                    filename = arrays[i][j];

                    foreach (string json in JsonManager.GetNextResult(filename))
                    {
                        result = JsonManager.ParseResult(json);
                        AddResult(result);
                    }
                }
            }
        }
        // Load the Data Table with all of the JSONManager data
        public void LoadAllResults()
        {
            string line;
            string filename;

            string[][] arrays = { ExtendedJsonManager.array100,    ExtendedJsonManager.array1000,   ExtendedJsonManager.array10000,
                                  ExtendedJsonManager.array100000, ExtendedJsonManager.array500000,
                                  ExtendedJsonManager.array1000000 };
            ExtendedJsonManager.ExtendedResult result;

            foreach (string[] t in arrays)
            {
                foreach (string t1 in t)
                {
                    filename = t1;

                    foreach (string json in JsonManager.GetNextResult(filename))
                    {
                        result = ExtendedJsonManager.ParseResult(json);
                        AddResult(result);
                    }
                }
            }
        }
 // Add each result one by one
 public void AddResult(JsonManager.Result r)
 {
     object[] sr =
     {
         r.arraySize + "", r.runs + "", /*r.arraytype,*/  r.insertionSortExecutionTime + "",
         r.shellSortExecutionTime + "", r.heapSortExecutionTime + "", r.mergeSortExecutionTime + "",
         r.quickSortExecutionTime + "", r.parallelMergeSortExecutionTime + "", r.bestClass
     };
     Table.Rows.Add(sr);
 }