コード例 #1
0
        public Fuente DeleteFuente(Fuente fuente)
        {
            context.Fuentes.Remove(fuente);
            context.SaveChanges();

            return(fuente);
        }
コード例 #2
0
        public Fuente UpdateFuente(Fuente fuente)
        {
            context.Entry(fuente).State = System.Data.Entity.EntityState.Modified;
            context.SaveChanges();

            return(fuente);
        }
コード例 #3
0
ファイル: Mapa.cs プロジェクト: ncabanes/manic-miner
    // 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);
    }
コード例 #4
0
        public Fuente AddFuente(Fuente fuente)
        {
            context.Fuentes.Add(fuente);
            context.SaveChanges();

            return(fuente);
        }
コード例 #5
0
    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);
    }
コード例 #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);
    }
コード例 #7
0
        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();
            }
        }
コード例 #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" }
            });
        }
コード例 #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.");
            }
        }
コード例 #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;
    }
コード例 #11
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);
    }
コード例 #12
0
        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();
                }
            }
        }
コード例 #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.");
            }
        }
コード例 #14
0
 private void LimpiarCampos()
 {
     _monto.Text        = string.Empty;
     _descripcion.Text  = string.Empty;
     fuente             = null;
     _fechaIngreso.Text = string.Empty;
 }
コード例 #15
0
 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);
     }
 }
コード例 #16
0
ファイル: DirectoI.cs プロジェクト: Jouna77/8086VCPU
        protected override StringBuilder Traducir(CodeSegment segment)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(Registros.OpCode(NombreRegistroD));
            sb.AppendLine(Fuente.ToString());
            return(sb);
        }
コード例 #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>();
        }
コード例 #18
0
ファイル: Partida.cs プロジェクト: ncabanes/manic-miner
    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);
    }
コード例 #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);
    }
コード例 #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);
    }
コード例 #21
0
        public static Fuente BuscarFuente(int id)
        {
            Fuente f = PersistenciaPeriodista.BuscarPeriodista(id);

            if (f == null)
            {
                f = PersistenciaAgencia.BuscarAgencia(id);
            }
            return(f);
        }
コード例 #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.");
            }
        }
コード例 #23
0
 protected bool pertenece(List <Fuente> fuentes, Fuente fuente)
 {
     foreach (Fuente f in fuentes)
     {
         if (f.Id == fuente.Id)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #24
0
ファイル: Marcador.cs プロジェクト: bsimser/manic-miner
 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");
 }
コード例 #25
0
 public void updateFuente(Fuente pFuente)
 {
     try
     {
         iFuenteRepository.Update(pFuente);
     }
     catch (Exception exc)
     {
         throw exc;
     }
 }
コード例 #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.");
            }
        }
コード例 #27
0
 public void AddFuente(Fuente pFuente)
 {
     try
     {
         iFuenteRepository.Insert(pFuente);
     }
     catch (Exception exc)
     {
         throw exc;
     }
 }
コード例 #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 });
        }
コード例 #29
0
ファイル: Marcador.cs プロジェクト: bsimser/manic-miner
 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);
 }
コード例 #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);
            }
        }
コード例 #31
0
        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);
            }
        }
コード例 #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);
            }
        }
コード例 #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;
        }
コード例 #34
0
ファイル: Creditos.cs プロジェクト: ncabanes/manic-miner
 // Constructor
 public Creditos()
 {
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
       fuenteSans12 = new Fuente("FreeSansBold.ttf",12);
 }
コード例 #35
0
ファイル: Presentacion.cs プロジェクト: ncabanes/manic-miner
 public void CargarContenido()
 {
     imagenFondo = new ElemGrafico("present", contenido);
         cartelMovil = new ElemGrafico("present_triang", contenido);
         fuente18 = new Fuente("Lucida Console", contenido);
 }
コード例 #36
0
ファイル: Presentacion.cs プロジェクト: ncabanes/manic-miner
 // Constructor
 /// Constructor
 public Presentacion()
 {
     imagenFondo = new ElemGrafico("imagenes/present.png");
     cartelMovil = new ElemGrafico("imagenes/present_triang.png");
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
 }
コード例 #37
0
ファイル: servicioweb.asmx.cs プロジェクト: torres93/enaproce
        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;
        }
コード例 #38
0
ファイル: Opciones.cs プロジェクト: ncabanes/manic-miner
 // Constructor
 public Opciones()
 {
     fuenteSans18 = new Fuente("FreeSansBold.ttf",18);
       fuenteSans12 = new Fuente("FreeSansBold.ttf",12);
 }
コード例 #39
0
ファイル: Hardware.cs プロジェクト: ncabanes/manic-miner
 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());
 }
コード例 #40
0
ファイル: Ayuda.cs プロジェクト: ncabanes/manic-miner
 public void CargarContenido()
 {
     fuente18 = new Fuente("Lucida Console", contenido);
 }