Ejemplo n.º 1
0
        public Fuente DeleteFuente(Fuente fuente)
        {
            context.Fuentes.Remove(fuente);
            context.SaveChanges();

            return(fuente);
        }
Ejemplo n.º 2
0
        public Fuente UpdateFuente(Fuente fuente)
        {
            context.Entry(fuente).State = System.Data.Entity.EntityState.Modified;
            context.SaveChanges();

            return(fuente);
        }
Ejemplo n.º 3
0
    // Constructor
    public Mapa(Partida p)
    {
        listaNiveles = new Nivel[MAX_NIVELES];
        listaNiveles[0] = new Nivel01();
        listaNiveles[1] = new Nivel02();
        listaNiveles[2] = new Nivel03();
        listaNiveles[3] = new Nivel04();
        listaNiveles[4] = new Nivel05();
        listaNiveles[5] = new Nivel06();
        listaNiveles[6] = new Nivel07();
        listaNiveles[7] = new Nivel08();
        listaNiveles[8] = new Nivel09();
        listaNiveles[9] = new Nivel10();
        listaNiveles[10] = new Nivel11();
        listaNiveles[11] = new Nivel12();
        listaNiveles[12] = new Nivel13();
        listaNiveles[13] = new Nivel14();
        listaNiveles[14] = new Nivel15();
        listaNiveles[15] = new Nivel16();
        listaNiveles[16] = new Nivel17();
        listaNiveles[17] = new Nivel18();
        listaNiveles[18] = new Nivel19();
        listaNiveles[19] = new Nivel20();

        nivelActual = listaNiveles[ numeroNivelActual ];
        fuente18 = new Fuente("FreeSansBold.ttf", 18);
    }
