Example #1
0
        private void escribirNuevaRaiz(int num)
        {
            Graphics g = Valores.CreateGraphics();

            g.DrawString("HEAP OPERATION: ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Black, new Point(15, 20));
            g.DrawString("DELETE ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Green, new Point(90, 50));
            g.DrawString("The new ROOT IS: ", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(10, 80));
            g.DrawString(" " + num, new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Green, new Point(200, 80));
            System.Threading.Thread.Sleep(Convert.ToInt32(500 / velocity));
        }
Example #2
0
        private void escribirNodoAIntercambiar(int num)
        {
            Graphics g = Valores.CreateGraphics();

            g.DrawString("Heap operation: ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Black, new Point(15, 20));
            g.DrawString("PUSH ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Red, new Point(110, 50));
            g.DrawString("The push is made, from up", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(10, 80));
            g.DrawString("to bottom, of the root: ", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(10, 100));
            g.DrawString(" " + num, new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Red, new Point(260, 100));
            System.Threading.Thread.Sleep(Convert.ToInt32(500 / velocity));
        }
Example #3
0
        private void escribirNodoOrdenado(int num)
        {
            Graphics g = Valores.CreateGraphics();

            g.DrawString("HEAP OPERATION: ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Black, new Point(15, 20));
            g.DrawString("DELETE ", new Font("Algerian", 16, FontStyle.Bold), System.Drawing.Brushes.Green, new Point(90, 50));
            g.DrawString("Ordered Node : ", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(10, 80));
            g.DrawString("(Current root)", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(10, 100));
            g.DrawString(" " + num, new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Green, new Point(190, 90));
            System.Threading.Thread.Sleep(Convert.ToInt32(500 / velocity));
        }
Example #4
0
        private void escribirMinHeap()
        {
            Graphics g = Valores.CreateGraphics();

            g.DrawString("MINIMUN HEAP: ", new Font("Algerian", 14, FontStyle.Bold), System.Drawing.Brushes.Black, new Point(10, 20));
            g.DrawString("an insert of the nodes, one", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(15, 60));
            g.DrawString("at a time, is made, followed", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(15, 80));
            g.DrawString("by a push, from bottom to up, ", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(15, 100));
            g.DrawString("of the inserted node, checking", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(15, 120));
            g.DrawString("if its minor than his father", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(15, 140));

            g.FillEllipse(System.Drawing.Brushes.White, 15, 190, 30, 30);
            g.DrawString("Inserted Node", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(60, 200));

            g.FillEllipse(System.Drawing.Brushes.Red, 15, 240, 30, 30);
            g.DrawString("Node about to exchange", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(60, 240));
            g.DrawString("with his root", new Font("Algerian", 12, FontStyle.Bold), System.Drawing.Brushes.Gray, new Point(60, 260));
        }
Example #5
0
        private void clearValores()
        {
            Graphics g = Valores.CreateGraphics();

            g.Clear(Color.Silver);
        }