Example #1
0
        protected void cbTipoReferenciaGeografica_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbTipoReferenciaGeografica.Selected <= 0)
            {
                return;
            }

            var tipo = DAOFactory.TipoReferenciaGeograficaDAO.FindById(cbTipoReferenciaGeografica.Selected);

            if (tipo.Icono != null)
            {
                SelectIcon2.Selected = tipo.Icono.Id;
                EditGeoRef1.SetIcono(Config.Directory.IconDir + tipo.Icono.PathIcono, tipo.Icono.Width, tipo.Icono.Height, tipo.Icono.OffsetX, tipo.Icono.OffsetY);
            }
            else
            {
                SelectIcon2.Selected = -1;
                EditGeoRef1.ClearIcono();
            }
            if (tipo.Color != null)
            {
                cpColor.Color     = tipo.Color.HexValue;
                EditGeoRef1.Color = tipo.Color.Color;
            }
            updColor.Update();
            updTipoGeoRef.Update();
            updSelectIcon.Update();
        }
Example #2
0
        protected void cbTipoReferenciaGeografica_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbTipoReferenciaGeografica.Selected <= 0)
            {
                return;
            }

            var tipo = DAOFactory.TipoReferenciaGeograficaDAO.FindById(cbTipoReferenciaGeografica.Selected);

            if (tipo.Icono != null)
            {
                SelectIcon2.Selected = tipo.Icono.Id;
                EditGeoRef1.SetIcono(Config.Directory.IconDir + tipo.Icono.PathIcono, tipo.Icono.Width, tipo.Icono.Height, tipo.Icono.OffsetX, tipo.Icono.OffsetY);
            }
            else
            {
                SelectIcon2.Selected = -1;
                EditGeoRef1.ClearIcono();
            }

            if (tipo.Color != null)
            {
                cpColor.Color     = tipo.Color.HexValue;
                EditGeoRef1.Color = tipo.Color.Color;
            }

            chkControlaVelocidad.Checked = tipo.ControlaVelocidad;
            chkControlaES.Checked        = tipo.ControlaEntradaSalida;
            chkZonaRiesgo.Checked        = tipo.EsZonaDeRiesgo;
            chkInhibeAlarma.Checked      = tipo.InhibeAlarma;
            chkInicio.Checked            = tipo.EsInicio;
            chkIntermedio.Checked        = tipo.EsIntermedio;
            chkFin.Checked = tipo.EsFin;

            panelVelocidades.Visible = chkControlaVelocidad.Checked;
            BindTiposVehiculo();
            GetVelocidadesParent();

            updComportamiento.Update();
        }