private void AreaDraw_MouseMove(object sender, MouseEventArgs e) { switch (toolselec) { case ToolSelec.puntero: #region Selección Figura if (Cselec != null) { Cselec.Mover(e.Location.X - pos.X, e.Location.Y - pos.Y); AreaDraw.Invalidate(); pos = e.Location; objcla.puntoFinal = new Point(e.Location.X, e.Location.Y); } if (Icselect != null) { Icselect.Mover(e.Location.X - pos.X, e.Location.Y - pos.Y); AreaDraw.Invalidate(); pos = e.Location; objicla.puntoFinal = new Point(e.Location.X, e.Location.Y); } #endregion break; case ToolSelec.clase: #region Dibuja Clase if (clic) { g = AreaDraw.CreateGraphics(); objcla.puntoFinal = e.Location; g.Clear(SystemColors.ActiveCaption); objcla.MostrarClase(g, objcla.puntoInicial, objcla.puntoFinal); } #endregion break; case ToolSelec.generalizacion: #region Dibuja generalizacion if (clic) { g = AreaDraw.CreateGraphics(); objcla.puntoFinal = e.Location; g.Clear(SystemColors.ActiveCaption); objcla.MostrarClase(g, objcla.puntoInicial, objcla.puntoFinal); } #endregion break; case ToolSelec.interfaz: #region Dibuja interfaz if (clic) { g = AreaDraw.CreateGraphics(); objicla.puntoFinal = e.Location; g.Clear(SystemColors.ActiveCaption); objicla.MostrarClase(g, objicla.puntoInicial, objicla.puntoFinal); } #endregion break; } }