예제 #1
0
        private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button.Equals(MouseButtons.Left) && (opcion == 2 || opcion == 9) && bandA)
            {
                p2 = e.Location;

                Form1_Paint(this, null);
            }

            if (e.Button.Equals(MouseButtons.Left) && opcion == 3 && bandA)
            {
                band         = false;
                bandF        = false;
                bandI        = true;
                nodoP.centro = e.Location;
                quitaPesos();
                quitaNumeric();
                quitaTexaux();//cambio

                Form1_Paint(this, null);
            }

            if (e.Button.Equals(MouseButtons.Left) && opcion == 8)
            {
                int distx, disty;

                distx = e.Location.X - p1.X;
                disty = e.Location.Y - p1.Y;
                grafo.MueveGrafo(distx, disty);
                p1 = e.Location;
                if (intercambiaColor == true)
                {
                    quitaPesos();
                }
                bandI = true;
                band  = false;
                bandF = false;
                bandA = false;

                Form1_Paint(this, null);
            }
            if (opcion == 41) // agregar Peso a Arista
            {
                // quitaPesos();
                //  quitaNumeric();
                //asignaPesos(e.Location);
                // muestraPeso();
                //bandF = false;
            }
        }