Ejemplo n.º 4
0
        public Fuente AddFuente(Fuente fuente)
        {
            context.Fuentes.Add(fuente);
            context.SaveChanges();

            return(fuente);
        }
    public List <DireccionEntrega> BusquedaDireccionEntrega(Fuente FuenteDatos, int?IDCliente, int IDEmpresa, int?Sucursal, string Telefono,
                                                            string CalleNombre, string ColoniaNombre, string MunicipioNombre, string Nombre, int?NumExterior,
                                                            string NumInterior, int?TipoServicio, int?Zona, int?Ruta, int?ZonaEconomica,
                                                            int?ZonaLecturista, bool Portatil, string Usuario, string Referencia, int?IDAutotanque = null, DateTime?FechaConsulta = null)
    {
        Fuente locFuenteDatos = FuenteDatos;

        if (Portatil)
        {
            locFuenteDatos = Fuente.SigametPortatil;
        }

        Consulta consulta = new ConsultaCreator().FactoryMethod(IDEmpresa, locFuenteDatos);
        //
        List <DireccionEntrega> direccionesEntrega = new List <DireccionEntrega>();

        try
        {
            direccionesEntrega = consulta.BusquedaDireccionEntrega(IDCliente, IDEmpresa, Sucursal, Telefono, CalleNombre,
                                                                   ColoniaNombre, MunicipioNombre, Nombre, NumExterior, NumInterior,
                                                                   TipoServicio, Zona, Ruta, ZonaEconomica, ZonaLecturista,
                                                                   Usuario, Referencia, IDAutotanque, FechaConsulta);

            if (!consulta.Success)
            {
                throw new Exception(consulta.InternalException);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }

        return(direccionesEntrega);
    }
Ejemplo n.º 6
0
    Fuente fuente18;   // Tipo de letra para mensajes

    // Constructor
    public Mapa(Partida p)
    {
        listaNiveles     = new Nivel[MAX_NIVELES];
        listaNiveles[0]  = new Nivel01();
        listaNiveles[1]  = new Nivel02();
        listaNiveles[2]  = new Nivel03();
        listaNiveles[3]  = new Nivel04();
        listaNiveles[4]  = new Nivel05();
        listaNiveles[5]  = new Nivel06();
        listaNiveles[6]  = new Nivel07();
        listaNiveles[7]  = new Nivel08();
        listaNiveles[8]  = new Nivel09();
        listaNiveles[9]  = new Nivel10();
        listaNiveles[10] = new Nivel11();
        listaNiveles[11] = new Nivel12();
        listaNiveles[12] = new Nivel13();
        listaNiveles[13] = new Nivel14();
        listaNiveles[14] = new Nivel15();
        listaNiveles[15] = new Nivel16();
        listaNiveles[16] = new Nivel17();
        listaNiveles[17] = new Nivel18();
        listaNiveles[18] = new Nivel19();
        listaNiveles[19] = new Nivel20();


        nivelActual = listaNiveles[numeroNivelActual];
        fuente18    = new Fuente("FreeSansBold.ttf", 18);
    }
        private async void _btnActualizar_Click(object sender, EventArgs e)
        {
            if (_fuenteSeleccionada != null)
            {
                try
                {
                    var fuente = new Fuente()
                    {
                        Id     = _fuenteSeleccionada.Id,
                        Nombre = _nombre.Text
                    };
                    await _fuenteService.ActualizarFuente(_fuenteSeleccionada.Id, fuente);

                    Toast.MakeText(this.Activity, "Se ha actualizado la fuente correctamente.", ToastLength.Long)
                    .Show();
                    LimpiarCampos();
                }
                catch
                {
                    Toast.MakeText(this.Activity, "Hubo un problema al tratar de actualizar la fuente. Intente de nuevo mas tarde.",
                                   ToastLength.Long).Show();
                }

                ActualizarFuentes();
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Ons the create.
        /// </summary>
        /// <param name="savedInstanceState">Saved instance state.</param>
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            if (WindowManager.DefaultDisplay.Rotation == SurfaceOrientation.Rotation0 ||
                WindowManager.DefaultDisplay.Rotation == SurfaceOrientation.Rotation180)
            {
                SetContentView(Resource.Layout.home_agrega_producto_activity);
            }
            else
            {
                SetContentView(Resource.Layout.home_agrega_producto_horizontal_activity);
            }
            imgIcProductoAgregado                   = FindViewById <ImageView>(Resource.Id.imgIcProductoAgregado);
            animationVisible                        = AnimationUtils.LoadAnimation(this, Resource.Animation.box_amination_visible);
            animationInvisible                      = AnimationUtils.LoadAnimation(this, Resource.Animation.box_amination_invisible);
            btnCerrar                               = FindViewById <Button>(Resource.Id.btnCerrar);
            btnVolver                               = FindViewById <ImageView>(Resource.Id.btnVolver);
            btnLogout                               = FindViewById <ImageButton>(Resource.Id.btnLogout);
            btnHomeAgregarProducto                  = FindViewById <ImageButton>(Resource.Id.btnHomeAgregarProducto);
            btnHomeProductoPendientes               = FindViewById <ImageButton>(Resource.Id.btnHomeProductoPendientes);
            linearLayoutProductoAgregadoOK          = FindViewById <LinearLayout>(Resource.Id.linearLayoutProductoAgregadoOK);
            linearLayoutBtnIrAMapasDeTienda         = FindViewById <LinearLayout>(Resource.Id.linearLayoutBtnIrAMapasDeTienda);
            linearLayoutEtiquetaProductosNoEnviados = FindViewById <LinearLayout>(Resource.Id.linearLayoutEtiquetaProductosNoEnviados);
            lblNombreProducto                       = FindViewById <TextView>(Resource.Id.lblNombreProducto);
            lblCantidadProductosKg                  = FindViewById <TextView>(Resource.Id.lblCantidadProductoKg);
            lblNombreUsuarioToolbar                 = FindViewById <TextView>(Resource.Id.lblNombreUsuarioToolbar);
            lblMensajeCargaYContadorDeProductosPendientesACargar = FindViewById <TextView>(Resource.Id.lblMensajeCargaYContadorDeProductosPendientesACargar);
            lblNombreActivity                      = FindViewById <TextView>(Resource.Id.lblNombreActivity);
            lblNombreTienda                        = FindViewById <TextView>(Resource.Id.lblNombreTienda);
            lblTipoTienda                          = FindViewById <TextView>(Resource.Id.lblTipoTienda);
            linearLayoutBtnCambiarUser             = FindViewById <LinearLayout>(Resource.Id.linearLayoutBtnCambiarUser);
            linearLayoutBtnCambiarUser.Click      += LinearLayoutBtnCambiarUser_Click;
            lblNombreActivity.Text                 = "Productos Refresh";
            btnVolver.Visibility                   = ViewStates.Invisible;
            btnHomeAgregarProducto.Click          += BtnHomeAgregarProducto_Click;
            btnHomeProductoPendientes.Click       += BtnHomeProductoPendientes_Click;
            btnCerrar.Click                       += BtnCerrar_Click;
            linearLayoutBtnIrAMapasDeTienda.Click += LinearLayoutBtnIrAMapasDeTienda_Click;
            string nombreSucursal = dataSucursal.FirstOrDefault().name.ToString();
            string tipoSucursal   = dataSucursal.FirstOrDefault().format.ToString();

            lblNombreTienda.Text = nombreSucursal;
            lblTipoTienda.Text   = tipoSucursal;
            fuente            = new Fuente(this);
            fontRobotoRegular = fuente.fuenteRobotoRegular();
            fontRobotoMedium  = fuente.fuenteRobotoMedium();
            tipografiasEnBotones(btnCerrar);
            tipografiasEnTextView(lblNombreProducto, lblCantidadProductosKg, lblMensajeCargaYContadorDeProductosPendientesACargar);
            ActivityContexts.homeAddActivity = this;
            linearLayoutEtiquetaProductosNoEnviados.Visibility = ViewStates.Invisible;
            if (string.IsNullOrEmpty(DataManager.nombreUsuario))
            {
                IngresoUsuarioResponsableActivity.viewFormularioUser(this);
            }
            nombreUsuarioToolbar();
            AnalyticService.TrackAnalytics("Home app", new Dictionary <string, string> {
                { "Category", "sucursal asignada " + nombreSucursal + ", " + tipoSucursal },
                { "Action", "OnCreate" }
            });
        }
Ejemplo n.º 9
0
        public static void ModificarFuente(Fuente fuente)
        {
            int resultado = 0;

            if (fuente is Periodista)
            {
                ValidarPeriodista(fuente);
                resultado = PersistenciaPeriodista.ModificarPeriodista((Periodista)fuente);
                if (resultado == -1)
                {
                    throw new ExcepcionLogica("No se encontró un periodista con ese identificador.");
                }
            }
            else if (fuente is Agencia)
            {
                ValidarAgencia(fuente);
                resultado = PersistenciaAgencia.ModificarAgencia((Agencia)fuente);
                if (resultado == -1)
                {
                    throw new ExcepcionLogica("No se encontró una Agencia con ese identificador.");
                }
            }
            else
            {
                throw new ExcepcionLogica("Tipo de Fuente no reconocido.");
            }
        }
Ejemplo n.º 10
0
    private Juego miJuego;    // Para comunicar con el resto de elementos

    // Operaciones

    /// Constructor
    public Marcador(Juego j)
    {
        fuenteSans = new Fuente("FreeSansBold.ttf", 18);
        iconoVida  = new ElemGrafico("imagenes/personajed1.png");
        miJuego    = j;
        mejorPunt  = 0;
    }
    public List <Pedido> ActualizarPedido(Fuente FuenteDatos, int IDEmpresa, TipoActualizacion TipoActualizacion, bool Portatil, List <Pedido> Pedido,
                                          string IDUsuario)
    {
        Fuente locFuenteDatos = FuenteDatos;

        if (Portatil)
        {
            locFuenteDatos = Fuente.SigametPortatil;
        }

        Consulta consulta = new ConsultaCreator().FactoryMethod(IDEmpresa, locFuenteDatos);

        List <Pedido> pedidosActualizados = new List <Pedido>();

        try
        {
            pedidosActualizados = consulta.ActualizarPedido(IDEmpresa, TipoActualizacion, Pedido, IDUsuario);

            if (!consulta.Success)
            {
                throw new Exception(consulta.Message + " " + consulta.InternalException);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }

        return(pedidosActualizados);
    }
        private async void _btnGuardar_Click(object sender, EventArgs e)
        {
            if (!CamposInvalidos())
            {
                try
                {
                    var fuente = new Fuente()
                    {
                        Nombre = _nombre.Text
                    };

                    await _fuenteService.AgregarFuente(fuente);

                    Toast.MakeText(this.Activity, "Se ha agregado la fuente correctamente.", ToastLength.Long).Show();
                }
                catch (Exception ex)
                {
                    Toast.MakeText(this.Activity, ex.Message, ToastLength.Long).Show();
                }
                finally
                {
                    LimpiarCampos();
                }
            }
        }
Ejemplo n.º 13
0
        public static void AltaFuente(Fuente fuente)
        {
            int resultado = 0;

            if (fuente is Periodista)
            {
                ValidarPeriodista(fuente);
                resultado = PersistenciaPeriodista.AltaPeriodista((Periodista)fuente);
            }
            else if (fuente is Agencia)
            {
                ValidarAgencia(fuente);
                resultado = PersistenciaAgencia.AltaAgencia((Agencia)fuente);
            }
            else
            {
                throw new ExcepcionLogica("Fuente no reconocida.");
            }
            if (resultado == -1)
            {
                throw new ExcepcionLogica("El identificador ya se encuentra en uso.");
            }
            else if (resultado == -3)
            {
                throw new ExcepcionLogica("El documento " + ((Periodista)fuente).DocumentoIdentidad + " ya existe en la base de datos.");
            }
        }
 private void LimpiarCampos()
 {
     _monto.Text        = string.Empty;
     _descripcion.Text  = string.Empty;
     fuente             = null;
     _fechaIngreso.Text = string.Empty;
 }
 public PlanMEDTO Get(string proyectoId, int indicadorId)
 {
     try
     {
         return((from p in _context.Proyecto
                 join pme in _context.PlanMonitoreoEvaluacion
                 on p equals pme.Proyecto
                 join i in _context.Indicador
                 on pme.Indicador equals i
                 join fd in _context.FuenteDato
                 on pme.FuenteDato equals fd into Fuente
                 from PlanFuente in Fuente.DefaultIfEmpty()
                 join fm in _context.FrecuenciaMedicion
                 on pme.FrecuenciaMedicion equals fm into Frecuencia
                 from PlanFrecuencia in Frecuencia.DefaultIfEmpty()
                 join ni in _context.NivelImpacto
                 on pme.NivelImpacto equals ni into Nivel
                 from PlanNivel in Nivel.DefaultIfEmpty()
                 where p.CodigoProyecto == proyectoId && i.CodigoIndicador == indicadorId
                 select new PlanMEDTO()
         {
             ProyectoId = p.CodigoProyecto,
             IndicadorId = i.CodigoIndicador,
             NombreProyecto = p.NombreProyecto,
             NombreIndicador = i.NombreIndicador,
             LineaBase = pme.ValorLineaBase,
             Metodologia = pme.MetodologiaRecoleccion,
             FuenteDato = new MapDTO()
             {
                 Id = PlanFuente == null ? 0 : PlanFuente.Id,
                 Nombre = PlanFuente == null ? string.Empty : PlanFuente.NombreFuente
             },
             FrecuenciaMedicion = new MapDTO()
             {
                 Id = PlanFrecuencia == null ? 0 : PlanFrecuencia.Id,
                 Nombre = PlanFrecuencia == null ? string.Empty : PlanFrecuencia.NombreFrecuencia
             },
             NivelImpacto = new MapDTO()
             {
                 Id = PlanNivel == null ? 0 : PlanNivel.Id,
                 Nombre = PlanNivel == null ? string.Empty : PlanNivel.NombreNivelImpacto
             },
             Desagregaciones = (
                 from pd in _context.PlanDesagregacion
                 join d in _context.Desagregacion
                 on pd.Desagregacion equals d
                 where pd.PlanMonitoreoEvaluacionProyectoCodigoProyecto == p.CodigoProyecto && pd.PlanMonitoreoEvaluacionIndicadorId == i.CodigoIndicador
                 select new MapDTO()
             {
                 Id = d.Id,
                 Nombre = d.TipoDesagregacion
             }).ToArray()
         }).Single());
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(null);
     }
 }
Ejemplo n.º 16
0
        protected override StringBuilder Traducir(CodeSegment segment)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(Registros.OpCode(NombreRegistroD));
            sb.AppendLine(Fuente.ToString());
            return(sb);
        }
Ejemplo n.º 17
0
        public CondicionesCredito(int IDEmpresa, int IDDireccionEntrega, Fuente FuenteDatos)
        {
            this.IDEmpresa          = IDEmpresa;
            this.IDDireccionEntrega = IDDireccionEntrega;
            this.FuenteDatos        = FuenteDatos;

            this.AgendaGestionCobranza = new List <Negocio.AgendaGestionCobranza>();
        }
Ejemplo n.º 18
0
    int puntos; // Puntuacion obtenida por el usuario

    #endregion Fields

    #region Constructors

    // Inicialización al comenzar la sesión de juego
    public Partida()
    {
        miPersonaje = new Personaje(this);
        miPantallaJuego = new Mapa(this);
        miMarcador = new Marcador(this);
        puntos = 0;
        partidaTerminada = false;
        fuenteSans18 = new Fuente("FreeSansBold.ttf", 18);
    }
Ejemplo n.º 19
0
    bool partidaTerminada;  // Si ha terminado una partida


    // Inicialización al comenzar la sesión de juego
    public Partida()
    {
        miPersonaje      = new Personaje(this);
        miPantallaJuego  = new Mapa(this);
        miMarcador       = new Marcador(this);
        puntos           = 0;
        partidaTerminada = false;
        fuenteSans18     = new Fuente("FreeSansBold.ttf", 18);
    }
Ejemplo n.º 20
0
    Fuente fuente18;   // Tipo de letra para mensajes

    // Constructor
    public Mapa(Partida p)
    {
        listaNiveles    = new Nivel[MAX_NIVELES];
        listaNiveles[0] = new Nivel01();
        listaNiveles[1] = new Nivel02();
        //listaNiveles[2] = new Nivel03();

        nivelActual = listaNiveles[numeroNivelActual];
        fuente18    = new Fuente("FreeSansBold.ttf", 18);
    }
Ejemplo n.º 21
0
        public static Fuente BuscarFuente(int id)
        {
            Fuente f = PersistenciaPeriodista.BuscarPeriodista(id);

            if (f == null)
            {
                f = PersistenciaAgencia.BuscarAgencia(id);
            }
            return(f);
        }
Ejemplo n.º 22
0
        public static void ValidarPeriodista(Fuente fu)
        {
            ValidarFuente(fu);

            Periodista p = (Periodista)fu;

            if (string.IsNullOrWhiteSpace(p.Direccion))
            {
                throw new ExcepcionLogica("Debe proporcionar una Direccion para el Periodista.");
            }

            if (string.IsNullOrWhiteSpace(p.DocumentoIdentidad))
            {
                throw new ExcepcionLogica("Debe proporcionar un Documento.");
            }

            if (p.DocumentoIdentidad.Length > 9)
            {
                throw new ExcepcionLogica("El Documento del Periodista no es válido, debe contener menos caracteres.");
            }

            try
            {
                int n = Convert.ToInt32(p.DocumentoIdentidad);
            }
            catch
            {
                throw new ExcepcionLogica("Documento: Solo se permiten números.");
            }

            if (p.DocumentoIdentidad.Length < 8)
            {
                throw new ExcepcionLogica("El Documento del Periodista no es válido.");
            }

            if (p.Telefono.Length > 10)
            {
                throw new ExcepcionLogica("El Teléfono del Periodista no es válido, debe contener menos caracteres.");
            }

            try
            {
                int n = Convert.ToInt32(p.Telefono);
            }
            catch
            {
                throw new ExcepcionLogica("Teléfono: Solo se permiten números.");
            }

            if (p.Telefono.Length < 0)
            {
                throw new ExcepcionLogica("El teléfono del Periodista no es válido.");
            }
        }
Ejemplo n.º 23
0
 protected bool pertenece(List <Fuente> fuentes, Fuente fuente)
 {
     foreach (Fuente f in fuentes)
     {
         if (f.Id == fuente.Id)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 24
0
 public Marcador(Partida p)
 {
     miPartida         = p;
     tipoDeLetra       = new Fuente("FreeSansBold.ttf", 18);
     imgVidas          = new ElemGrafico("imagenes/personaje.png");
     imgAireRojo       = new ElemGrafico("imagenes/aireRojo.png");
     imgAireRojoVacio  = new ElemGrafico("imagenes/aireRojoV.png");
     imgAireVerde      = new ElemGrafico("imagenes/aireVerde.png");
     imgAireVerdeVacio = new ElemGrafico("imagenes/aireVerdeV.png");
     imgFondoMetal     = new ElemGrafico("imagenes/metal.png");
 }
Ejemplo n.º 25
0
 public void updateFuente(Fuente pFuente)
 {
     try
     {
         iFuenteRepository.Update(pFuente);
     }
     catch (Exception exc)
     {
         throw exc;
     }
 }
Ejemplo n.º 26
0
        public static void ValidarAgencia(Fuente fu)
        {
            ValidarFuente(fu);

            Agencia a = (Agencia)fu;

            if (string.IsNullOrWhiteSpace(a.PaisOrigen))
            {
                throw new ExcepcionLogica("Debe proporcionar un País de origen para la Agencia.");
            }
        }
Ejemplo n.º 27
0
 public void AddFuente(Fuente pFuente)
 {
     try
     {
         iFuenteRepository.Insert(pFuente);
     }
     catch (Exception exc)
     {
         throw exc;
     }
 }
Ejemplo n.º 28
0
        private void CargarDatos(ExcelWorksheet hojaExcel, Fuente fuente)
        {
            hojaExcel.InsertRow(2, fuente.Datos.Count() - 1);
            ExcelRange rangoExcel = hojaExcel.Cells["A2"];

            MethodInfo informacionMetodo = typeof(ExcelRange).GetMethods()
                                           .First(x => x.Name == nameof(rangoExcel.LoadFromCollection));

            MethodInfo metodoGenerico = informacionMetodo.MakeGenericMethod(fuente.Tipo);

            metodoGenerico.Invoke(rangoExcel, new[] { fuente.Datos });
        }
Ejemplo n.º 29
0
 public Marcador(ContentManager c)
 {
     //miPartida = p;
     //tipoDeLetra = new Fuente("FreeSansBold.ttf", 18);
     imgVidas          = new ElemGrafico("personaje", c);
     imgAireRojo       = new ElemGrafico("aireRojo", c);
     imgAireRojoVacio  = new ElemGrafico("aireRojoV", c);
     imgAireVerde      = new ElemGrafico("aireVerde", c);
     imgAireVerdeVacio = new ElemGrafico("aireVerdeV", c);
     imgFondoMetal     = new ElemGrafico("metal", c);
     fuente18          = new Fuente("Lucida Console", c);
 }
Ejemplo n.º 30
0
        public Empleado FactoryMethod(int IDEmpresa, int IDEmpleado, Fuente FuenteDatos)
        {
            switch (FuenteDatos)
            {
            case Fuente.Sigamet:
                return(new EmpleadoSIGAMETDatos(IDEmpresa, IDEmpleado));

            case Fuente.CRM:
                return(new EmpleadoCRMDatos(IDEmpresa, IDEmpleado));

            default:
                return(null);
            }
        }
        public ConfiguracionSuministro FactoryMethod(int IDEmpresa, int IDCliente, Fuente FuenteDatos)
        {
            switch (FuenteDatos)
            {
            case Fuente.Sigamet:
                return(new GasMetropolitano.Runtime.SqlDatos.ConfiguracionSuministroDatos());

            case Fuente.CRM:
                return(new GasMetropolitano.Runtime.SqlDatos.ConfiguracionSuministroDatos());

            default:
                return(null);
            }
        }
Ejemplo n.º 32
0
        public CondicionesCredito FactoryMethod(int IDEmpresa, int IDCliente, Fuente FuenteDatos)
        {
            switch (FuenteDatos)
            {
            case Fuente.Sigamet:
                return(new CondicionesCreditoSIGAMETDatos(IDEmpresa, IDCliente, FuenteDatos));

            case Fuente.CRM:
                return(new CondicionesCreditoCRMDatos(IDEmpresa, IDCliente, FuenteDatos));

            default:
                return(null);
            }
        }
Ejemplo n.º 33
0
        public void CargarContenido()
        {
            imagenFondo = new ElemGrafico("fondoFinal", contenido);
            pie = new ElemGrafico("pie", contenido);
            pierna = new ElemGrafico("pierna", contenido);
            fuente18 = new Fuente("Lucida Console", contenido);

            imagenFondo.SetAnchoAlto(513, 256);
            pie.SetAnchoAlto(32, 28);
            pierna.SetAnchoAlto(16, 4);

            /*  Se sacan las posiciones donde se dibujará el fondo y
             *  el pie para que quede centrado*/
            centroFondo = 800 / 2 - imagenFondo.GetAncho() / 2;
            centroPie = 800 / 2 - pie.GetAncho() / 2;

            /*  Como la pierna debe ir cogida al pie, su X es 4 puntos
             *  superior a la del pie, se usa la coordenada centro del
             *  pie mas 4*/
            centroPierna = centroPie + 4;
        }
Ejemplo n.º 34
0
 // Constructor
 public Creditos()
 {
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
       fuenteSans12 = new Fuente("FreeSansBold.ttf",12);
 }
Ejemplo n.º 35
0
 public void CargarContenido()
 {
     imagenFondo = new ElemGrafico("present", contenido);
         cartelMovil = new ElemGrafico("present_triang", contenido);
         fuente18 = new Fuente("Lucida Console", contenido);
 }
Ejemplo n.º 36
0
 // Constructor
 /// Constructor
 public Presentacion()
 {
     imagenFondo = new ElemGrafico("imagenes/present.png");
     cartelMovil = new ElemGrafico("imagenes/present_triang.png");
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
 }
Ejemplo n.º 37
0
        public string getFuentes(string modelo)
        {
            //La creacion del objeto de Utilerias que es para la base de datos
            //La creacion del objeto de StringBuilder para concatenar los datos
            uti = new UtileriasSQL(int.Parse(modelo));
            //Se crea un objeto de SqlDataReader para tomar los datos del procedimiento
            SqlDataReader reader = uti.ExecuteReader("PR_OBTIENE_FUENTE ");
            //Se hace lectura la informacion desde la base de datos
            List<Fuente> pList = new List<Fuente>();
            while (reader.Read())
            {
                Fuente p = new Fuente();
                p.IdFuente = reader["ID_FUENTE"].ToString();
                p.Descripcion = reader["DESCRIPCION"].ToString();

                pList.Add(p);

            }

            string jsonString = JsonConvert.SerializeObject(pList);

            return jsonString;
        }
Ejemplo n.º 38
0
 // Constructor
 public Opciones()
 {
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
       fuenteSans12 = new Fuente("FreeSansBold.ttf",12);
 }
Ejemplo n.º 39
0
 public static void EscribirTextoOculta(string texto,
     short x, short y, byte r, byte g, byte b, Fuente f)
 {
     EscribirTextoOculta(texto, x, y, r, g, b, f.LeerPuntero());
 }
Ejemplo n.º 40
0
 public void CargarContenido()
 {
     fuente18 = new Fuente("Lucida Console", contenido);
 }