Exemple #1
0
        /// <summary>
        /// Seleccionar formato de salida.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CBFormatoSalida_SelectedIndexChanged(object sender, EventArgs e)
        {
            PanelFormatoOpciones.SuspendLayout();
            PanelFormatoOpciones.Controls.Clear();

            List <Control> opciones = new List <Control>();

            switch (CBFormatoSalida.SelectedValue.ToString())
            {
            case "SQL":
                Label   lbl          = new Label_("Nombre de la Tabla");
                TextBox tbxTableName = new TextBox {
                    Name = "TableName", Width = 120, Text = "GEN_X"
                };
                CheckBox ckbxCreateTable = new CheckB_("CreateTableCkBx", "Incluir crear tabla");
                opciones.AddRange(new Control[] { lbl, tbxTableName, ckbxCreateTable });
                break;

            case "JSON":
                CheckBox ckbxArrayJson   = new CheckB_("JsonAsArray", "En Array");
                CheckBox ckbxIncluirNull = new CheckB_("IncludeNull", "Incluir valores nulos");
                opciones.AddRange(new Control[] { ckbxArrayJson, ckbxIncluirNull });
                break;

            case "CSV":
            case "TSV":
                Label    lblInc     = new Label_("Incluir: ");
                CheckBox ckbxHeader = new CheckB_("IncludeHeader", "Cabezera", true);
                opciones.AddRange(new Control[] { lblInc, ckbxHeader });
                break;

            default:
                break;
            }

            PanelFormatoOpciones.Controls.AddRange(opciones.ToArray());
            PanelFormatoOpciones.ResumeLayout();
        }
Exemple #2
0
        public OptionsNumberType(EBCategory ebcat, EBFieldType ebfld)
        {
            EBCat = ebcat;
            EBFld = ebfld;

            if (EBFld == EBFieldType.Number)
            {
                Label lblMin = new Label_("Min");
                TBMin = new TextBox {
                    Width = 70, Text = "1", MaxLength = 20
                };
                Label lblMax = new Label_("Max");
                TBMax = new TextBox {
                    Width = 70, Text = "100", MaxLength = 20
                };
                Label lblDec = new Label_("Decimales");
                TBDec = new TextBox {
                    Width = 20, Text = "0", MaxLength = 1
                };

                panelControls.InsertRange(0, new Control[] { lblMin, TBMin, lblMax, TBMax, lblDec, TBDec });
            }
        }