5 using System.Collections.Generic;
14 public static class FunctionsPortalCli
16 public static bool _RevisarSello(Control toControlReferencia, List<IStamp> toSellos,
ewSello toSelloRef = null,
int tnIncLeft = 0)
18 if (toControlReferencia == null)
22 Form loForm = toControlReferencia.FindForm();
25 toList = toSellos.Where(f => f._Mostrar && !
string.IsNullOrEmpty(f._Control?.Name)).ToList();
28 toSellos.Where(f => !f._Mostrar).ToList().ForEach(f => f._Visible =
false);
31 foreach (
IStamp loStampStruct
in toList)
36 if (loControl is Control && loControl != loStampStruct.
_Control)
38 loForm.Controls.Remove(loControl);
42 if (loControl == null)
44 loForm.Controls.Add(loStampStruct.
_Control);
45 _PosicionarSelloDocumento(loForm, toControlReferencia, loStampStruct.
_Control, toSelloRef, tnIncLeft);
49 loStampStruct.
_Control.BringToFront();
53 toSellos.ForEach(f => f._Mostrar =
false);
69 public static bool _PosicionarSelloDocumento(Form toForm, Control toControlReferencia,
ewSello toSello,
ewSello toSelloRef = null,
int tnIncLeft = 0)
71 if (toControlReferencia == null ||
string.IsNullOrWhiteSpace(toControlReferencia.Name))
77 Control[] loControls = toForm.Controls.Find(toControlReferencia.Name,
true);
79 if (loControls.Length > 0)
81 if (toSelloRef == null)
83 lnLeft = loControls[0].Left + Convert.ToInt32(decimal.Truncate(loControls[0].Width / 2));
84 lnTop = loControls[0].Top + Convert.ToInt32(decimal.Truncate(loControls[0].Height / 2));
86 int lnWidth = Convert.ToInt32(decimal.Truncate(toSello.Width / 2));
88 lnLeft = lnLeft - lnWidth;
90 int lnHeight = Convert.ToInt32(decimal.Truncate(toSello.Height / 2));
92 lnTop = lnTop - lnHeight;
96 lnTop = toSelloRef.Top;
97 lnLeft = toSelloRef.Left + toSelloRef.Width + 15;
110 toSello.Left = lnLeft + tnIncLeft;
120 public static void _AddSepatatorDropDownItem(ref ToolStripMenuItem toToolStripMenuItem)
123 Color loColorSeparadorMenu =
Color.FromArgb(203, 203, 201);
124 Color loColorBackSeparadorMenu =
Color.FromArgb(255, 255, 255);
125 ToolStripItem loSeparador =
new ExtendedToolStripSeparator(loColorBackSeparadorMenu, loColorSeparadorMenu)
129 toToolStripMenuItem.DropDownItems.Add(loSeparador);
Este es el espacio de nombres de su módulo. Puede encontrar más información y ayuda en el fichero rea...
Es como el tipo de entrada asientos pero por negocio, sin formulario, pq quiero que me haga las propu...
Clase base para representar un sello de los disponibles en un documento de venta (aparcado para ticke...