AddonsPropertiesObjects.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using sage.ew.ewbase;
6 using System.ComponentModel;
7 using System.Windows.Forms;
8 using System.Collections;
9 using sage.ew.objetos.Widgets;
10 using System.Data;
11 using System.Reflection;
12 using sage.addons.components;
13 using System.Xml.Serialization;
14 
15 namespace sage.addons.components
16 {
20  public enum DataTypes
21  {
25  Carácter,
29  Booleano,
33  Memo,
37  Entero,
41  Fecha,
45  Numérico
46  }
47 
51  public enum PrimaryKeys
52  {
56  No,
60  Ascendente,
65  }
66 
70  public enum WidgetTypes
71  {
75  [Description("Círculo")]
76  Círculo,
80  [Description("Etiqueta")]
81  Etiqueta,
85  [Description("Botón")]
86  Botón,
90  [Description("Texto")]
91  Texto,
95  [Description("Etiqueta Ratio financiero")]
100  [Description("Plataforma Web")]
102  }
103 
104 
108  public class WidgetTypesListConverter : TypeConverter
109  {
110  public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
111  {
112  return true; // display drop
113  }
114 
115  public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
116  {
117  return true; // drop-down vs combo
118  }
119  public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
120  {
122  // note you can also look at context etc to build list
123  return new StandardValuesCollection(loData.GetWidgetTypes());
124  }
125  }
126 
127 
128 
132  public class DataFieldProperties
133  {
134  private string nombre = "";
138  [
139  Bindable(false),
140  Category("Diseño"),
141  DefaultValue(typeof(string), ""),
142  Description("Nombre del campo."),
143  Localizable(false),
144  DisplayName("(nombre)")
145  ]
146  public string Nombre
147  {
148  get { return nombre; }
149  set { nombre = value.ToUpper(); }
150  }
151 
152  private DataTypes tipoDato = DataTypes.Carácter;
156  [
157  Bindable(false),
158  Category("Diseño"),
159  DefaultValue(typeof(DataTypes), "Carácter"),
160  Description("Tipo de datos."),
161  Localizable(false),
162  DisplayName("Tipo")
163  ]
164  public DataTypes TipoDato
165  {
166  get { return tipoDato; }
167  set
168  {
169  if (tipoDato != value)
170  {
171  tipoDato = value;
172 
173  switch (tipoDato)
174  {
175  case DataTypes.Carácter:
176  Longitud = 20;
177  precision = 0;
178  break;
179  case DataTypes.Booleano:
180  Longitud = 0;
181  precision = 0;
182  break;
183  case DataTypes.Memo:
184  Longitud = 0;
185  precision = 0;
186  break;
187  case DataTypes.Entero:
188  Longitud = 0;
189  precision = 0;
190  break;
191  case DataTypes.Fecha:
192  Longitud = 0;
193  precision = 0;
194  break;
195  case DataTypes.Numérico:
196  Longitud = 15;
197  precision = 6;
198  break;
199  default:
200  Longitud = 20;
201  precision = 0;
202  break;
203  }
204  }
205  }
206  }
207 
208  private int longitud = 0;
212  [
213  Bindable(false),
214  Category("Diseño"),
215  DefaultValue(typeof(int), "0"),
216  Description("Longitud del campo."),
217  Localizable(false),
218  DisplayName("Longitud")
219  ]
220  public int Longitud
221  {
222  get { return longitud; }
223  set { longitud = value; }
224  }
225 
226  private int precision = 0;
230  [
231  Bindable(false),
232  Category("Diseño"),
233  DefaultValue(typeof(int), "0"),
234  Description("Número de decimales para los campos numéricos."),
235  Localizable(false),
236  DisplayName("Decimales")
237  ]
238  public int Precision
239  {
240  get { return precision; }
241  set { precision = value; }
242  }
243 
244  private bool acceptNulls = false;
248  [
249  Bindable(false),
250  Category("Diseño"),
251  DefaultValue(typeof(bool), "false"),
252  Description("Permite nulos."),
253  Localizable(false),
254  DisplayName("Permite nulos")
255  ]
256  public bool AcceptNulls
257  {
258  get { return acceptNulls; }
259  set { acceptNulls = value; }
260  }
261 
262  private PrimaryKeys clavePrincipal = PrimaryKeys.No;
266  [
267  Bindable(false),
268  Category("Diseño"),
269  DefaultValue(typeof(PrimaryKeys), "No"),
270  Description("Indica si formará parte de la clave principal."),
271  Localizable(false),
272  DisplayName("Clave principal")
273  ]
274  public PrimaryKeys ClavePrincipal
275  {
276  get { return clavePrincipal; }
277  set { clavePrincipal = value; }
278  }
279 
280  private string defaultValue = "";
284  [
285  Bindable(false),
286  Category("Diseño"),
287  DefaultValue(typeof(string), ""),
288  Description("Valor por defecto del campo."),
289  Localizable(false),
290  DisplayName("Valor por defecto")
291  ]
292  public string DefaultValue
293  {
294  get { return defaultValue; }
295  set { defaultValue = value; }
296  }
297 
298  private bool debeExistir = false;
302  [
303  Bindable(false),
304  Category("Diseño"),
305  DefaultValue(typeof(bool), "false"),
306  Description("Indica si el campo debe existir al crear nuevas tablas."),
307  Localizable(false),
308  DisplayName("Debe existir"),
309  Browsable(false)
310  ]
311  public bool DebeExistir
312  {
313  get { return debeExistir; }
314  set { debeExistir = value; }
315  }
316 
317  private string campoConfig = "";
321  [
322  Bindable(false),
323  Category("Configuración"),
324  DefaultValue(typeof(string), ""),
325  Description("Indicar el correspondiente campo ampliable de Sage50."),
326  Localizable(false),
327  DisplayName("Campo ampliable"),
328  TypeConverter(typeof(CamposConfig))
329  ]
330  public string CampoConfig
331  {
332  get { return campoConfig; }
333  set
334  {
335  campoConfig = value;
336 
337  // Buscar la longitud del campo ampliable
338  Longitud = FuncsDataBase.GetLenCampoConfig(campoConfig);
339  }
340  }
341 
342  private string descripcion = "";
346  [
347  Bindable(false),
348  Category("Diseño"),
349  DefaultValue(typeof(string), ""),
350  Description("Descripción del campo."),
351  Localizable(false),
352  DisplayName("Descripción")
353  ]
354  public string Descripcion
355  {
356  get { return descripcion; }
357  set { descripcion = value; }
358  }
359 
363  public class CamposConfig : sage.ew.objetos.Widgets.cmb_List
364  {
371  public override List<string> _CargarDatos(ITypeDescriptorContext context)
372  {
373  List<string> configList = new List<string>();
374  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
375  {
376  try
377  {
378  if (FuncsDataBase.ConfigTable != null && FuncsDataBase.ConfigTable.Rows.Count > 0)
379  {
380  foreach (DataRow filtro in FuncsDataBase.ConfigTable.Rows)
381  {
382  configList.Add(filtro["clave"].ToString().Trim());
383  }
384  }
385  else
386  {
387  configList = new List<string>();
388  }
389  }
390  catch (Exception)
391  {
392  configList = new List<string>();
393  }
394  }
395 
396  return configList;
397  }
398  }
399 
400  }
401 
402 
406  public class DataWidgetProperties
407  {
408  private Dictionary<string, string> dicWidgetTypes = new Dictionary<string, string>();
409 
414  {
415  //dicWidgetTypes.Add("Círculo", "Círculo");
416  //dicWidgetTypes.Add("Etiqueta", "Etiqueta");
417  //dicWidgetTypes.Add("Botón", "Botón");
418  //dicWidgetTypes.Add("Texto", "Texto");
419  //dicWidgetTypes.Add("EtiquetaRatio", "Etiqueta Ratio financiero");
420  LoadDictionaryTipoWidgets();
421  }
422 
423 
424  private string nombre = "";
428  [
429  Bindable(false),
430  Category("Diseño"),
431  DefaultValue(typeof(string), ""),
432  Description("Nombre del widget."),
433  Localizable(false),
434  DisplayName("(nombre)"),
435  ReadOnly(false)
436  ]
437  public string Nombre
438  {
439  get {
440  ChangeReadOnlyProperty(this, "Nombre", this.existe);
441  return nombre;
442  }
443  set { nombre = value; }
444  }
445 
446  private string titulo = "";
450  [
451  Bindable(false),
452  Category("Apariencia"),
453  DefaultValue(typeof(string), ""),
454  Description("Título del widget."),
455  Localizable(false),
456  DisplayName("Título"),
457  ReadOnly(false)
458  ]
459  public string Titulo
460  {
461  get { return titulo; }
462  set { titulo = value; }
463  }
464 
465  private string descripcion = "";
469  [
470  Bindable(false),
471  Category("Apariencia"),
472  DefaultValue(typeof(string), ""),
473  Description("Descripción del widget."),
474  Localizable(false),
475  DisplayName("Descripción"),
476  ReadOnly(false)
477 
478  ]
479  public string Descripcion
480  {
481  get { return descripcion; }
482  set { descripcion = value; }
483  }
484 
485  private string tipoWidget = "Texto";
489  [
490  Bindable(false),
491  Category("Diseño"),
492  TypeConverter(typeof(WidgetTypesListConverter)),
493  Description("Tipo de widget."),
494  Localizable(false),
495  DisplayName("Tipo"),
496  ReadOnly(false)
497  ]
498  public string TipoDato
499  {
500  get {
501  ChangeReadOnlyProperty(this, "TipoDato", this.existe);
502  return tipoWidget;
503  }
504  set {
505  tipoWidget = value;
506  tipodatokey = GetWidgetTypesKey(tipoWidget);
507  WidgetTypes loTypoWidget = GetWidgetTypesKeyEnum(tipoWidget);
508 
509  switch (loTypoWidget)
510  {
511  case WidgetTypes.Círculo:
512  Plantilla = Resources.WidgetCirculo;
513  PlantillaDesigner = Resources.WidgetCirculo_Designer;
514  break;
515  case WidgetTypes.Etiqueta:
516  Plantilla = Resources.WidgetEtiqueta;
517  PlantillaDesigner = Resources.WidgetEtiqueta_Designer;
518  break;
519  case WidgetTypes.Botón:
520  Plantilla = Resources.WidgetBoton;
521  PlantillaDesigner = "";
522  break;
523  case WidgetTypes.Texto:
524  Plantilla = Resources.WidgetTexto;
525  PlantillaDesigner = "";
526  break;
527  case WidgetTypes.EtiquetaRatio:
528  Plantilla = Resources.WidgetContabilidadRatio;
529  PlantillaDesigner = Resources.WidgetContabilidadRatio_Designer;
530  break;
531  case WidgetTypes.PlataformaWeb:
532  Plantilla = Resources.WidgetPlataformaWeb;
533  PlantillaDesigner = "";
534  break;
535  default:
536  Plantilla = "";
537  PlantillaDesigner = "";
538  break;
539  }
540  }
541 
542  }
543 
544 
545  private bool existe = false;
549  [
550  Bindable(false),
551  Category("Apariencia"),
552  DefaultValue(typeof(bool), "false"),
553  Description("Existe widget."),
554  Localizable(false),
555  DisplayName("Existe"),
556  Browsable(false),
557  ReadOnly(false)
558  ]
559  public bool Existe
560  {
561  get { return existe; }
562  set {
563  ChangeReadOnlyProperty(this, "Nombre", value);
564  ChangeReadOnlyProperty(this, "TipoDato", value);
565  existe = value;
566  }
567  }
568 
569 
570  private string plantilla = "";
574  [
575  Bindable(false),
576  Category("Apariencia"),
577  DefaultValue(typeof(string), ""),
578  Description("Plantilla."),
579  Localizable(false),
580  DisplayName("Plantilla"),
581  Browsable(false),
582  ReadOnly(false)
583  ]
584  public string Plantilla
585  {
586  get { return plantilla; }
587  set { plantilla = value; }
588  }
589 
590  private string plantillaDesigner = "";
594  [
595  Bindable(false),
596  Category("Apariencia"),
597  DefaultValue(typeof(string), ""),
598  Description("Plantilla Designer."),
599  Localizable(false),
600  DisplayName("Plantilla Designer"),
601  Browsable(false),
602  ReadOnly(false)
603  ]
604  public string PlantillaDesigner
605  {
606  get { return plantillaDesigner; }
607  set { plantillaDesigner = value; }
608  }
609 
610  private string tipodatokey = "";
614  [
615  Bindable(false),
616  Category("Apariencia"),
617  DefaultValue(typeof(string), ""),
618  Description("Tipo dato clave."),
619  Localizable(false),
620  DisplayName("Tipo dato clave"),
621  Browsable(false),
622  ReadOnly(false)
623  ]
624  public string TipoDatoKey
625  {
626  get { return tipodatokey; }
627  set {
628  if (tipodatokey != value)
629  {
630  tipodatokey = value;
631  if (dicWidgetTypes.ContainsKey(tipodatokey))
632  TipoDato = dicWidgetTypes[tipodatokey];
633  }
634  }
635  }
636 
637 
638 
647  private void ChangeReadOnlyProperty(object toObj, string tcField, bool tlReadOnly)
648  {
649  PropertyDescriptor descriptor = TypeDescriptor.GetProperties(toObj.GetType())[tcField];
650  ReadOnlyAttribute attrib = (ReadOnlyAttribute)descriptor.Attributes[typeof(ReadOnlyAttribute)];
651  FieldInfo loField = attrib.GetType().GetField("isReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
652  loField.SetValue(attrib, tlReadOnly);
653  }
654 
655  public string[] GetWidgetTypes()
656  {
657  int nTipos = dicWidgetTypes.Count;
658  string [] Widgets = new string[nTipos];
659 
660  int n1 = 0;
661  foreach (KeyValuePair<string, string> entry in dicWidgetTypes)
662  {
663  Widgets[n1] = entry.Value;
664  ++n1;
665  }
666 
667  return Widgets;
668  }
669 
670  public string GetWidgetTypesKey(string tcValue)
671  {
672  string lcKey = "";
673  foreach (KeyValuePair<string, string> entry in dicWidgetTypes)
674  {
675  if (entry.Value == tcValue)
676  {
677  lcKey = entry.Key;
678  break;
679  }
680  }
681 
682  return lcKey;
683  }
684 
690  public WidgetTypes GetWidgetTypesKeyEnum(string tcValue)
691  {
692  WidgetTypes loTypeReturn = WidgetTypes.Botón;
693  foreach (WidgetTypes loType in Enum.GetValues(typeof(WidgetTypes)))
694  {
695  string lcDesc = GetEnumDescription(loType);
696  if (lcDesc == tcValue)
697  {
698  loTypeReturn = loType;
699  break;
700  }
701  }
702 
703  return loTypeReturn;
704  }
705 
706 
710  private void LoadDictionaryTipoWidgets()
711  {
712  dicWidgetTypes = new Dictionary<string, string>();
713  foreach (WidgetTypes loType in Enum.GetValues(typeof(WidgetTypes)))
714  dicWidgetTypes.Add(loType.ToString(), GetEnumDescription(loType));
715  }
716 
722  private string GetEnumDescription(Enum value)
723  {
724  FieldInfo fi = value.GetType().GetField(value.ToString());
725 
726  DescriptionAttribute[] attributes = fi.GetCustomAttributes(typeof(DescriptionAttribute), false) as DescriptionAttribute[];
727 
728  if (attributes != null && attributes.Any())
729  {
730  return attributes.First().Description;
731  }
732 
733  return value.ToString();
734  }
735 
736 
737 
738  }
739 
740 
744  public class ewCampoTRelAddons : ew.ewbase.ewCampoTRel
745  {
746  private string _nombre = "";
750  [
751  Bindable(false),
752  Category("Diseño"),
753  DefaultValue(typeof(string), ""),
754  Description("Nombre del campo."),
755  Localizable(false),
756  DisplayName("(nombre)"),
757  Browsable(true)
758  ]
759  public new string _Nombre
760  {
761  get { return _nombre; }
762  set
763  {
764  string oldname = _nombre;
765  _nombre = value;
766 
767  if (Nombre_Changed != null)
768  Nombre_Changed(this, value, oldname);
769  }
770  }
771 
772  private bool esClave = false;
776  [
777  Bindable(false),
778  Category("Claves"),
779  DefaultValue(typeof(bool), "false"),
780  Description("Indica si el campo es parte de la clave principal de la tabla."),
781  Localizable(false),
782  DisplayName("Es clave"),
783  Browsable(true)
784  ]
785  public new bool EsClave
786  {
787  get { return esClave; }
788  set { esClave = value; }
789  }
790 
791  private bool esFiltro = false;
795  [
796  Bindable(false),
797  Category("Claves"),
798  DefaultValue(typeof(bool), "false"),
799  Description("Indica si el campo actuará de filtro para recuperar los datos de la tabla."),
800  Localizable(false),
801  DisplayName("Es filtro"),
802  Browsable(true)
803  ]
804  public new bool EsFiltro
805  {
806  get { return esFiltro; }
807  set { esFiltro = value; }
808  }
809 
810  private bool esCampoLinea = false;
814  [
815  Bindable(false),
816  Category("Claves"),
817  DefaultValue(typeof(bool), "false"),
818  Description("Indica si el campo es del tipo línea."),
819  Localizable(false),
820  DisplayName("Es campo línea"),
821  Browsable(true)
822  ]
823  public new bool EsCampoLinea
824  {
825  get { return esCampoLinea; }
826  set { esCampoLinea = value; }
827  }
828 
829  private bool campoAgregado = false;
833  [
834  Bindable(false),
835  Category("Claves"),
836  DefaultValue(typeof(bool), "false"),
837  Description("Indica si es un campo agregado."),
838  Localizable(false),
839  DisplayName("Es campo línea"),
840  Browsable(false)
841  ]
842  public new bool CampoAgregado
843  {
844  get { return campoAgregado; }
845  set { campoAgregado = value; }
846  }
847 
848  internal static string BaseDatosList = "";
849  internal static string BaseDatosLogicaList = "";
850  private string _validar_Dato_BaseDatos = "";
854  [
855  Bindable(false),
856  Category("Enlace"),
857  DefaultValue(typeof(string), ""),
858  Description("Base de datos donde se validará si el dato existe."),
859  Localizable(false),
860  DisplayName("Base datos validar"),
861  TypeConverter(typeof(DataBasesList))
862  ]
863  public new string _Validar_Dato_BaseDatos
864  {
865  get { return _validar_Dato_BaseDatos; }
866  set
867  {
868  if (_validar_Dato_BaseDatos == value)
869  return;
870 
871  _validar_Dato_BaseDatos = value;
872 
873  BaseDatosLogicaList = value;
874  BaseDatosList = sage.ew.db.DB._oAliasDB[value];
875 
876  if (!string.IsNullOrWhiteSpace(BaseDatosList))
877  {
878  BaseDatosList = BaseDatosList.Replace("[", "");
879  BaseDatosList = BaseDatosList.Replace("].dbo.", "");
880  }
881  else
882  {
883  BaseDatosList = value;
884  }
885 
886  _Validar_Dato_Tabla = "";
887  }
888  }
889 
890  internal static string TablaList = "";
891  private string _validar_Dato_Tabla = "";
895  [
896  Bindable(false),
897  Category("Enlace"),
898  DefaultValue(typeof(string), ""),
899  Description("Tabla donde se validará si el dato existe."),
900  Localizable(false),
901  DisplayName("Tabla validar"),
902  TypeConverter(typeof(TablesList))
903  ]
904  public new string _Validar_Dato_Tabla
905  {
906  get { return _validar_Dato_Tabla; }
907  set
908  {
909  if (_validar_Dato_Tabla == value)
910  return;
911 
912  _validar_Dato_Tabla = value;
913  TablaList = value;
914 
915  _Validar_Dato_Clave = "";
916  _Validar_Dato_Campos = "";
917  }
918  }
919 
920  private string _validar_Dato_Clave = "";
924  [
925  Bindable(false),
926  Category("Enlace"),
927  DefaultValue(typeof(string), ""),
928  Description("Clave por la cual se buscará el valor a la tabla de validación."),
929  Localizable(false),
930  DisplayName("Clave validar"),
931  TypeConverter(typeof(FieldsList))
932  ]
933  public new string _Validar_Dato_Clave
934  {
935  get { return _validar_Dato_Clave; }
936  set { _validar_Dato_Clave = value; }
937  }
938 
939  private string _validar_Dato_Campos = "";
943  [
944  Bindable(false),
945  Category("Enlace"),
946  DefaultValue(typeof(string), ""),
947  Description("Campos que se recuperarán en la consulta de validación."),
948  Localizable(false),
949  DisplayName("Campos recuperar"),
950  TypeConverter(typeof(FieldsList))
951  ]
952  public new string _Validar_Dato_Campos
953  {
954  get { return _validar_Dato_Campos; }
955  set { _validar_Dato_Campos = value; }
956  }
957 
958  internal static string CampoList = "";
959  private string _campoTabla = "";
963  [
964  Bindable(false),
965  Category("Enlace"),
966  DefaultValue(typeof(string), ""),
967  Description("Valor de la tabla actual que se comparará con la clave de la tabla de validación."),
968  Localizable(false),
969  DisplayName("Campo"),
970  TypeConverter(typeof(CamposList))
971  ]
972  public new string _CampoTabla
973  {
974  get { return _campoTabla; }
975  set
976  {
977  if (_campoTabla == value)
978  return;
979 
980  _campoTabla = value;
981  CampoList = value;
982  }
983  }
984 
985  private string _validar_Dato_CampoTRel_Asignar = "";
989  [
990  Bindable(false),
991  Category("Enlace"),
992  DefaultValue(typeof(string), ""),
993  Description("Destino de los valores recuperados en la consulta de validación."),
994  Localizable(false),
995  DisplayName("Campos asignar"),
996  TypeConverter(typeof(CamposList))
997  ]
998  public new string _Validar_Dato_CampoTRel_Asignar
999  {
1000  get { return _validar_Dato_CampoTRel_Asignar; }
1001  set { _validar_Dato_CampoTRel_Asignar = value; }
1002  }
1003 
1004  private ewMascara _mascara;
1008  [
1009  Bindable(false),
1010  Category("Diseño"),
1011  DefaultValue(typeof(ewMascara), null),
1012  Description("Máscara para columnas numéricas."),
1013  Localizable(false),
1014  DisplayName("Máscara números"),
1015  Browsable(false)
1016  ]
1017  public ewMascara _Mascara
1018  {
1019  get { return _mascara; }
1020  set { _mascara = value; }
1021  }
1022 
1023  private int numeroDecimales = 0;
1027  [
1028  Bindable(false),
1029  Category("Diseño"),
1030  DefaultValue(typeof(int), "0"),
1031  Description("Número de decimales para columnas numéricas."),
1032  Localizable(false),
1033  DisplayName("Número de decimales")
1034  ]
1035  public int NumeroDecimales
1036  {
1037  get { return numeroDecimales; }
1038  set { numeroDecimales = value; }
1039  }
1040 
1041  private int longitud = 0;
1045  [
1046  Bindable(false),
1047  Category("Diseño"),
1048  DefaultValue(typeof(int), "0"),
1049  Description("Longitud del campo."),
1050  Localizable(false),
1051  DisplayName("Longitud")
1052  ]
1053  public int Longitud
1054  {
1055  get { return longitud; }
1056  set { longitud = value; }
1057  }
1058 
1059  private bool debeExistir = false;
1063  [
1064  Bindable(false),
1065  Category("Diseño"),
1066  DefaultValue(typeof(bool), "false"),
1067  Description("Indica si el campo debe existir al crear nuevas tablas."),
1068  Localizable(false),
1069  DisplayName("Debe existir"),
1070  Browsable(false)
1071  ]
1072  public bool DebeExistir
1073  {
1074  get { return debeExistir; }
1075  set { debeExistir = value; }
1076  }
1077 
1081  public event Nombre_Change_Handler Nombre_Changed;
1082 
1086  public delegate void Nombre_Change_Handler(ewCampoTRelAddons sender, string newname, string oldname);
1087 
1092  public void SetObjectType(string dataType)
1093  {
1094  if (dataType == "char")
1095  _TipoColumna = gridColumnsTypes.Texto;
1096 
1097  if (dataType == "bit")
1098  _TipoColumna = gridColumnsTypes.Lógico;
1099 
1100  if (dataType == "text")
1101  _TipoColumna = gridColumnsTypes.Texto;
1102 
1103  if (dataType == "int")
1104  _TipoColumna = gridColumnsTypes.Entero;
1105 
1106  if (dataType == "date" || dataType == "datetime")
1107  _TipoColumna = gridColumnsTypes.Fecha;
1108 
1109  if (dataType == "numeric" || dataType == "decimal")
1110  _TipoColumna = gridColumnsTypes.Número;
1111  }
1112 
1116  public class DataBasesList : sage.ew.objetos.Widgets.cmb_List
1117  {
1124  public override List<string> _CargarDatos(ITypeDescriptorContext context)
1125  {
1126  List<string> databasesList = new List<string>();
1127  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
1128  {
1129  try
1130  {
1131  // Tomamos las bases de datos cargadas en la DB que son las que se pueden utilizar
1132  databasesList = sage.ew.db.DB._oAliasDB.Keys.ToList();
1133 
1134  // Filtrar las bases de datos que no hay que mostrar
1135  for (int i = databasesList.Count - 1; i >= 0; i--)
1136  {
1137  if (databasesList[i].Length > 4 && databasesList[i].Substring(0, 4) == "COMU" && databasesList[i] != "COMUNES")
1138  {
1139  databasesList.RemoveAt(i);
1140  }
1141 
1142  if (databasesList[i] == "EUROWINSYS")
1143  {
1144  databasesList.RemoveAt(i);
1145  }
1146 
1147  if (databasesList[i].All(char.IsDigit))
1148  {
1149  databasesList.RemoveAt(i);
1150  }
1151 
1152  }
1153  }
1154  catch (Exception)
1155  {
1156  databasesList = new List<string>();
1157  }
1158  }
1159  return databasesList;
1160  }
1161  }
1162 
1166  public class TablesList : sage.ew.objetos.Widgets.cmb_List
1167  {
1174  public override List<string> _CargarDatos(ITypeDescriptorContext context)
1175  {
1176  List<string> tablesList = new List<string>();
1177  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
1178  {
1179  try
1180  {
1181  DataTable tablesBD = sage.ew.db.DB._DBsInformationSchema(BaseDatosList)._INFORMATION_SCHEMA_TABLES;
1182  DataView tablesDBView = tablesBD.DefaultView;
1183  tablesDBView.Sort = "TABLE_NAME";
1184 
1185  foreach (DataRowView table in tablesDBView)
1186  {
1187  // TODO: Filtrar taules de sistema
1188  tablesList.Add(table["TABLE_NAME"].ToString());
1189  }
1190  }
1191  catch (Exception)
1192  {
1193  tablesList = new List<string>();
1194  }
1195  }
1196 
1197  return tablesList;
1198  }
1199  }
1200 
1204  public class FieldsList : sage.ew.objetos.Widgets.cmb_List
1205  {
1212  public override List<string> _CargarDatos(ITypeDescriptorContext context)
1213  {
1214  List<string> fieldsList = new List<string>();
1215  DataTable fieldsBD = new DataTable();
1216 
1217  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
1218  {
1219  try
1220  {
1221  // Campos de la tabla seleccionada
1222  fieldsBD = sage.ew.db.DB._TablesInformationSchema(BaseDatosLogicaList, TablaList)._INFORMATION_SCHEMA;
1223  DataView fieldsBDView = fieldsBD.DefaultView;
1224  fieldsBDView.Sort = "column_name";
1225 
1226  foreach (DataRowView field in fieldsBDView)
1227  {
1228  fieldsList.Add(field["column_name"].ToString());
1229  }
1230  }
1231  catch (Exception)
1232  {
1233  fieldsList = new List<string>();
1234  }
1235  }
1236 
1237  return fieldsList;
1238  }
1239  }
1240 
1244  public class CamposList : sage.ew.objetos.Widgets.cmb_List
1245  {
1252  public override List<string> _CargarDatos(ITypeDescriptorContext context)
1253  {
1254  List<string> tablesList = new List<string>();
1255  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
1256  {
1257  try
1258  {
1259  // Campos de la tabla actual incluidos en el asistente
1260  foreach (dynamic objectProperties in AddonsExecute.FuncsSourceForProperties.ClassMod.Campos)
1261  {
1262  if (objectProperties is ewCampoTRelAddons)
1263  {
1264  tablesList.Add(((ewCampoTRelAddons)objectProperties)._Nombre);
1265  }
1266  }
1267  }
1268  catch (Exception)
1269  {
1270  tablesList = new List<string>();
1271  }
1272  }
1273  return tablesList;
1274  }
1275  }
1276  }
1277 
1281  public enum ObjectsManteTypes
1282  {
1286  TextBox,
1290  NumericUpDown,
1294  CheckBox,
1298  TxtCodLabel,
1303  }
1304 
1308  public class ManteProperties
1309  {
1310  private string nombre = "";
1314  [
1315  Bindable(false),
1316  Category("Diseño"),
1317  DefaultValue(typeof(string), ""),
1318  Description("Nombre del mantenimiento."),
1319  Localizable(false),
1320  DisplayName("(nombre)"),
1321  Browsable(false)
1322  ]
1323  public string Nombre
1324  {
1325  get { return nombre; }
1326  set { nombre = value; }
1327  }
1328 
1329  private string titulo = "";
1333  [
1334  Bindable(false),
1335  Category("Diseño"),
1336  DefaultValue(typeof(string), ""),
1337  Description("Título del formulario."),
1338  Localizable(false),
1339  DisplayName("Título"),
1340  Browsable(true)
1341  ]
1342  public string Titulo
1343  {
1344  get { return titulo; }
1345  set { titulo = value; }
1346  }
1347 
1348  private string textomenu = "";
1352  [
1353  Bindable(false),
1354  Category("Diseño"),
1355  DefaultValue(typeof(string), ""),
1356  Description("Texto que se mostrará en la opción de menú."),
1357  Localizable(false),
1358  DisplayName("Texto menú"),
1359  Browsable(true)
1360  ]
1361  public string TextoMenu
1362  {
1363  get { return textomenu; }
1364  set { textomenu = value; }
1365  }
1366 
1367  private int numtabs = 1;
1371  [
1372  Bindable(false),
1373  Category("Diseño"),
1374  DefaultValue(typeof(int), "1"),
1375  Description("Número de páginas donde se colocará el control."),
1376  Localizable(false),
1377  DisplayName("Páginas"),
1378  Browsable(true)
1379  ]
1380  public int NumTabs
1381  {
1382  get { return numtabs; }
1383  set
1384  {
1385  if (value == null || value == 0)
1386  value = 1;
1387 
1388  numtabs = value;
1389  }
1390  }
1391 
1392  private bool addCeros = true;
1396  [
1397  Bindable(false),
1398  Category("Diseño"),
1399  DefaultValue(typeof(bool), "true"),
1400  Description("Activado, se añadirán ceros a la izquierda del código hasta cumplimentar su longitud."),
1401  Localizable(false),
1402  DisplayName("Añadir ceros"),
1403  Browsable(true)
1404  ]
1405  public bool AddCeros
1406  {
1407  get { return addCeros; }
1408  set
1409  {
1410  addCeros = value;
1411  }
1412  }
1413 
1414  //private PaginasCollection paginas = new PaginasCollection();
1418  //[
1419  // Bindable(false),
1420  // Category("Diseño"),
1421  // DefaultValue(typeof(PaginasCollection), null),
1422  // Description("Páginas del mantenimiento."),
1423  // Localizable(false),
1424  // DisplayName("Páginas")
1425  //]
1427  //public PaginasCollection Paginas
1428  //{
1429  // get { return paginas; }
1430  //}
1431 
1435  //public ManteProperties()
1436  //{
1437  //paginas.AddPagina += new PaginasCollection.AddPagina_Handler(paginas_AddPagina);
1438  //}
1439 
1440  //private void paginas_AddPagina(Pagina sender)
1441  //{
1442  // if (AddPagina != null)
1443  // AddPagina(sender);
1444  //}
1445 
1449  //public event AddPagina_Handler AddPagina;
1450 
1454  //public delegate void AddPagina_Handler(Pagina sender);
1455  }
1456 
1460  public class ModManteProperties
1461  {
1462  private string nombre = "";
1466  [
1467  Bindable(false),
1468  Category("Diseño"),
1469  DefaultValue(typeof(string), ""),
1470  Description("Nombre del mantenimiento."),
1471  Localizable(false),
1472  DisplayName("(nombre)"),
1473  Browsable(false)
1474  ]
1475  public string Nombre
1476  {
1477  get { return nombre; }
1478  set { nombre = value; }
1479  }
1480 
1481  private string nombretabla = "";
1485  [
1486  Bindable(false),
1487  Category("Diseño"),
1488  DefaultValue(typeof(string), ""),
1489  Description("Nombre de la tabla."),
1490  Localizable(false),
1491  DisplayName("(nombre tabla)"),
1492  Browsable(false)
1493  ]
1494  public string NombreTabla
1495  {
1496  get { return nombretabla; }
1497  set
1498  {
1499  nombretabla = value;
1500 
1501  NombreTabla_Changed?.Invoke(this, value);
1502  }
1503  }
1504 
1505  private string titulo = "";
1509  [
1510  Bindable(false),
1511  Category("Diseño"),
1512  DefaultValue(typeof(string), ""),
1513  Description("Título del formulario."),
1514  Localizable(false),
1515  DisplayName("Título"),
1516  Browsable(false)
1517  ]
1518  public string Titulo
1519  {
1520  get { return titulo; }
1521  set { titulo = value; }
1522  }
1523 
1524  private string textomenu = "";
1528  [
1529  Bindable(false),
1530  Category("Diseño"),
1531  DefaultValue(typeof(string), ""),
1532  Description("Texto que se mostrará en la opción de menú."),
1533  Localizable(false),
1534  DisplayName("Texto menú"),
1535  Browsable(false)
1536  ]
1537  public string TextoMenu
1538  {
1539  get { return textomenu; }
1540  set { textomenu = value; }
1541  }
1542 
1543  private int numtabs = 1;
1547  [
1548  Bindable(false),
1549  Category("Diseño"),
1550  DefaultValue(typeof(int), "1"),
1551  Description("Número de páginas donde se colocará el control."),
1552  Localizable(false),
1553  DisplayName("Páginas"),
1554  Browsable(false)
1555  ]
1556  public int NumTabs
1557  {
1558  get { return numtabs; }
1559  set
1560  {
1561  if (value == null || value == 0)
1562  value = 1;
1563 
1564  numtabs = value;
1565  }
1566  }
1567 
1568  private bool addCeros = true;
1572  [
1573  Bindable(false),
1574  Category("Diseño"),
1575  DefaultValue(typeof(bool), "true"),
1576  Description("Activado, se añadirán ceros a la izquierda del código hasta cumplimentar su longitud."),
1577  Localizable(false),
1578  DisplayName("Añadir ceros"),
1579  Browsable(false)
1580  ]
1581  public bool AddCeros
1582  {
1583  get { return addCeros; }
1584  set
1585  {
1586  addCeros = value;
1587  }
1588  }
1589 
1593  public event NombreTabla_Change_Handler NombreTabla_Changed;
1594 
1598  public delegate void NombreTabla_Change_Handler(ModManteProperties sender, string nombreTabla);
1599  }
1600 
1604  public class ToolStripTextBoxAddon : ToolStripTextBox
1605  {
1606 
1607  private int position = -1;
1611  [
1612  Bindable(false),
1613  Category("Diseño"),
1614  DefaultValue(typeof(int), "-1"),
1615  Description("Posición del botón dentro del ToolStrip."),
1616  Localizable(false),
1617  DisplayName("Posición"),
1618  Browsable(true)
1619  ]
1620  public int Position
1621  {
1622  get { return position; }
1623  set
1624  {
1625  position = value;
1626  }
1627  }
1628 
1629  [
1630  Browsable(false)
1631  ]
1632  public override System.Drawing.Size Size
1633  {
1634  get
1635  {
1636  return base.Size;
1637  }
1638  set
1639  {
1640  base.Size = value;
1641  }
1642  }
1643  }
1644 
1648  public class ToolStripSplitButtonAddon : ToolStripSplitButton
1649  {
1650 
1651  private int position = -1;
1655  [
1656  Bindable(false),
1657  Category("Diseño"),
1658  DefaultValue(typeof(int), "-1"),
1659  Description("Posición del botón dentro del ToolStrip."),
1660  Localizable(false),
1661  DisplayName("Posición"),
1662  Browsable(true)
1663  ]
1664  public int Position
1665  {
1666  get { return position; }
1667  set
1668  {
1669  position = value;
1670  }
1671  }
1672 
1673  [
1674  Browsable(false)
1675  ]
1676  public override System.Drawing.Size Size
1677  {
1678  get
1679  {
1680  return base.Size;
1681  }
1682  set
1683  {
1684  base.Size = value;
1685  }
1686  }
1687  }
1688 
1692  public class ToolStripSeparatorAddon : ToolStripSeparator
1693  {
1694 
1695  private int position = -1;
1699  [
1700  Bindable(false),
1701  Category("Diseño"),
1702  DefaultValue(typeof(int), "-1"),
1703  Description("Posición del botón dentro del ToolStrip."),
1704  Localizable(false),
1705  DisplayName("Posición"),
1706  Browsable(true)
1707  ]
1708  public int Position
1709  {
1710  get { return position; }
1711  set
1712  {
1713  position = value;
1714  }
1715  }
1716 
1717  [
1718  Browsable(false)
1719  ]
1720  public override System.Drawing.Size Size
1721  {
1722  get
1723  {
1724  return base.Size;
1725  }
1726  set
1727  {
1728  base.Size = value;
1729  }
1730  }
1731  }
1732 
1736  public class ToolStripProgressBarAddon : ToolStripProgressBar
1737  {
1738 
1739  private int position = -1;
1743  [
1744  Bindable(false),
1745  Category("Diseño"),
1746  DefaultValue(typeof(int), "-1"),
1747  Description("Posición del botón dentro del ToolStrip."),
1748  Localizable(false),
1749  DisplayName("Posición"),
1750  Browsable(true)
1751  ]
1752  public int Position
1753  {
1754  get { return position; }
1755  set
1756  {
1757  position = value;
1758  }
1759  }
1760 
1761  [
1762  Browsable(false)
1763  ]
1764  public override System.Drawing.Size Size
1765  {
1766  get
1767  {
1768  return base.Size;
1769  }
1770  set
1771  {
1772  base.Size = value;
1773  }
1774  }
1775  }
1776 
1780  public class ToolStripLabelAddon : ToolStripLabel
1781  {
1782 
1783  private int position = -1;
1787  [
1788  Bindable(false),
1789  Category("Diseño"),
1790  DefaultValue(typeof(int), "-1"),
1791  Description("Posición del botón dentro del ToolStrip."),
1792  Localizable(false),
1793  DisplayName("Posición"),
1794  Browsable(true)
1795  ]
1796  public int Position
1797  {
1798  get { return position; }
1799  set
1800  {
1801  position = value;
1802  }
1803  }
1804 
1805  [
1806  Browsable(false)
1807  ]
1808  public override System.Drawing.Size Size
1809  {
1810  get
1811  {
1812  return base.Size;
1813  }
1814  set
1815  {
1816  base.Size = value;
1817  }
1818  }
1819  }
1820 
1824  public class ToolStripDropDownButtonAddon : ToolStripDropDownButton
1825  {
1826 
1827  private int position = -1;
1831  [
1832  Bindable(false),
1833  Category("Diseño"),
1834  DefaultValue(typeof(int), "-1"),
1835  Description("Posición del botón dentro del ToolStrip."),
1836  Localizable(false),
1837  DisplayName("Posición"),
1838  Browsable(true)
1839  ]
1840  public int Position
1841  {
1842  get { return position; }
1843  set
1844  {
1845  position = value;
1846  }
1847  }
1848 
1849  [
1850  Browsable(false)
1851  ]
1852  public override System.Drawing.Size Size
1853  {
1854  get
1855  {
1856  return base.Size;
1857  }
1858  set
1859  {
1860  base.Size = value;
1861  }
1862  }
1863  }
1864 
1868  public class ToolStripComboBoxAddon : ToolStripComboBox
1869  {
1870 
1871  private int position = -1;
1875  [
1876  Bindable(false),
1877  Category("Diseño"),
1878  DefaultValue(typeof(int), "-1"),
1879  Description("Posición del botón dentro del ToolStrip."),
1880  Localizable(false),
1881  DisplayName("Posición"),
1882  Browsable(true)
1883  ]
1884  public int Position
1885  {
1886  get { return position; }
1887  set
1888  {
1889  position = value;
1890  }
1891  }
1892 
1893  [
1894  Browsable(false)
1895  ]
1896  public override System.Drawing.Size Size
1897  {
1898  get
1899  {
1900  return base.Size;
1901  }
1902  set
1903  {
1904  base.Size = value;
1905  }
1906  }
1907  }
1908 
1912  public class ToolStripButtonAddon : ToolStripButton
1913  {
1914 
1915  private int position = -1;
1919  [
1920  Bindable(false),
1921  Category("Diseño"),
1922  DefaultValue(typeof(int), "-1"),
1923  Description("Posición del botón dentro del ToolStrip."),
1924  Localizable(false),
1925  DisplayName("Posición"),
1926  Browsable(true)
1927  ]
1928  public int Position
1929  {
1930  get { return position; }
1931  set
1932  {
1933  position = value;
1934  }
1935  }
1936 
1937  [
1938  Browsable(false)
1939  ]
1940  public override System.Drawing.Size Size
1941  {
1942  get
1943  {
1944  return base.Size;
1945  }
1946  set
1947  {
1948  base.Size = value;
1949  }
1950  }
1951 
1952  [Browsable(false)]
1953  public override bool AllowDrop
1954  {
1955  get
1956  {
1957  return base.AllowDrop;
1958  }
1959  set
1960  {
1961  base.AllowDrop = value;
1962  }
1963  }
1964 
1965  [Browsable(false)]
1966  public override System.Drawing.Rectangle Bounds
1967  {
1968  get
1969  {
1970  return base.Bounds;
1971  }
1972  }
1973 
1974  [Browsable(false)]
1975  public override bool CanSelect
1976  {
1977  get
1978  {
1979  return base.CanSelect;
1980  }
1981  }
1982 
1983  [Browsable(false)]
1984  public override System.Drawing.Font Font
1985  {
1986  get
1987  {
1988  return base.Font;
1989  }
1990  set
1991  {
1992  base.Font = value;
1993  }
1994  }
1995 
1996  }
1997 
1998  //public class PaginasCollection : CollectionBase, ICustomTypeDescriptor
1999  //{
2000  // //public PaginasCollection()
2001  // //{
2002 
2003  // //}
2004 
2005  // // Collection methods implementation
2006 
2007  // //System.Collections.ArrayList list = new System.Collections.ArrayList();
2008 
2009  // //protected override System.Collections.ArrayList List
2010  // //{
2011  // // get
2012  // // {
2013  // // //if (base.List == null)
2014  // // // return new System.Collections.ArrayList();
2015  // // //else
2016  // // return base.List;
2017 
2018  // // //return list;
2019  // // }
2020  // //}
2021 
2022 
2023  // /// <summary>
2024  // /// Handler del evento para capturar el cambio de Visible
2025  // /// </summary>
2026  // public event AddPagina_Handler AddPagina;
2027 
2028  // /// <summary>
2029  // /// Handler del evento para capturar el cambio de Visible
2030  // /// </summary>
2031  // public delegate void AddPagina_Handler(PaginaManteProperties sender);
2032 
2033  // /// <summary>
2034  // /// Añade la página a la colección
2035  // /// </summary>
2036  // /// <param name="pagina"></param>
2037  // public void Add(PaginaManteProperties pagina)
2038  // {
2039  // this.List.Add(pagina);
2040 
2041  // pagina.ColeccionPaginas = this;
2042 
2043  // if (AddPagina != null)
2044  // AddPagina(pagina);
2045  // }
2046 
2047  // /// <summary>
2048  // /// Elimina la página de la colección
2049  // /// </summary>
2050  // /// <param name="pagina"></param>
2051  // public void Remove(PaginaManteProperties pagina)
2052  // {
2053  // this.List.Remove(pagina);
2054  // }
2055 
2056  // /// <summary>
2057  // /// Devuelve la página correspondiente al índice
2058  // /// </summary>
2059  // /// <param name="index"></param>
2060  // /// <returns></returns>
2061  // public PaginaManteProperties this[int index]
2062  // {
2063  // get
2064  // {
2065  // return (PaginaManteProperties)this.List[index];
2066  // }
2067  // }
2068 
2069 
2070  // // Implementation of ICustomTypeDescriptor:
2071 
2072  // /// <summary>
2073  // /// Devuelve el nombre de la clase
2074  // /// </summary>
2075  // /// <returns></returns>
2076  // public String GetClassName()
2077  // {
2078  // return TypeDescriptor.GetClassName(this, true);
2079  // }
2080 
2081  // /// <summary>
2082  // /// Devuelve una colección de atributos
2083  // /// </summary>
2084  // /// <returns></returns>
2085  // public AttributeCollection GetAttributes()
2086  // {
2087  // return TypeDescriptor.GetAttributes(this, true);
2088  // }
2089 
2090  // /// <summary>
2091  // /// Devuelve el nombre del componente
2092  // /// </summary>
2093  // /// <returns></returns>
2094  // public String GetComponentName()
2095  // {
2096  // return TypeDescriptor.GetComponentName(this, true);
2097  // }
2098 
2099  // /// <summary>
2100  // /// Devuelve el convertidor de tipos
2101  // /// </summary>
2102  // /// <returns></returns>
2103  // public TypeConverter GetConverter()
2104  // {
2105  // return TypeDescriptor.GetConverter(this, true);
2106  // }
2107 
2108  // /// <summary>
2109  // /// Devvuelve el evento predeterminado
2110  // /// </summary>
2111  // /// <returns></returns>
2112  // public EventDescriptor GetDefaultEvent()
2113  // {
2114  // return TypeDescriptor.GetDefaultEvent(this, true);
2115  // }
2116 
2117  // /// <summary>
2118  // /// Devuelve la propiedad predeterminada
2119  // /// </summary>
2120  // /// <returns></returns>
2121  // public PropertyDescriptor GetDefaultProperty()
2122  // {
2123  // return TypeDescriptor.GetDefaultProperty(this, true);
2124  // }
2125 
2126  // /// <summary>
2127  // /// Devuelve un editor con el tipo base especificado
2128  // /// </summary>
2129  // /// <param name="editorBaseType"></param>
2130  // /// <returns></returns>
2131  // public object GetEditor(Type editorBaseType)
2132  // {
2133  // return TypeDescriptor.GetEditor(this, editorBaseType, true);
2134  // }
2135 
2136  // /// <summary>
2137  // /// Devuelve la colección de eventos
2138  // /// </summary>
2139  // /// <param name="attributes"></param>
2140  // /// <returns></returns>
2141  // public EventDescriptorCollection GetEvents(Attribute[] attributes)
2142  // {
2143  // return TypeDescriptor.GetEvents(this, attributes, true);
2144  // }
2145 
2146  // /// <summary>
2147  // /// Devuelve la colección de eventos
2148  // /// </summary>
2149  // /// <returns></returns>
2150  // public EventDescriptorCollection GetEvents()
2151  // {
2152  // return TypeDescriptor.GetEvents(this, true);
2153  // }
2154 
2155  // /// <summary>
2156  // /// Devuelve la instancia del objeto
2157  // /// </summary>
2158  // /// <param name="pd"></param>
2159  // /// <returns></returns>
2160  // public object GetPropertyOwner(PropertyDescriptor pd)
2161  // {
2162  // return this;
2163  // }
2164 
2165  // /// <summary>
2166  // /// Devuelve el descriptor de las propiedades
2167  // /// </summary>
2168  // /// <param name="attributes"></param>
2169  // /// <returns></returns>
2170  // public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
2171  // {
2172  // return GetProperties();
2173  // }
2174 
2175  // /// <summary>
2176  // /// Devuelve el descriptor de las propiedades
2177  // /// </summary>
2178  // /// <returns></returns>
2179  // public PropertyDescriptorCollection GetProperties()
2180  // {
2181  // // Create a new collection object PropertyDescriptorCollection
2182  // PropertyDescriptorCollection pds = new PropertyDescriptorCollection(null);
2183 
2184  // // Iterate the list of employees
2185  // for (int i = 0; i < this.List.Count; i++)
2186  // {
2187  // // For each employee create a property descriptor
2188  // // and add it to the
2189  // // PropertyDescriptorCollection instance
2190  // PaginaCollectionPropertyDescriptor pd = new PaginaCollectionPropertyDescriptor(this, i);
2191  // pds.Add(pd);
2192  // }
2193  // return pds;
2194  // }
2195  //}
2196 
2200  //public class PaginaCollectionPropertyDescriptor : PropertyDescriptor
2201  //{
2202  // private PaginasCollection collection = null;
2203  // private int index = -1;
2204 
2205  // public PaginaCollectionPropertyDescriptor(PaginasCollection coll, int idx)
2206  // : base("#" + idx.ToString(), null)
2207  // {
2208  // this.collection = coll;
2209  // this.index = idx;
2210  // }
2211 
2212  // public override AttributeCollection Attributes
2213  // {
2214  // get
2215  // {
2216  // return new AttributeCollection(null);
2217  // }
2218  // }
2219 
2220  // public override bool CanResetValue(object component)
2221  // {
2222  // return true;
2223  // }
2224 
2225  // public override Type ComponentType
2226  // {
2227  // get
2228  // {
2229  // return this.collection.GetType();
2230  // }
2231  // }
2232 
2233  // public override string DisplayName
2234  // {
2235  // get
2236  // {
2237  // PaginaManteProperties pagina = this.collection[index];
2238  // return pagina.Nombre;
2239  // }
2240  // }
2241 
2242  // public override string Description
2243  // {
2244  // get
2245  // {
2246  // PaginaManteProperties pagina = this.collection[index];
2247  // StringBuilder sb = new StringBuilder();
2248  // sb.Append(pagina.Nombre);
2249 
2250  // return sb.ToString();
2251  // }
2252  // }
2253 
2254  // public override object GetValue(object component)
2255  // {
2256  // return this.collection[index];
2257  // }
2258 
2259  // public override bool IsReadOnly
2260  // {
2261  // get { return true; }
2262  // }
2263 
2264  // public override string Name
2265  // {
2266  // get { return "#" + index.ToString(); }
2267  // }
2268 
2269  // public override Type PropertyType
2270  // {
2271  // get { return this.collection[index].GetType(); }
2272  // }
2273 
2274  // public override void ResetValue(object component) { }
2275 
2276  // public override bool ShouldSerializeValue(object component)
2277  // {
2278  // return true;
2279  // }
2280 
2281  // public override void SetValue(object component, object value)
2282  // {
2283  // // this.collection[index] = value;
2284  // }
2285  //}
2286 
2289  //internal class PaginaConverter : ExpandableObjectConverter
2290  //{
2291  // public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
2292  // {
2293  // if (destType == typeof(string) && value is PaginaManteProperties)
2294  // {
2295  // // Cast the value to an Employee type
2296  // PaginaManteProperties emp = (PaginaManteProperties)value;
2297 
2298  // // Return department and department role separated by comma.
2299  // return emp.Nombre;
2300  // }
2301  // return base.ConvertTo(context, culture, value, destType);
2302  // }
2303  //}
2304 
2306  //internal class PaginaCollectionConverter : ExpandableObjectConverter
2307  //{
2308  // public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
2309  // {
2310  // if (destType == typeof(string) && value is PaginasCollection)
2311  // {
2312  // // Return department and department role separated by comma.
2313  // return "(colección de páginas)";
2314  // }
2315  // return base.ConvertTo(context, culture, value, destType);
2316  // }
2317  //}
2318 
2322  //[TypeConverter(typeof(PaginaConverter))]
2324  {
2328  //public PaginasCollection ColeccionPaginas;
2329 
2330  private string nombre = "";
2334  [
2335  Bindable(false),
2336  Category("Diseño"),
2337  DefaultValue(typeof(string), ""),
2338  Description("Nombre de la página."),
2339  Localizable(false),
2340  DisplayName("(nombre)"),
2341  Browsable(false)
2342  ]
2343  public string Nombre
2344  {
2345  get { return nombre; }
2346  set { nombre = value; }
2347  }
2348 
2349  private string titulo = "";
2353  [
2354  Bindable(false),
2355  Category("Diseño"),
2356  DefaultValue(typeof(TabControl.TabPageCollection), null),
2357  Description("Título de la página."),
2358  Localizable(false),
2359  DisplayName("Título")
2360  ]
2361  public string Titulo
2362  {
2363  get { return titulo; }
2364  set
2365  {
2366  titulo = value;
2367 
2368  if (TituloPagina_Changed != null)
2369  TituloPagina_Changed(this, value);
2370  }
2371  }
2372 
2376  public event TituloPagina_Change_Handler TituloPagina_Changed;
2377 
2381  public delegate void TituloPagina_Change_Handler(PaginaManteProperties sender, string tituloPagina);
2382  }
2383 
2387  public class ObjectsManteProperties : object
2388  {
2389  private string nombre = "";
2393  [
2394  Bindable(false),
2395  Category("Diseño"),
2396  DefaultValue(typeof(string), ""),
2397  Description("Nombre del campo."),
2398  Localizable(false),
2399  DisplayName("(nombre)"),
2400  Browsable(false)
2401  ]
2402  public string Nombre
2403  {
2404  get { return nombre; }
2405  set
2406  {
2407  nombre = value;
2408  }
2409  }
2410 
2411  private bool visible = false;
2415  [
2416  Bindable(false),
2417  Category("Diseño"),
2418  DefaultValue(typeof(bool), "false"),
2419  Description("Determina si el campo será visible o no."),
2420  Localizable(false),
2421  DisplayName("Visible")
2422  ]
2423  public bool Visible
2424  {
2425  get { return visible; }
2426  set
2427  {
2428  visible = value;
2429 
2430 
2431  if (Visible_Changed != null)
2432  Visible_Changed(this, value);
2433  }
2434  }
2435 
2436  private bool mostrarTitulo = true;
2440  [
2441  Bindable(false),
2442  Category("Diseño"),
2443  DefaultValue(typeof(bool), "true"),
2444  Description("Muestra u oculta el título del campo."),
2445  Localizable(false),
2446  DisplayName("Mostrar título")
2447  ]
2448  public bool MostrarTitulo
2449  {
2450  get { return mostrarTitulo; }
2451  set
2452  {
2453  mostrarTitulo = value;
2454 
2455  if (MostrarTitulo_Changed != null)
2456  MostrarTitulo_Changed(this, value);
2457  }
2458  }
2459 
2460  private int tab = 1;
2464  [
2465  Bindable(false),
2466  Category("Diseño"),
2467  DefaultValue(typeof(int), "1"),
2468  Description("Índice de la página donde se colocará el control."),
2469  Localizable(false),
2470  DisplayName("Página"),
2471  Browsable(false)
2472  ]
2473  public int Tab
2474  {
2475  get { return tab; }
2476  set { tab = value; }
2477  }
2478 
2479  private Int32 numericupdowndecimals = 0;
2483  [
2484  Bindable(false),
2485  Category("Diseño"),
2486  DefaultValue(typeof(int), "0"),
2487  Description("Posiciones decimales. Solo para los controles NumericUpDown"),
2488  Localizable(false),
2489  DisplayName("Posiciones decimales")
2490  ]
2491  public Int32 NumericUpDownDecimals
2492  {
2493  get { return numericupdowndecimals; }
2494  set
2495  {
2496  numericupdowndecimals = value;
2497 
2498  if (NumericUpDownProperties_Changed != null)
2499  NumericUpDownProperties_Changed(this);
2500  }
2501  }
2502 
2503  private Int32 numericupdownincrement = 1;
2507  [
2508  Bindable(false),
2509  Category("Diseño"),
2510  DefaultValue(typeof(int), "1"),
2511  Description("Incremento. Solo para los controles NumericUpDown"),
2512  Localizable(false),
2513  DisplayName("Incremento")
2514  ]
2515  public Int32 NumericUpDownIncrement
2516  {
2517  get { return numericupdownincrement; }
2518  set
2519  {
2520  numericupdownincrement = value;
2521 
2522  if (NumericUpDownProperties_Changed != null)
2523  NumericUpDownProperties_Changed(this);
2524  }
2525  }
2526 
2527  private Int32 numericupdownmaximum = 9999999;
2531  [
2532  Bindable(false),
2533  Category("Diseño"),
2534  DefaultValue(typeof(int), "9999999"),
2535  Description("Valor máximo. Solo para los controles NumericUpDown"),
2536  Localizable(false),
2537  DisplayName("Máximo")
2538  ]
2539  public Int32 NumericUpDownMaximum
2540  {
2541  get { return numericupdownmaximum; }
2542  set
2543  {
2544  numericupdownmaximum = value;
2545 
2546  if (NumericUpDownProperties_Changed != null)
2547  NumericUpDownProperties_Changed(this);
2548  }
2549  }
2550 
2551  private Int32 numericupdownminimum = 0;
2555  [
2556  Bindable(false),
2557  Category("Diseño"),
2558  DefaultValue(typeof(int), "0"),
2559  Description("Valor mínimo. Solo para los controles NumericUpDown"),
2560  Localizable(false),
2561  DisplayName("Mínimo")
2562  ]
2563  public Int32 NumericUpDownMinimum
2564  {
2565  get { return numericupdownminimum; }
2566  set
2567  {
2568  numericupdownminimum = value;
2569 
2570  if (NumericUpDownProperties_Changed != null)
2571  NumericUpDownProperties_Changed(this);
2572  }
2573  }
2574 
2575  private Int32 top = 0;
2579  [
2580  Bindable(false),
2581  Category("Diseño"),
2582  DefaultValue(typeof(int), "0"),
2583  Description("Posición vertical del control."),
2584  Localizable(false),
2585  DisplayName("Top")
2586  ]
2587  public Int32 Top
2588  {
2589  get { return top; }
2590  set
2591  {
2592  top = value;
2593 
2594  if (Location_Changed != null)
2595  Location_Changed(this);
2596  }
2597  }
2598 
2599  private Int32 left = 0;
2603  [
2604  Bindable(false),
2605  Category("Diseño"),
2606  DefaultValue(typeof(int), "0"),
2607  Description("Posición horizontal del control."),
2608  Localizable(false),
2609  DisplayName("Left")
2610  ]
2611  public Int32 Left
2612  {
2613  get { return left; }
2614  set
2615  {
2616  left = value;
2617 
2618  if (Location_Changed != null)
2619  Location_Changed(this);
2620  }
2621  }
2622 
2623  private Int32 controlleft = 0;
2627  [
2628  Bindable(false),
2629  Category("Diseño"),
2630  DefaultValue(typeof(int), "0"),
2631  Description("Posición horizontal del control."),
2632  Localizable(false),
2633  DisplayName("Left"),
2634  Browsable(false)
2635  ]
2636  public Int32 ControlLeft
2637  {
2638  get { return controlleft; }
2639  set
2640  {
2641  controlleft = value;
2642  }
2643  }
2644 
2645  private ObjectsManteTypes objectType = ObjectsManteTypes.TextBox;
2649  [
2650  Bindable(false),
2651  Category("Diseño"),
2652  DefaultValue(typeof(ObjectsManteTypes), "TextBox"),
2653  Description("Control enlazado al campo."),
2654  Localizable(false),
2655  DisplayName("Control")
2656  ]
2657  public ObjectsManteTypes ObjectType
2658  {
2659  get { return objectType; }
2660  set
2661  {
2662  if (value != null && objectType != null && objectType != value)
2663  {
2664  if (objectType == ObjectsManteTypes.TxtCodLabel)
2665  {
2666  TxtCodLabel = "";
2667  }
2668  }
2669 
2670  objectType = value;
2671 
2672  if (ObjectType_Changed != null)
2673  ObjectType_Changed(this, value);
2674  }
2675  }
2676 
2677  private string txtCodLabel = "";
2681  [
2682  Bindable(false),
2683  Category("Diseño"),
2684  DefaultValue(""),
2685  Description("Objeto TxtCodLabel que se insertará en el control de usuario."),
2686  Localizable(false),
2687  DisplayName("TxtCodLabel"),
2688  TypeConverter(typeof(cmb_txtCodLabel))
2689  ]
2690  public string TxtCodLabel
2691  {
2692  get { return txtCodLabel; }
2693  set
2694  {
2695  if (txtCodLabel != value)
2696  {
2697  if (!string.IsNullOrWhiteSpace(value))
2698  {
2699  ObjectType = ObjectsManteTypes.TxtCodLabel;
2700  }
2701  }
2702 
2703  txtCodLabel = value;
2704  }
2705  }
2706 
2707  //private DataTypes dataType = DataTypes.Carácter;
2711  //[
2712  // Bindable(false),
2713  // Category("Diseño"),
2714  // DefaultValue(typeof(DataTypes), "Carácter"),
2715  // Description("Tipos de datos del campo asociado."),
2716  // Localizable(false),
2717  // DisplayName("Tipo de datos"),
2718  // Browsable(false)
2719  //]
2720  //public DataTypes DataType
2721  //{
2722  // get { return dataType; }
2723  // set { dataType = value; }
2724  //}
2725 
2726  private string tituloCampo = "";
2730  [
2731  Bindable(false),
2732  Category("Diseño"),
2733  DefaultValue(typeof(string), ""),
2734  Description("Título del campo."),
2735  Localizable(false),
2736  DisplayName("Título")
2737  ]
2738  public string TituloCampo
2739  {
2740  get { return tituloCampo; }
2741  set
2742  {
2743  tituloCampo = value;
2744 
2745  if (TituloCampo_Changed != null)
2746  TituloCampo_Changed(this, value);
2747  }
2748  }
2749 
2750  private bool debeExistir = false;
2754  [
2755  Bindable(false),
2756  Category("Diseño"),
2757  DefaultValue(typeof(bool), "false"),
2758  Description("Indica si el campo debe existir al crear nuevas tablas."),
2759  Localizable(false),
2760  DisplayName("Debe existir"),
2761  Browsable(false)
2762  ]
2763  public bool DebeExistir
2764  {
2765  get { return debeExistir; }
2766  set { debeExistir = value; }
2767  }
2768 
2769  private bool esFiltro = false;
2773  [
2774  Bindable(false),
2775  Category("Diseño"),
2776  DefaultValue(typeof(bool), "false"),
2777  Description("Indica si el campo actuará como filtro de la tabla del addon."),
2778  Localizable(false),
2779  DisplayName("Es filtro"),
2780  Browsable(true)
2781  ]
2782  public bool EsFiltro
2783  {
2784  get { return esFiltro; }
2785  set { esFiltro = value; }
2786  }
2787 
2792  public void SetObjectProperties(DataRowView fieldProperties)
2793  {
2794  // Tipo de datos
2795  string dataType = fieldProperties["Data_Type"].ToString();
2796  SetObjectType(dataType);
2797 
2798  if (dataType == "numeric")
2799  {
2800  int decimals = Convert.ToInt32(fieldProperties["numeric_scale"]);
2801  NumericUpDownDecimals = decimals;
2802  }
2803  }
2804 
2809  public void SetObjectType(string dataType)
2810  {
2811  if (dataType == "char")
2812  ObjectType = ObjectsManteTypes.TextBox;
2813 
2814  if (dataType == "bit")
2815  ObjectType = ObjectsManteTypes.CheckBox;
2816 
2817  if (dataType == "text")
2818  ObjectType = ObjectsManteTypes.TextBox;
2819 
2820  if (dataType == "int")
2821  ObjectType = ObjectsManteTypes.NumericUpDown;
2822 
2823  if (dataType == "date" || dataType == "datetime")
2824  ObjectType = ObjectsManteTypes.DateTimePicker;
2825 
2826  if (dataType == "numeric" || dataType == "decimal")
2827  ObjectType = ObjectsManteTypes.NumericUpDown;
2828  }
2829 
2833  public event ObjectType_Change_Handler ObjectType_Changed;
2834 
2838  public delegate void ObjectType_Change_Handler(ObjectsManteProperties sender, ObjectsManteTypes value);
2839 
2843  public event TituloCampo_Change_Handler TituloCampo_Changed;
2844 
2848  public delegate void TituloCampo_Change_Handler(ObjectsManteProperties sender, string tituloCampo);
2849 
2853  public event Visible_Change_Handler Visible_Changed;
2854 
2858  public delegate void Visible_Change_Handler(object sender, bool visible);
2859 
2863  public event MostrarTitulo_Change_Handler MostrarTitulo_Changed;
2864 
2868  public delegate void MostrarTitulo_Change_Handler(ObjectsManteProperties sender, bool visible);
2869 
2873  public event NumericUpDownProperties_Change_Handler NumericUpDownProperties_Changed;
2874 
2878  public delegate void NumericUpDownProperties_Change_Handler(ObjectsManteProperties sender);
2879 
2883  public event Location_Changed_Handler Location_Changed;
2884 
2888  public delegate void Location_Changed_Handler(ObjectsManteProperties sender);
2889  }
2890 
2895  {
2896  private string nombre = "";
2900  [
2901  Bindable(false),
2902  Category("Diseño"),
2903  DefaultValue(typeof(string), ""),
2904  Description("Nombre del control de usuario."),
2905  Localizable(false),
2906  DisplayName("(nombre)"),
2907  Browsable(false)
2908  ]
2909  public string Nombre
2910  {
2911  get { return nombre; }
2912  set { nombre = value; }
2913  }
2914 
2915  private int numtabs = 1;
2919  [
2920  Bindable(false),
2921  Category("Diseño"),
2922  DefaultValue(typeof(int), "1"),
2923  Description("Número de páginas que tendrá el control de usuario."),
2924  Localizable(false),
2925  DisplayName("Páginas"),
2926  Browsable(true)
2927  ]
2928  public int NumTabs
2929  {
2930  get { return numtabs; }
2931  set
2932  {
2933  if (value == null || value == 0)
2934  value = 1;
2935 
2936  numtabs = value;
2937  }
2938  }
2939  }
2940 
2944  //public class ObjecstUserControlProperties : ObjectsManteProperties
2945  //{
2946  // private bool esFiltro = false;
2947  // /// <summary>
2948  // /// Indica si el campo relacionado actuarà de filtro de la tabla
2949  // /// </summary>
2950  // [
2951  // Bindable(false),
2952  // Category("Diseño"),
2953  // DefaultValue(typeof(bool), "false"),
2954  // Description("Indica si el campo actuará como filtro de la tabla del addon."),
2955  // Localizable(false),
2956  // DisplayName("Es filtro"),
2957  // Browsable(true)
2958  // ]
2959  // public bool EsFiltro
2960  // {
2961  // get { return esFiltro; }
2962  // set { esFiltro = value; }
2963  // }
2964  //}
2965 
2970  {
2971  private string nombre = "";
2975  [
2976  Bindable(false),
2977  Category("Diseño"),
2978  DefaultValue(typeof(string), ""),
2979  Description("Nombre del campo."),
2980  Localizable(false),
2981  DisplayName("(nombre)"),
2982  Browsable(false)
2983  ]
2984  public string Nombre
2985  {
2986  get { return nombre; }
2987  set { nombre = value; }
2988  }
2989 
2990  private string tituloCampo = "";
2994  [
2995  Bindable(false),
2996  Category("Diseño"),
2997  DefaultValue(typeof(string), ""),
2998  Description("Título del campo."),
2999  Localizable(false),
3000  DisplayName("Título")
3001  ]
3002  public string TituloCampo
3003  {
3004  get { return tituloCampo; }
3005  set
3006  {
3007  tituloCampo = value;
3008 
3009  if (TituloCampo_Changed != null)
3010  TituloCampo_Changed(this, value);
3011  }
3012  }
3013 
3017  public event TituloCampo_Change_Handler TituloCampo_Changed;
3018 
3022  public delegate void TituloCampo_Change_Handler(CodigoNombreManteProperties sender, string tituloCampo);
3023  }
3024 
3025 
3029  public class DocumentProperties
3030  {
3031  private string nombre = "";
3035  [
3036  Bindable(false),
3037  Category("Diseño"),
3038  DefaultValue(typeof(string), ""),
3039  Description("Nombre del documento."),
3040  Localizable(false),
3041  DisplayName("(nombre)"),
3042  Browsable(true)
3043  ]
3044  public string Nombre
3045  {
3046  get { return nombre; }
3047  set { nombre = value; }
3048  }
3049 
3050  private string titulo = "";
3054  [
3055  Bindable(false),
3056  Category("Diseño"),
3057  DefaultValue(typeof(string), ""),
3058  Description("Título del formulario."),
3059  Localizable(false),
3060  DisplayName("Título"),
3061  Browsable(true)
3062  ]
3063  public string Titulo
3064  {
3065  get { return titulo; }
3066  set { titulo = value; }
3067  }
3068 
3069  private int capHeight = 108;
3073  [
3074  Bindable(false),
3075  Category("Diseño"),
3076  DefaultValue(typeof(int), "108"),
3077  Description("Alto de la cabecera del documento."),
3078  Localizable(false),
3079  DisplayName("Altro cabecera"),
3080  Browsable(true)
3081  ]
3082  public int CapHeight
3083  {
3084  get { return capHeight; }
3085  set { capHeight = value; }
3086  }
3087 
3088  private string textomenu = "";
3092  [
3093  Bindable(false),
3094  Category("Diseño"),
3095  DefaultValue(typeof(string), ""),
3096  Description("Texto que se mostrará en la opción de menú."),
3097  Localizable(false),
3098  DisplayName("Texto menú"),
3099  Browsable(true)
3100  ]
3101  public string TextoMenu
3102  {
3103  get { return textomenu; }
3104  set { textomenu = value; }
3105  }
3106 
3107  //private int numtabs = 1;
3111  //[
3112  // Bindable(false),
3113  // Category("Diseño"),
3114  // DefaultValue(typeof(int), "1"),
3115  // Description("Número de páginas donde se colocará el control."),
3116  // Localizable(false),
3117  // DisplayName("Páginas"),
3118  // Browsable(true)
3119  //]
3120  //public int NumTabs
3121  //{
3122  // get { return numtabs; }
3123  // set
3124  // {
3125  // if (value == null || value == 0)
3126  // value = 1;
3127 
3128  // numtabs = value;
3129  // }
3130  //}
3131  }
3132 
3136  public class cmb_txtCodLabel : cmb_List
3137  {
3144  public override List<string> _CargarDatos(ITypeDescriptorContext context)
3145  {
3146  List<string> lstModulos = new List<string>();
3147  if (context != null && context.Instance != null && context.PropertyDescriptor != null)
3148  {
3149  try
3150  {
3151  FuncsDataBase funcsDataBase = new FuncsDataBase();
3152  List<string> usercontrolsList = funcsDataBase.GetFiltrosTxtCodLabel();
3153  lstModulos = usercontrolsList;
3154  }
3155  catch (Exception)
3156  {
3157  lstModulos = new List<string>();
3158  }
3159  }
3160  return lstModulos;
3161  }
3162  }
3163 
3164 }
Visible_Change_Handler Visible_Changed
Handler del evento para capturar el cambio de Visible
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
WidgetTypes
Tipos de widgets para la creación de widgets
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...
Propiedades para el deseño de las modificaciones de los mantenimientos
void SetObjectType(string dataType)
Establece el tipo de objeto según el tipo de datos
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...
Base para los botones de herramientas
Propiedades para el deseño de los controles de usuarios para mantenientos
ObjectType_Change_Handler ObjectType_Changed
Handler del evento para capturar el cambio de tipo de objeto
void SetObjectType(string dataType)
Establece el tipo de objeto según el tipo de datos
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
Clase para las acciones en la base de datos
PrimaryKeys
Tipos de claves primarias
static DataTable ConfigTable
Guardamos el contenido de la tabla config de comunes
override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
Propiedades de los campos código y nombre para el deseño de los mantenimientos
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
Location_Changed_Handler Location_Changed
Handler del evento para capturar el cambio de PosicionesDecimales
TituloPagina_Change_Handler TituloPagina_Changed
Handler del evento para capturar el cambio de título
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...
NombreTabla_Change_Handler NombreTabla_Changed
Handler del evento para capturar el cambio de título
WidgetTypes GetWidgetTypesKeyEnum(string tcValue)
Obtener el tipos de widget
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
TituloCampo_Change_Handler TituloCampo_Changed
Handler del evento para capturar el cambio de título
void SetObjectProperties(DataRowView fieldProperties)
Establece las propiedades del objeto basándose en el campo seleccionado
Clase para mostrar las propiedades de los widgets
Caja de texto con datos seleccionables
override bool GetStandardValuesSupported(ITypeDescriptorContext context)
Clase para la definición de las páginas del mantenimiento
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
Definición de los objetos campo para las tablas relacionadas
Clase para mostrar las propiedades de ewCampoTRel
Propiedades para el deseño de los mantenimientos
Funciones y métodos para crear los componentes
static int GetLenCampoConfig(string nombreCampo)
Devuelve la longitud del campo ampliable
Clase para mostrar las propiedades de campos en la creación de tablas
Clase base para propiedades de tipo "Combo" y con Lista asociada
static FuncsSourceCode FuncsSourceForProperties
Funciones para los ficheros de código fuente
Proporciona características adicionales de las máscaras de Eurowin
Definition: clsEwBase.cs:6212
DataWidgetProperties()
Inicializa una nueva instancia de la classe frmNuevaTabla
Propiedades de objetos para el deseño de los mantenimientos
dynamic ClassMod
Clase que se está utilizando
override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
MostrarTitulo_Change_Handler MostrarTitulo_Changed
Handler del evento para capturar el cambio de Visible
Base para los botones de herramientas
ObjectsManteTypes
Tipos de objetos para enlazar con los campos de los mantenimientos
Propiedades para el deseño de los mantenimientos
TituloCampo_Change_Handler TituloCampo_Changed
Handler del evento para capturar el cambio de título
Base para los botones de herramientas
Proporciona un convertidor de tipos para convertir objetos de cadena en otras representaciones y desd...
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...
gridColumnsTypes
Definición de los tipos de columnas para los grids o campos enlazados
NumericUpDownProperties_Change_Handler NumericUpDownProperties_Changed
Handler del evento para capturar el cambio de PosicionesDecimales
Nombre_Change_Handler Nombre_Changed
Handler del evento para capturar el cambio de nombre
List< string > GetFiltrosTxtCodLabel()
Devuelve los addons que tienen filtros
DataTypes
Tipos de datos para la creación de tablas
Clase estática de acceso a Base de Datos
Definition: DB.cs:26
override List< string > _CargarDatos(ITypeDescriptorContext context)
Metodo virtual para cargar los datos del combo. El metodo por defecto trata de cargar los datos de la...