コード例 #1
0
        static void Main()
        {
            Console.WriteLine("Starting");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Form1 base_form = new Form1();

            // Start of the fun stuff
            DataGeneration data_gen = new DataGeneration();
            Schedule       schedule = data_gen.GenerateDataset();

            // Get ready to sort!
            schedule.CreateSortingMatrix();
            Sorter schedule_sorter = new Sorter(ref schedule);

            // Add students to requested classes
            schedule_sorter.AddStudents();

            // Print some things
            Console.WriteLine("Writing to the grid now");
            //base_form.textBoxSchedule.AppendText("Unsorted classes\n");
            //print_courses(ref base_form, ref schedule);

            // Order courses
            schedule_sorter.OrderCoursesBySize();
            base_form.textBoxSchedule.AppendText("Sorted classes\n");
            print_courses(ref base_form, ref schedule);

            // Print out student info for now
            print_student_info(ref base_form, ref schedule);

            // Create sorting matrix
            schedule_sorter.FindConflicts();

            // Print sorting matrix
            print_sorting_matrix(ref base_form, ref schedule);

            // Show the form, blocks
            Application.Run(base_form);
        }