public void UnlockCombo(ComboBase combo)
 {
     if (!GetInstance().m_unlockedComboStrings.Contains(combo.GetGuid()))
     {
         GetInstance().m_unlockedComboStrings.Add(combo.GetGuid());
     }
 }
        private CatalogBaseModel FillCatalogSubjectOptionValueBaseModel(CatalogBaseModel catSubOptValBModel, CatalogSubjectOption catSubjOpt, List <CustomerCatalogInformation> lstCustCatInfo, int custUserID)
        {
            if (catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.ComboBox || catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.CheckBox)
            {
                catSubOptValBModel.comboBase = new List <ComboBase>();
                if (catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.ComboBox)
                {
                    catSubOptValBModel.comboBase.Insert(0, new ComboBase {
                        ItemValue = "--Select--", ItemID = "0"
                    });
                }
            }
            string strComments = string.Empty;

            List <CatalogSubjectOptionValue> lstCatalogSubOptValues = catSubjOpt.CatalogSubjectOptionValues.OrderBy(e => e.Priority).ToList();

            if (catSubjOpt.CatalogSubjectOptionValues.Where(e => e.CatalogSubjectOptionID == 33).FirstOrDefault() != null)
            {
                lstCatalogSubOptValues = FillVersionValues(lstCustCatInfo, catSubjOpt);
            }
            if (lstCatalogSubOptValues != null && lstCatalogSubOptValues.Count() > 0)
            {
                foreach (CatalogSubjectOptionValue catSubjOptVal in lstCatalogSubOptValues)
                {
                    catSubOptValBModel.ID   = catSubjOpt.CatalogSubjectOptionID;
                    catSubOptValBModel.Type = (int)catSubjOpt.ColumnType;
                    if (catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.ComboBox || catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.CheckBox)
                    {
                        ComboBase objCombo = new ComboBase();
                        objCombo.ItemID    = catSubjOptVal.CatalogSubjectOptionValueID.ToString();
                        objCombo.ItemValue = catSubjOptVal.CatalogSubjectOptionValue1;
                        objCombo.Selected  = lstCustCatInfo.Where(e => e.CatalogSubjectOptionValueID == catSubjOptVal.CatalogSubjectOptionValueID && e.Status != false).FirstOrDefault() != null ? true : false;
                        catSubOptValBModel.comboBase.Add(objCombo);
                    }
                    strComments = lstCustCatInfo.Where(e => e.CatalogSubjectOptionValue.CatalogSubjectOptionValueID == catSubjOptVal.CatalogSubjectOptionValueID && e.Status != false).FirstOrDefault() != null?lstCustCatInfo.Where(e => e.CatalogSubjectOptionValue.CatalogSubjectOptionValueID == catSubjOptVal.CatalogSubjectOptionValueID && e.Status != false).FirstOrDefault().Comments : strComments;

                    catSubOptValBModel.Value = strComments;
                    if (catSubjOpt.CatalogSubjectID == 16)
                    {
                        catSubOptValBModel.Type = catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.CheckBox ? (int)CatalogColumnTypeEnum.Label : (int)catSubjOpt.ColumnType;
                        if (catSubjOpt.ColumnType == (int)CatalogColumnTypeEnum.CheckBox)
                        {
                            catSubOptValBModel.Value = catSubjOptVal.CatalogSubjectOptionValue1;
                        }
                    }
                }
            }
            else
            {
                catSubOptValBModel.ID   = catSubjOpt.CatalogSubjectOptionID;
                catSubOptValBModel.Type = (int)catSubjOpt.ColumnType;
            }
            return(catSubOptValBModel);
        }
    public override void OnInspectorGUI()
    {
        ComboBase combo = target as ComboBase;

        if (combo == null)
        {
            EditorGUILayout.LabelField("WARNING: something in the inspector went wrong!");
            EditorGUILayout.LabelField(" ", " ");
            EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set");

            return;
        }

        EditorGUILayout.LabelField("Script", combo.GetType().ToString());
        EditorGUILayout.LabelField("Guid", combo.GetGuid());
        if (GUILayout.Button("Generate New Guid"))
        {
            ((ComboBase)target).GenerateNewGuid();
        }

        EditorGUILayout.Space();

        combo.GUIReadableName = EditorGUILayout.TextField("GUI Combo Name: ", combo.GUIReadableName);
        EditorGUILayout.LabelField("GUI Combo Description:");
        combo.GUIDescription = EditorGUILayout.TextArea(combo.GUIDescription);

        EditorGUILayout.Space();

        combo.GUIAwardType = (ComboBase.EComboRewardType)EditorGUILayout.EnumPopup("Reward to give:", combo.GUIAwardType);

        switch (combo.GUIAwardType)
        {
        case ComboBase.EComboRewardType.CRT_StaticAmount:
            combo.GUIMoneyReward          = EditorGUILayout.IntField("Money to be given: ", combo.GUIMoneyReward);
            combo.GUIXpReward             = EditorGUILayout.IntField("xp to be given:", combo.GUIXpReward);
            combo.GUIRollBonusPointReward = EditorGUILayout.IntField("Roll Bonus Points to be given:", combo.GUIRollBonusPointReward);
            break;

        case ComboBase.EComboRewardType.CRT_ValueMultiplication:
            combo.GUIMoneyReward          = EditorGUILayout.IntField("Value to be multiplied with for money: ", combo.GUIMoneyReward);
            combo.GUIXpReward             = EditorGUILayout.IntField("Value to be multiplied with for xp: ", combo.GUIXpReward);
            combo.GUIRollBonusPointReward = EditorGUILayout.IntField("Value to be multiplied with for Roll Bonus Points: ", combo.GUIRollBonusPointReward);
            break;

        default:
            EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set");
            EditorGUILayout.LabelField(" ", " ");
            EditorGUILayout.LabelField("WARNING: Reward type has not been set", "WARNING: Reward type has not been set");

            break;
        }

        //base.OnInspectorGUI();
    }
    public void ComboTestValue()
    {
        ComboBase comboType      = ScriptableObject.CreateInstance <DiceValue>();
        const int diceCount      = 5;
        const int expectedCombos = diceCount;
        var       gameObject     = new GameObject();

        List <Dice> diceList = new List <Dice>();

        for (int i = 0; i < diceCount; i++)
        {
            diceList.Add(gameObject.AddComponent <Dice>());
            diceList[i].TestRollValueSetter(i);
        }

        Assert.AreEqual(expectedCombos, comboType.CheckCombo(diceList, false), 0);
    }
