Subo cambios en plena produccion7

This commit is contained in:
Michael Robles
2024-02-02 20:12:42 -07:00
parent 6c102a0566
commit b109697e87
4 changed files with 121 additions and 0 deletions
+42
View File
@@ -22,6 +22,8 @@ namespace compabetov2
{
private Point lastPoint;
private List<Producto> productos;
private decimal total = 0;
private LoginModel loginPrincipal;
@@ -37,6 +39,44 @@ namespace compabetov2
this.loginPrincipal = loginPrincipal;
}
private void InitializeFlowLayout()
{
// Inicializar el flowLayoutPanel3 (asegúrate de que ya está creado en tu formulario)
// Habilitar eventos táctiles simulados
flowLayoutPanel3.MouseDown += FlowLayoutPanel3_MouseDown;
flowLayoutPanel3.MouseMove += FlowLayoutPanel3_MouseMove;
flowLayoutPanel3.MouseUp += FlowLayoutPanel3_MouseUp;
}
private void FlowLayoutPanel3_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
flowLayoutPanel3.Capture = true;
}
private void FlowLayoutPanel3_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
int deltaX = lastPoint.X - e.X;
int deltaY = lastPoint.Y - e.Y;
// Ajustar la dirección del desplazamiento
flowLayoutPanel3.AutoScrollPosition = new Point(flowLayoutPanel3.AutoScrollPosition.X + deltaX, flowLayoutPanel3.AutoScrollPosition.Y - deltaY);
lastPoint = new Point(e.X, e.Y);
}
}
private void FlowLayoutPanel3_MouseUp(object sender, MouseEventArgs e)
{
flowLayoutPanel3.Capture = false;
}
private void llenarComBox()
{
List<Empleado> empleados = service.conseguirEmpleados();
@@ -406,6 +446,8 @@ namespace compabetov2
}
private void button1_Click(object sender, EventArgs e)
{
// Cerrar el formulario de ventas