예제 #1
0
 private void btnCrearGrafo_Click(object sender, EventArgs e)
 {
     if (btnCrearGrafo.Text == "Nuevo grafo")
     {
         rbtnDiGrafo.Enabled = true;
         rbtnGrafoNoDirigido.Enabled = true;
         btnCrearGrafo.Text = "Crear grafo";
         rbtnDiGrafo.Checked = false;
         rbtnGrafoNoDirigido.Checked = false;
         grafo = null;
         Pizarra.Visible = false;
     }
     if (rbtnDiGrafo.Checked || rbtnGrafoNoDirigido.Checked)
     {
         rbtnDiGrafo.Enabled = false;
         rbtnGrafoNoDirigido.Enabled = false;
         btnCrearGrafo.Text = "Nuevo grafo";
         if (rbtnDiGrafo.Checked)
         {
             grafo = new CGrafo();
             NoDigrafo = false;
         }
         else
         {
             grafo = new CGrafo(true);
             NoDigrafo = true;
         }
         Pizarra.Visible = true;
     }
 }
예제 #2
0
        private Vertice ventanaVertice;//Ventana para agregar los vértices

        public Simulador()
        {
            InitializeComponent();
            grafo          = new CGrafo();
            nuevoNodo      = null;
            var_control    = 0;
            ventanaVertice = new Vertice();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
        }
예제 #3
0
        private Vertice ventanaVertice; // ventana para agregar los vértices

        #endregion Fields

        #region Constructors

        public Simulador()
        {
            InitializeComponent();
            grafo = new CGrafo();
            nuevoNodo = null;
            var_control = 0;
            ventanaVertice = new Vertice();
            ventanaArco = new Arco();

            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
        }