Example #5
0
        private void InitializeComponent()
        {
            this.components = (IContainer) new System.ComponentModel.Container();
            ResourceManager resourceManager = new ResourceManager(typeof(frmConfigurarPrestaciones));

            this.GroupBox2              = new GroupBox();
            this.dgDatos                = new DataGrid();
            this.DataGridTableStyle1    = new DataGridTableStyle();
            this.DataGridTextBoxColumn1 = new DataGridTextBoxColumn();
            this.DataGridTextBoxColumn2 = new DataGridTextBoxColumn();
            this.DataGridTextBoxColumn3 = new DataGridTextBoxColumn();
            this.txtMonto               = new txtNumeroDecimal();
            this.Label8        = new Label();
            this.Label7        = new Label();
            this.cboPrestacion = new ComboBase(this.components);
            this.btnCancelar   = new Button();
            this.btnQuitar     = new Button();
            this.btnAgregar    = new Button();
            this.btnAceptar    = new Button();
            this.GroupBox1     = new GroupBox();
            this.cboStatus     = new ComboBox();
            this.Label5        = new Label();
            this.dtpFInicio    = new DateTimePicker();
            this.Label2        = new Label();
            this.txtCliente    = new txtNumeroEntero();
            this.btnBuscar     = new Button();
            this.lblRuta       = new Label();
            this.Label12       = new Label();
            this.Label1        = new Label();
            this.lblCliente    = new Label();
            this.Label3        = new Label();
            this.GroupBox2.SuspendLayout();
            this.dgDatos.BeginInit();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.GroupBox2.Controls.AddRange(new Control[5]
            {
                (Control)this.dgDatos,
                (Control)this.txtMonto,
                (Control)this.Label8,
                (Control)this.Label7,
                (Control)this.cboPrestacion
            });
            GroupBox groupBox2_1 = this.GroupBox2;
            Point    point1      = new Point(11, 192);
            Point    point2      = point1;

            groupBox2_1.Location = point2;
            this.GroupBox2.Name  = "GroupBox2";
            GroupBox groupBox2_2 = this.GroupBox2;
            Size     size1       = new Size(488, 192);
            Size     size2       = size1;

            groupBox2_2.Size             = size2;
            this.GroupBox2.TabIndex      = 12;
            this.GroupBox2.TabStop       = false;
            this.dgDatos.DataMember      = "";
            this.dgDatos.HeaderForeColor = SystemColors.ControlText;
            DataGrid dgDatos1 = this.dgDatos;

            point1 = new Point(128, 74);
            Point point3 = point1;

            dgDatos1.Location     = point3;
            this.dgDatos.Name     = "dgDatos";
            this.dgDatos.ReadOnly = true;
            DataGrid dgDatos2 = this.dgDatos;

            size1 = new Size(352, 112);
            Size size3 = size1;

            dgDatos2.Size         = size3;
            this.dgDatos.TabIndex = 68;
            this.dgDatos.TableStyles.AddRange(new DataGridTableStyle[1]
            {
                this.DataGridTableStyle1
            });
            this.dgDatos.TabStop = false;
            this.DataGridTableStyle1.DataGrid = this.dgDatos;
            this.DataGridTableStyle1.GridColumnStyles.AddRange(new DataGridColumnStyle[3]
            {
                (DataGridColumnStyle)this.DataGridTextBoxColumn1,
                (DataGridColumnStyle)this.DataGridTextBoxColumn2,
                (DataGridColumnStyle)this.DataGridTextBoxColumn3
            });
            this.DataGridTableStyle1.HeaderForeColor = SystemColors.ControlText;
            this.DataGridTableStyle1.MappingName     = "";
            this.DataGridTableStyle1.ReadOnly        = true;
            this.DataGridTextBoxColumn1.Format       = "";
            this.DataGridTextBoxColumn1.FormatInfo   = (IFormatProvider)null;
            this.DataGridTextBoxColumn1.HeaderText   = "Prestacion";
            this.DataGridTextBoxColumn1.MappingName  = "Prestacion";
            this.DataGridTextBoxColumn1.ReadOnly     = true;
            this.DataGridTextBoxColumn1.Width        = 120;
            this.DataGridTextBoxColumn2.Format       = "";
            this.DataGridTextBoxColumn2.FormatInfo   = (IFormatProvider)null;
            this.DataGridTextBoxColumn2.HeaderText   = "Monto";
            this.DataGridTextBoxColumn2.MappingName  = "Monto";
            this.DataGridTextBoxColumn2.ReadOnly     = true;
            this.DataGridTextBoxColumn2.Width        = 75;
            this.DataGridTextBoxColumn3.Format       = "";
            this.DataGridTextBoxColumn3.FormatInfo   = (IFormatProvider)null;
            this.DataGridTextBoxColumn3.MappingName  = "Identificador";
            this.DataGridTextBoxColumn3.ReadOnly     = true;
            this.DataGridTextBoxColumn3.Width        = 0;
            txtNumeroDecimal txtMonto1 = this.txtMonto;

            point1 = new Point(128, 45);
            Point point4 = point1;

            ((Control)txtMonto1).Location = point4;
            ((Control)this.txtMonto).Name = "txtMonto";
            txtNumeroDecimal txtMonto2 = this.txtMonto;

            size1 = new Size(216, 21);
            Size size4 = size1;

            ((Control)txtMonto2).Size         = size4;
            ((Control)this.txtMonto).TabIndex = 6;
            ((TextBox)this.txtMonto).Text     = "";
            this.Label8.AutoSize = true;
            Label label8_1 = this.Label8;

            point1 = new Point(16, 49);
            Point point5 = point1;

            label8_1.Location = point5;
            this.Label8.Name  = "Label8";
            Label label8_2 = this.Label8;

            size1 = new Size(82, 14);
            Size size5 = size1;

            label8_2.Size         = size5;
            this.Label8.TabIndex  = 66;
            this.Label8.Text      = "Monto con IVA:";
            this.Label8.TextAlign = ContentAlignment.MiddleLeft;
            this.Label7.AutoSize  = true;
            Label label7_1 = this.Label7;

            point1 = new Point(16, 22);
            Point point6 = point1;

            label7_1.Location = point6;
            this.Label7.Name  = "Label7";
            Label label7_2 = this.Label7;

            size1 = new Size(62, 14);
            Size size6 = size1;

            label7_2.Size         = size6;
            this.Label7.TabIndex  = 64;
            this.Label7.Text      = "Percepción:";
            this.Label7.TextAlign = ContentAlignment.MiddleLeft;
            ((ComboBox)this.cboPrestacion).DropDownStyle = ComboBoxStyle.DropDownList;
            ComboBase cboPrestacion1 = this.cboPrestacion;

            point1 = new Point(128, 16);
            Point point7 = point1;

            ((Control)cboPrestacion1).Location = point7;
            ((Control)this.cboPrestacion).Name = "cboPrestacion";
            ComboBase cboPrestacion2 = this.cboPrestacion;

            size1 = new Size(216, 21);
            Size size7 = size1;

            ((Control)cboPrestacion2).Size         = size7;
            ((Control)this.cboPrestacion).TabIndex = 17;
            this.btnCancelar.DialogResult          = DialogResult.Cancel;
            this.btnCancelar.Image      = (Image)resourceManager.GetObject("btnCancelar.Image");
            this.btnCancelar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnCancelar = this.btnCancelar;

            point1 = new Point(513, 47);
            Point point8 = point1;

            btnCancelar.Location       = point8;
            this.btnCancelar.Name      = "btnCancelar";
            this.btnCancelar.TabIndex  = 16;
            this.btnCancelar.Text      = "&Cancelar";
            this.btnCancelar.TextAlign = ContentAlignment.MiddleRight;
            this.btnQuitar.Font        = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.btnQuitar.Image       = (Image)resourceManager.GetObject("btnQuitar.Image");
            this.btnQuitar.ImageAlign  = ContentAlignment.MiddleLeft;
            Button btnQuitar = this.btnQuitar;

            point1 = new Point(513, 233);
            Point point9 = point1;

            btnQuitar.Location         = point9;
            this.btnQuitar.Name        = "btnQuitar";
            this.btnQuitar.TabIndex    = 14;
            this.btnQuitar.TabStop     = false;
            this.btnQuitar.Text        = "&Quitar";
            this.btnQuitar.TextAlign   = ContentAlignment.MiddleRight;
            this.btnAgregar.Font       = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.btnAgregar.Image      = (Image)resourceManager.GetObject("btnAgregar.Image");
            this.btnAgregar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnAgregar = this.btnAgregar;

            point1 = new Point(513, 201);
            Point point10 = point1;

            btnAgregar.Location        = point10;
            this.btnAgregar.Name       = "btnAgregar";
            this.btnAgregar.TabIndex   = 13;
            this.btnAgregar.Text       = "A&gregar";
            this.btnAgregar.TextAlign  = ContentAlignment.MiddleRight;
            this.btnAceptar.Image      = (Image)resourceManager.GetObject("btnAceptar.Image");
            this.btnAceptar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnAceptar = this.btnAceptar;

            point1 = new Point(513, 15);
            Point point11 = point1;

            btnAceptar.Location       = point11;
            this.btnAceptar.Name      = "btnAceptar";
            this.btnAceptar.TabIndex  = 15;
            this.btnAceptar.Text      = "&Aceptar";
            this.btnAceptar.TextAlign = ContentAlignment.MiddleRight;
            this.GroupBox1.Controls.AddRange(new Control[11]
            {
                (Control)this.cboStatus,
                (Control)this.Label5,
                (Control)this.dtpFInicio,
                (Control)this.Label2,
                (Control)this.txtCliente,
                (Control)this.btnBuscar,
                (Control)this.lblRuta,
                (Control)this.Label12,
                (Control)this.Label1,
                (Control)this.lblCliente,
                (Control)this.Label3
            });
            GroupBox groupBox1_1 = this.GroupBox1;

            point1 = new Point(11, 11);
            Point point12 = point1;

            groupBox1_1.Location = point12;
            this.GroupBox1.Name  = "GroupBox1";
            GroupBox groupBox1_2 = this.GroupBox1;

            size1 = new Size(488, 173);
            Size size8 = size1;

            groupBox1_2.Size             = size8;
            this.GroupBox1.TabIndex      = 11;
            this.GroupBox1.TabStop       = false;
            this.cboStatus.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cboStatus.Items.AddRange(new object[2]
            {
                (object)"ACTIVO",
                (object)"INACTIVO"
            });
            ComboBox cboStatus1 = this.cboStatus;

            point1 = new Point(128, 137);
            Point point13 = point1;

            cboStatus1.Location = point13;
            this.cboStatus.Name = "cboStatus";
            ComboBox cboStatus2 = this.cboStatus;

            size1 = new Size(216, 21);
            Size size9 = size1;

            cboStatus2.Size         = size9;
            this.cboStatus.TabIndex = 4;
            this.Label5.AutoSize    = true;
            this.Label5.Font        = new Font("Tahoma", 8f, FontStyle.Bold);
            Label label5_1 = this.Label5;

            point1 = new Point(16, 140);
            Point point14 = point1;

            label5_1.Location = point14;
            this.Label5.Name  = "Label5";
            Label label5_2 = this.Label5;

            size1 = new Size(43, 13);
            Size size10 = size1;

            label5_2.Size         = size10;
            this.Label5.TabIndex  = 74;
            this.Label5.Text      = "Status:";
            this.Label5.TextAlign = ContentAlignment.MiddleLeft;
            DateTimePicker dtpFinicio1 = this.dtpFInicio;

            point1 = new Point(128, 108);
            Point point15 = point1;

            dtpFinicio1.Location = point15;
            this.dtpFInicio.Name = "dtpFInicio";
            DateTimePicker dtpFinicio2 = this.dtpFInicio;

            size1 = new Size(216, 21);
            Size size11 = size1;

            dtpFinicio2.Size         = size11;
            this.dtpFInicio.TabIndex = 1;
            this.Label2.AutoSize     = true;
            this.Label2.Font         = new Font("Tahoma", 8f, FontStyle.Bold);
            Label label2_1 = this.Label2;

            point1 = new Point(16, 113);
            Point point16 = point1;

            label2_1.Location = point16;
            this.Label2.Name  = "Label2";
            Label label2_2 = this.Label2;

            size1 = new Size(101, 13);
            Size size12 = size1;

            label2_2.Size         = size12;
            this.Label2.TabIndex  = 70;
            this.Label2.Text      = "Fecha prestación:";
            this.Label2.TextAlign = ContentAlignment.MiddleLeft;
            txtNumeroEntero txtCliente1 = this.txtCliente;

            point1 = new Point(128, 28);
            Point point17 = point1;

            ((Control)txtCliente1).Location = point17;
            ((Control)this.txtCliente).Name = "txtCliente";
            txtNumeroEntero txtCliente2 = this.txtCliente;

            size1 = new Size(216, 21);
            Size size13 = size1;

            ((Control)txtCliente2).Size         = size13;
            ((Control)this.txtCliente).TabIndex = 0;
            ((TextBox)this.txtCliente).Text     = "";
            this.btnBuscar.Anchor     = AnchorStyles.Top | AnchorStyles.Right;
            this.btnBuscar.BackColor  = SystemColors.Control;
            this.btnBuscar.Image      = (Image)resourceManager.GetObject("btnBuscar.Image");
            this.btnBuscar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnBuscar = this.btnBuscar;

            point1 = new Point(402, 30);
            Point point18 = point1;

            btnBuscar.Location       = point18;
            this.btnBuscar.Name      = "btnBuscar";
            this.btnBuscar.TabIndex  = 68;
            this.btnBuscar.TabStop   = false;
            this.btnBuscar.Text      = "&Buscar";
            this.btnBuscar.TextAlign = ContentAlignment.MiddleRight;
            this.lblRuta.BorderStyle = BorderStyle.Fixed3D;
            Label lblRuta1 = this.lblRuta;

            point1 = new Point(128, 80);
            Point point19 = point1;

            lblRuta1.Location = point19;
            this.lblRuta.Name = "lblRuta";
            Label lblRuta2 = this.lblRuta;

            size1 = new Size(352, 21);
            Size size14 = size1;

            lblRuta2.Size          = size14;
            this.lblRuta.TabIndex  = 65;
            this.lblRuta.TextAlign = ContentAlignment.MiddleLeft;
            this.Label12.AutoSize  = true;
            this.Label12.Font      = new Font("Tahoma", 8f, FontStyle.Bold);
            Label label12_1 = this.Label12;

            point1 = new Point(16, 32);
            Point point20 = point1;

            label12_1.Location = point20;
            this.Label12.Name  = "Label12";
            Label label12_2 = this.Label12;

            size1 = new Size(109, 13);
            Size size15 = size1;

            label12_2.Size         = size15;
            this.Label12.TabIndex  = 64;
            this.Label12.Text      = "Número de cliente:";
            this.Label12.TextAlign = ContentAlignment.MiddleLeft;
            this.Label1.AutoSize   = true;
            Label label1_1 = this.Label1;

            point1 = new Point(16, 86);
            Point point21 = point1;

            label1_1.Location = point21;
            this.Label1.Name  = "Label1";
            Label label1_2 = this.Label1;

            size1 = new Size(31, 14);
            Size size16 = size1;

            label1_2.Size               = size16;
            this.Label1.TabIndex        = 63;
            this.Label1.Text            = "Ruta:";
            this.Label1.TextAlign       = ContentAlignment.MiddleLeft;
            this.lblCliente.BorderStyle = BorderStyle.Fixed3D;
            Label lblCliente1 = this.lblCliente;

            point1 = new Point(128, 56);
            Point point22 = point1;

            lblCliente1.Location = point22;
            this.lblCliente.Name = "lblCliente";
            Label lblCliente2 = this.lblCliente;

            size1 = new Size(352, 21);
            Size size17 = size1;

            lblCliente2.Size          = size17;
            this.lblCliente.TabIndex  = 67;
            this.lblCliente.TextAlign = ContentAlignment.MiddleLeft;
            this.Label3.AutoSize      = true;
            Label label3_1 = this.Label3;

            point1 = new Point(16, 59);
            Point point23 = point1;

            label3_1.Location = point23;
            this.Label3.Name  = "Label3";
            Label label3_2 = this.Label3;

            size1 = new Size(42, 14);
            Size size18 = size1;

            label3_2.Size         = size18;
            this.Label3.TabIndex  = 66;
            this.Label3.Text      = "Cliente:";
            this.Label3.TextAlign = ContentAlignment.MiddleLeft;
            size1 = new Size(5, 14);
            this.AutoScaleBaseSize = size1;
            this.CancelButton      = (IButtonControl)this.btnCancelar;
            size1           = new Size(598, 392);
            this.ClientSize = size1;
            this.Controls.AddRange(new Control[6]
            {
                (Control)this.GroupBox2,
                (Control)this.btnCancelar,
                (Control)this.btnQuitar,
                (Control)this.btnAgregar,
                (Control)this.btnAceptar,
                (Control)this.GroupBox1
            });
            this.Font            = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            this.Name            = "frmConfigurarPrestaciones";
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "Configurar percepción";
            this.GroupBox2.ResumeLayout(false);
            this.dgDatos.EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        private void InitializeComponent()
        {
            this.components = (IContainer) new System.ComponentModel.Container();
            ResourceManager resourceManager = new ResourceManager(typeof(frmRegistraDeduccion));

            this.btnCancelar   = new Button();
            this.btnAceptar    = new Button();
            this.GroupBox1     = new GroupBox();
            this.Label7        = new Label();
            this.cboPrestacion = new ComboBase(this.components);
            this.txtMonto      = new txtNumeroDecimal();
            this.Label8        = new Label();
            this.dtpFInicio    = new DateTimePicker();
            this.Label2        = new Label();
            this.txtCliente    = new txtNumeroEntero();
            this.btnBuscar     = new Button();
            this.lblRuta       = new Label();
            this.Label12       = new Label();
            this.Label1        = new Label();
            this.lblCliente    = new Label();
            this.Label3        = new Label();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.btnCancelar.DialogResult = DialogResult.Cancel;
            this.btnCancelar.Image        = (Image)resourceManager.GetObject("btnCancelar.Image");
            this.btnCancelar.ImageAlign   = ContentAlignment.MiddleLeft;
            Button btnCancelar = this.btnCancelar;
            Point  point1      = new Point(513, 48);
            Point  point2      = point1;

            btnCancelar.Location       = point2;
            this.btnCancelar.Name      = "btnCancelar";
            this.btnCancelar.TabIndex  = 22;
            this.btnCancelar.Text      = "&Cancelar";
            this.btnCancelar.TextAlign = ContentAlignment.MiddleRight;
            this.btnAceptar.Image      = (Image)resourceManager.GetObject("btnAceptar.Image");
            this.btnAceptar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnAceptar = this.btnAceptar;

            point1 = new Point(513, 16);
            Point point3 = point1;

            btnAceptar.Location       = point3;
            this.btnAceptar.Name      = "btnAceptar";
            this.btnAceptar.TabIndex  = 21;
            this.btnAceptar.Text      = "&Aceptar";
            this.btnAceptar.TextAlign = ContentAlignment.MiddleRight;
            this.GroupBox1.Controls.AddRange(new Control[13]
            {
                (Control)this.Label7,
                (Control)this.cboPrestacion,
                (Control)this.txtMonto,
                (Control)this.Label8,
                (Control)this.dtpFInicio,
                (Control)this.Label2,
                (Control)this.txtCliente,
                (Control)this.btnBuscar,
                (Control)this.lblRuta,
                (Control)this.Label12,
                (Control)this.Label1,
                (Control)this.lblCliente,
                (Control)this.Label3
            });
            GroupBox groupBox1_1 = this.GroupBox1;

            point1 = new Point(11, 12);
            Point point4 = point1;

            groupBox1_1.Location = point4;
            this.GroupBox1.Name  = "GroupBox1";
            GroupBox groupBox1_2 = this.GroupBox1;
            Size     size1       = new Size(488, 204);
            Size     size2       = size1;

            groupBox1_2.Size        = size2;
            this.GroupBox1.TabIndex = 17;
            this.GroupBox1.TabStop  = false;
            this.Label7.AutoSize    = true;
            Label label7_1 = this.Label7;

            point1 = new Point(15, 114);
            Point point5 = point1;

            label7_1.Location = point5;
            this.Label7.Name  = "Label7";
            Label label7_2 = this.Label7;

            size1 = new Size(60, 14);
            Size size3 = size1;

            label7_2.Size         = size3;
            this.Label7.TabIndex  = 74;
            this.Label7.Text      = "Deducción:";
            this.Label7.TextAlign = ContentAlignment.MiddleLeft;
            ((ComboBox)this.cboPrestacion).DropDownStyle = ComboBoxStyle.DropDownList;
            ComboBase cboPrestacion1 = this.cboPrestacion;

            point1 = new Point((int)sbyte.MaxValue, 108);
            Point point6 = point1;

            ((Control)cboPrestacion1).Location = point6;
            ((Control)this.cboPrestacion).Name = "cboPrestacion";
            ComboBase cboPrestacion2 = this.cboPrestacion;

            size1 = new Size(216, 21);
            Size size4 = size1;

            ((Control)cboPrestacion2).Size         = size4;
            ((Control)this.cboPrestacion).TabIndex = 1;
            txtNumeroDecimal txtMonto1 = this.txtMonto;

            point1 = new Point(128, 168);
            Point point7 = point1;

            ((Control)txtMonto1).Location = point7;
            ((Control)this.txtMonto).Name = "txtMonto";
            txtNumeroDecimal txtMonto2 = this.txtMonto;

            size1 = new Size(216, 21);
            Size size5 = size1;

            ((Control)txtMonto2).Size         = size5;
            ((Control)this.txtMonto).TabIndex = 3;
            ((TextBox)this.txtMonto).Text     = "";
            this.Label8.AutoSize = true;
            Label label8_1 = this.Label8;

            point1 = new Point(16, 172);
            Point point8 = point1;

            label8_1.Location = point8;
            this.Label8.Name  = "Label8";
            Label label8_2 = this.Label8;

            size1 = new Size(39, 14);
            Size size6 = size1;

            label8_2.Size         = size6;
            this.Label8.TabIndex  = 72;
            this.Label8.Text      = "Monto:";
            this.Label8.TextAlign = ContentAlignment.MiddleLeft;
            DateTimePicker dtpFinicio1 = this.dtpFInicio;

            point1 = new Point(128, 138);
            Point point9 = point1;

            dtpFinicio1.Location = point9;
            this.dtpFInicio.Name = "dtpFInicio";
            DateTimePicker dtpFinicio2 = this.dtpFInicio;

            size1 = new Size(216, 21);
            Size size7 = size1;

            dtpFinicio2.Size         = size7;
            this.dtpFInicio.TabIndex = 2;
            this.Label2.AutoSize     = true;
            this.Label2.Font         = new Font("Tahoma", 8f, FontStyle.Bold);
            Label label2_1 = this.Label2;

            point1 = new Point(16, 143);
            Point point10 = point1;

            label2_1.Location = point10;
            this.Label2.Name  = "Label2";
            Label label2_2 = this.Label2;

            size1 = new Size(84, 13);
            Size size8 = size1;

            label2_2.Size         = size8;
            this.Label2.TabIndex  = 70;
            this.Label2.Text      = "Fecha trámite:";
            this.Label2.TextAlign = ContentAlignment.MiddleLeft;
            txtNumeroEntero txtCliente1 = this.txtCliente;

            point1 = new Point(128, 28);
            Point point11 = point1;

            ((Control)txtCliente1).Location = point11;
            ((Control)this.txtCliente).Name = "txtCliente";
            txtNumeroEntero txtCliente2 = this.txtCliente;

            size1 = new Size(216, 21);
            Size size9 = size1;

            ((Control)txtCliente2).Size         = size9;
            ((Control)this.txtCliente).TabIndex = 0;
            ((TextBox)this.txtCliente).Text     = "";
            this.btnBuscar.Anchor     = AnchorStyles.Top | AnchorStyles.Right;
            this.btnBuscar.BackColor  = SystemColors.Control;
            this.btnBuscar.Image      = (Image)resourceManager.GetObject("btnBuscar.Image");
            this.btnBuscar.ImageAlign = ContentAlignment.MiddleLeft;
            Button btnBuscar = this.btnBuscar;

            point1 = new Point(404, 29);
            Point point12 = point1;

            btnBuscar.Location       = point12;
            this.btnBuscar.Name      = "btnBuscar";
            this.btnBuscar.TabIndex  = 68;
            this.btnBuscar.TabStop   = false;
            this.btnBuscar.Text      = "&Buscar";
            this.btnBuscar.TextAlign = ContentAlignment.MiddleRight;
            this.lblRuta.BorderStyle = BorderStyle.Fixed3D;
            Label lblRuta1 = this.lblRuta;

            point1 = new Point(128, 80);
            Point point13 = point1;

            lblRuta1.Location = point13;
            this.lblRuta.Name = "lblRuta";
            Label lblRuta2 = this.lblRuta;

            size1 = new Size(352, 21);
            Size size10 = size1;

            lblRuta2.Size          = size10;
            this.lblRuta.TabIndex  = 65;
            this.lblRuta.TextAlign = ContentAlignment.MiddleLeft;
            this.Label12.AutoSize  = true;
            this.Label12.Font      = new Font("Tahoma", 8f, FontStyle.Bold);
            Label label12_1 = this.Label12;

            point1 = new Point(16, 32);
            Point point14 = point1;

            label12_1.Location = point14;
            this.Label12.Name  = "Label12";
            Label label12_2 = this.Label12;

            size1 = new Size(109, 13);
            Size size11 = size1;

            label12_2.Size         = size11;
            this.Label12.TabIndex  = 64;
            this.Label12.Text      = "Número de cliente:";
            this.Label12.TextAlign = ContentAlignment.MiddleLeft;
            this.Label1.AutoSize   = true;
            Label label1_1 = this.Label1;

            point1 = new Point(16, 86);
            Point point15 = point1;

            label1_1.Location = point15;
            this.Label1.Name  = "Label1";
            Label label1_2 = this.Label1;

            size1 = new Size(31, 14);
            Size size12 = size1;

            label1_2.Size               = size12;
            this.Label1.TabIndex        = 63;
            this.Label1.Text            = "Ruta:";
            this.Label1.TextAlign       = ContentAlignment.MiddleLeft;
            this.lblCliente.BorderStyle = BorderStyle.Fixed3D;
            Label lblCliente1 = this.lblCliente;

            point1 = new Point(128, 56);
            Point point16 = point1;

            lblCliente1.Location = point16;
            this.lblCliente.Name = "lblCliente";
            Label lblCliente2 = this.lblCliente;

            size1 = new Size(352, 21);
            Size size13 = size1;

            lblCliente2.Size          = size13;
            this.lblCliente.TabIndex  = 67;
            this.lblCliente.TextAlign = ContentAlignment.MiddleLeft;
            this.Label3.AutoSize      = true;
            Label label3_1 = this.Label3;

            point1 = new Point(16, 59);
            Point point17 = point1;

            label3_1.Location = point17;
            this.Label3.Name  = "Label3";
            Label label3_2 = this.Label3;

            size1 = new Size(42, 14);
            Size size14 = size1;

            label3_2.Size         = size14;
            this.Label3.TabIndex  = 66;
            this.Label3.Text      = "Cliente:";
            this.Label3.TextAlign = ContentAlignment.MiddleLeft;
            size1 = new Size(5, 14);
            this.AutoScaleBaseSize = size1;
            this.CancelButton      = (IButtonControl)this.btnCancelar;
            size1           = new Size(598, 232);
            this.ClientSize = size1;
            this.Controls.AddRange(new Control[3]
            {
                (Control)this.btnCancelar,
                (Control)this.btnAceptar,
                (Control)this.GroupBox1
            });
            this.Font            = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.Name            = "frmRegistraDeduccion";
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "Registrar deducción";
            this.GroupBox1.ResumeLayout(false);
            this.ResumeLayout(false);
        }
    public void ConnectCombo(ComboBase combo)
    {
        m_comboNameText.text = combo.GetReadableName();

        //set combo description
        m_comboDescription.text = combo.GetDescription();


        //create string of reward numbers
        string c_rewardNumber = "";

        //get gold reward else disable gold text
        if (combo.GetMoneyReward() > 0)
        {
            c_rewardNumber += combo.GetMoneyReward().ToString() + ", ";
            m_gold.SetActive(true);
        }
        else
        {
            m_gold.SetActive(false);
        }

        //get XP reward else disable XP text
        if (combo.GetXPReward() > 0)
        {
            c_rewardNumber += combo.GetXPReward().ToString() + ", ";
            m_XP.SetActive(true);
        }
        else
        {
            m_XP.SetActive(false);
        }

        //get RBP reward else disable RBP text
        if (combo.GetRollBonusPointReward() > 0)
        {
            c_rewardNumber += combo.GetRollBonusPointReward().ToString() + ", ";
            m_RBP.SetActive(true);
        }
        else
        {
            m_RBP.SetActive(false);
        }

        c_rewardNumber = c_rewardNumber.Substring(0, c_rewardNumber.Length - 2);

        m_comboRewardNumber.text = c_rewardNumber;

        //enable correct reward type
        switch (combo.GetRewardType())
        {
        case ComboBase.EComboRewardType.CRT_NotSet:
            m_multiplier.SetActive(false);
            m_bonus.SetActive(false);
            break;

        case ComboBase.EComboRewardType.CRT_StaticAmount:
            m_multiplier.SetActive(false);
            m_bonus.SetActive(true);
            break;

        case ComboBase.EComboRewardType.CRT_ValueMultiplication:
            m_multiplier.SetActive(true);
            m_bonus.SetActive(false);
            break;
        }
    }