示例#1
0
        static void Main()
        {
            // Sorting algorithms
            SortAlgorithm ms = new MergeSort();
            SortAlgorithm qs = new QuickSort();


            //SortingVisualiser visualiser = new SortingVisualiser(ap.getDataForAlgorithm().getData());
            //qs.setNumberSwapListener(visualiser);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            SortAnimatorGUI sortAnimator = new SortAnimatorGUI();

            qs.setNumberSwapListener(sortAnimator);
            sortAnimator.Show();

            GUI sortGui = new GUI(qs);

            sortGui.setProblemChangedListener(sortAnimator);

            Application.Run(sortGui);
        }
示例#2
0
        static void Main()
        {
            // Sorting algorithms
            SortAlgorithm ms = new MergeSort();
            SortAlgorithm qs = new QuickSort();

            //SortingVisualiser visualiser = new SortingVisualiser(ap.getDataForAlgorithm().getData());
            //qs.setNumberSwapListener(visualiser);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SortAnimatorGUI sortAnimator = new SortAnimatorGUI();
            qs.setNumberSwapListener(sortAnimator);
            sortAnimator.Show();

            GUI sortGui = new GUI(qs);
            sortGui.setProblemChangedListener(sortAnimator);

            Application.Run(sortGui);
        }