Subo cambios en plena produccion7
This commit is contained in:
@@ -15,14 +15,53 @@ namespace compabetov2
|
||||
{
|
||||
public partial class envios : Form
|
||||
{
|
||||
|
||||
private Point lastPoint;
|
||||
private LoginModel loginPrincipal;
|
||||
public envios(LoginModel loginPrincipal)
|
||||
{
|
||||
|
||||
|
||||
InitializeComponent();
|
||||
llenarPanel();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
}
|
||||
|
||||
private void InitializePanelEnvio()
|
||||
{
|
||||
// Asegúrate de que panelEnvio ya está creado en tu formulario
|
||||
|
||||
// Habilitar eventos táctiles simulados
|
||||
panelEnvio.MouseDown += PanelEnvio_MouseDown;
|
||||
panelEnvio.MouseMove += PanelEnvio_MouseMove;
|
||||
panelEnvio.MouseUp += PanelEnvio_MouseUp;
|
||||
}
|
||||
|
||||
private void PanelEnvio_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
lastPoint = new Point(e.X, e.Y);
|
||||
panelEnvio.Capture = true;
|
||||
}
|
||||
|
||||
private void PanelEnvio_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
|
||||
panelEnvio.AutoScrollPosition = new Point(panelEnvio.AutoScrollPosition.X + deltaX, panelEnvio.AutoScrollPosition.Y - deltaY);
|
||||
|
||||
lastPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
}
|
||||
|
||||
private void PanelEnvio_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
panelEnvio.Capture = false;
|
||||
}
|
||||
|
||||
private void llenarPanel()
|
||||
{
|
||||
panelEnvio.Controls.Clear();
|
||||
|
||||
Generated
+1
@@ -185,6 +185,7 @@
|
||||
//
|
||||
// mermaPanel
|
||||
//
|
||||
this.mermaPanel.AutoScroll = true;
|
||||
this.mermaPanel.Location = new System.Drawing.Point(572, 348);
|
||||
this.mermaPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.mermaPanel.Name = "mermaPanel";
|
||||
|
||||
@@ -15,7 +15,10 @@ using System.Windows.Forms;
|
||||
namespace compabetov2
|
||||
{
|
||||
public partial class mermas : Form
|
||||
|
||||
{
|
||||
|
||||
private Point lastPoint;
|
||||
private LoginModel loginPrincipal;
|
||||
private List<Merma> mermasList;
|
||||
public mermas(LoginModel loginPrincipal)
|
||||
@@ -25,6 +28,42 @@ namespace compabetov2
|
||||
llenarPanel();
|
||||
}
|
||||
|
||||
private void InitializeMermaPanel()
|
||||
{
|
||||
// Asegúrate de que mermaPanel ya está creado en tu formulario
|
||||
|
||||
// Habilitar eventos táctiles simulados
|
||||
mermaPanel.MouseDown += MermaPanel_MouseDown;
|
||||
mermaPanel.MouseMove += MermaPanel_MouseMove;
|
||||
mermaPanel.MouseUp += MermaPanel_MouseUp;
|
||||
}
|
||||
|
||||
private void MermaPanel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
lastPoint = new Point(e.X, e.Y);
|
||||
mermaPanel.Capture = true;
|
||||
}
|
||||
|
||||
private void MermaPanel_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
|
||||
mermaPanel.AutoScrollPosition = new Point(mermaPanel.AutoScrollPosition.X + deltaX, mermaPanel.AutoScrollPosition.Y - deltaY);
|
||||
|
||||
lastPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
}
|
||||
|
||||
private void MermaPanel_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
mermaPanel.Capture = false;
|
||||
}
|
||||
|
||||
|
||||
public void llenarPanel()
|
||||
{
|
||||
mermaPanel.Controls.Clear();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user