public IEnumerable <Pantalla> GetAllPantallas() { string cadena = "SELECT * FROM" + cod + "TAB_PANTALLA" + cod + ""; try { List <Pantalla> lstpantalla = new List <Pantalla>(); con.Open(); NpgsqlCommand cmd = new NpgsqlCommand(cadena, con); NpgsqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { Pantalla pantalla = new Pantalla(); pantalla.STR_NOMBRE_PANTALLA = rdr["STR_NOMBRE_PANTALLA"].ToString().Trim(); pantalla.INT_IDPANTALLA_P = Convert.ToInt32(rdr["INT_IDPANTALLA_P"]); lstpantalla.Add(pantalla); } con.Close(); return(lstpantalla); } catch { con.Close(); throw; } finally { con.Close(); } }
private void btnac_Click(object sender, EventArgs e) { primero = 0; primero2 = 0; segundo = 0; Pantalla.Clear(); }
public int DeletePantalla(Pantalla pantalla) { string add = "UPDATE " + cod + "TAB_PANTALLA" + cod + " SET " + cod + "BOOL_ESTATUS_LOGICO_PANT" + cod + "= " + "@BOOL_ESTATUS_LOGICO_PANT" + " WHERE " + cod + "INT_IDPANTALLA_P" + cod + " = " + "@INT_IDPANTALLA_P"; try { NpgsqlCommand cmd = new NpgsqlCommand(add, con); cmd.Parameters.Add(new NpgsqlParameter() { NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Integer, ParameterName = "@INT_IDPANTALLA_P", Value = pantalla.INT_IDPANTALLA_P }); cmd.Parameters.Add(new NpgsqlParameter() { NpgsqlDbType = NpgsqlTypes.NpgsqlDbType.Boolean, ParameterName = "@BOOL_ESTATUS_LOGICO_PANT", Value = pantalla.BOOL_ESTATUS_LOGICO_PANT }); con.Open(); int cantFilas = cmd.ExecuteNonQuery(); con.Close(); return(cantFilas); } catch { con.Close(); throw; } finally { con.Close(); } }
private void btndiv_Click(object sender, EventArgs e) { if (Pantalla.Text.Length != 0) { operador = "/"; if (primero2 != 0) { if (double.TryParse(Pantalla.Text, out primero2)) { primero = primero / double.Parse(Pantalla.Text); Pantalla.Clear(); } } else if (primero2 == 0) { if (double.TryParse(Pantalla.Text, out primero2)) { primero += primero2; double.TryParse(Pantalla.Text, out primero2); Pantalla.Clear(); } } else { Pantalla.Text = "Sintax Error"; } } }
protected void OnBProductoClicked(object sender, EventArgs e) { num1 = Convert.ToSingle(Pantalla.Text); Pantalla.DeleteText(0, Pantalla.Text.Length); contador = 0; opcion = 3; }
public LoginPaginaPrincipal(Pantalla p) { InitializeComponent(); this.pantalla = p; this.DataContext = this; this.Loaded += (s, e) => { btOk.IsEnabled = true; }; }
public int addPantalla(Pantalla pantalla) { string add = "INSERT INTO" + cod + "TAB_PANTALLA" + cod + "(" + cod + "STR_NOMBRE_PANTALLA" + cod + "," + cod + "FEC_MODIF_PANTALLA" + "," + cod + "BOOL_ESTATUS_LOGICO_PANT" + cod + ") VALUES " + "(@STR_NOMBRE_PANTALLA,@FEC_MODIF_PANTALLA,@BOOL_ESTATUS_LOGICO_PANT)"; try { NpgsqlCommand cmd = new NpgsqlCommand(add, con); cmd.Parameters.AddWithValue("@STR_NOMBRE_PANTALLA", pantalla.STR_NOMBRE_PANTALLA.Trim()); cmd.Parameters.AddWithValue("@FEC_MODIF_PANTALLA", DateTime.Now); cmd.Parameters.AddWithValue("@BOOL_ESTATUS_LOGICO_PANT", pantalla.BOOL_ESTATUS_LOGICO_PANT); con.Open(); int cantFila = cmd.ExecuteNonQuery(); con.Close(); return(cantFila); } catch { con.Close(); throw; } finally { con.Close(); } }
private void InicializarControles(Pantalla Pantalla) { for (int i = 0; i < Pantalla.Controls.Count; i++) { System.Windows.Forms.Control x = Pantalla.Controls[i]; if (x != null) { if (x.GetType() == new TextBox().GetType()) { Text.Add((TextBox)x); } else { if (x.GetType() == new MaskedTextBox().GetType()) { Masked.Add((MaskedTextBox)x); } else { if (x.GetType() == new ComboBox().GetType()) { Combo.Add((ComboBox)x); } else { if (x.GetType() == new Password().GetType()) { Pass.Add((Password)x); } } } } } } }
private BaseDatosBanco baseDatos; //referencia a la base de datos de informacion de cuentas //constructor de tres parametros invocado por las clases derivadas public Transaccion(int cuentaUsuario, Pantalla laPantalla, BaseDatosBanco laBaseDatos) { numeroCuenta = cuentaUsuario; pantallaUsuario = laPantalla; baseDatos = laBaseDatos; }
public void DesplegarPantallaEliminarProducto(RegistroProducto Producto, Regresar Actualizar) { Manejador = new ManejadorConfiguracion(); Pantalla = new PantallaEliminarProducto(Producto); Pantalla.Cerrar += Actualizar; Manejador.DesplegarPantalla(Pantalla); }
public IHttpActionResult PutPantalla(int id, Pantalla pantalla) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != pantalla.PantallaId) { return(BadRequest()); } _UnityOfWork.StateModified(pantalla); try { _UnityOfWork.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!PantallaExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public PegadoPaginaModulo(Operarios op, Pantalla p) { InitializeComponent(); this.DataContext = this; this.BtLogout.OnPulsado += (s, e) => { OperarioSale(); foreach (var control in GridMaquinas.Children) { var controlPrensa = control as PrensaGenericaControl; if (controlPrensa != null) { controlPrensa.Desuscribir(); } } }; this.Operario = op; this.Pantalla = p; this.Maquinas = guiOperario.ObtenerMisMaquinas(p); for (int i = 0; i < Maquinas.Count; i++) { GridMaquinas.ColumnDefinitions.Add(new ColumnDefinition()); Maquinas maquina = this.Maquinas[i]; PrensaGenericaControl pgc = new PrensaGenericaControl(maquina, op); Grid.SetColumn(pgc, i); GridMaquinas.Children.Add(pgc); } this.RitmoControl.SetMaquinas(this.Operario, this.Maquinas); this.NombreOperarioControl.SetOperario(this.Operario); }
// Use this for initialization void Start() { panel = GameObject.FindGameObjectWithTag("Panel"); pantalla = panel.GetComponent <Pantalla>(); posX = transform.position.x; aux = 1; }
public IHttpActionResult Create(Pantalla pantallas) { if (!ModelState.IsValid) { return(BadRequest()); } //var floreria = Mapper.Map<FloreriaDto, Florerias>(floreriaDTO); _UnityOfWork.Pantallas.Add(pantallas); try { _UnityOfWork.SaveChanges(); } catch (DbUpdateException) { if (PantallaExists(pantallas.PantallaId)) { return(Conflict()); } else { throw; } } return(CreatedAtRoute("DefaultApi", new { id = pantallas.PantallaId }, pantallas)); }
public async Task <ActionResult> Post([FromBody] Pantalla pantallas) { _context.PantallaDbSet.Add(pantallas); await _context.SaveChangesAsync(); return(new CreatedAtRouteResult("ObtenerPantalla", new { id = pantallas.Secuencia }, pantallas)); }
private void picguardar_Click(object sender, EventArgs e) { var bmp = new Bitmap(Pantalla.Width, Pantalla.Height); var g = Graphics.FromImage(bmp); var rect = Pantalla.RectangleToScreen(Pantalla.ClientRectangle); g.CopyFromScreen(rect.Location, Point.Empty, Pantalla.Size); g.Dispose(); var s = new SaveFileDialog(); s.Filter = "Png files|*.png|jpeg files|*jpg|bitmaps|*.bmp"; if (s.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (File.Exists(s.FileName)) { File.Delete(s.FileName); } if (s.FileName.Contains(".jpg")) { bmp.Save(s.FileName, ImageFormat.Jpeg); } else if (s.FileName.Contains(".png")) { bmp.Save(s.FileName, ImageFormat.Png); } else if (s.FileName.Contains(".bmp")) { bmp.Save(s.FileName, ImageFormat.Bmp); } } }
//cero protected void OnBceroClicked(object sender, EventArgs e) { String display = Pantalla.Text.ToString(); Pantalla.DeleteText(0, Pantalla.Text.Length); Pantalla.InsertText(display + " 0 "); }
protected void OnBIgualClicked(object sender, EventArgs e) { num2 = Convert.ToSingle(Pantalla.Text); String display = Pantalla.Text.ToString(); Pantalla.DeleteText(0, Pantalla.Text.Length); switch (opcion) { case ("+"): resultado = operacion.suma(num1, num2); this.Pantalla.Text = (Convert.ToString(resultado)); contadorigual++; break; case ("-"): resultado = operacion.resta(num1, num2); this.Pantalla.Text = (Convert.ToString(resultado)); contadorigual++; break; case ("*"): resultado = operacion.multiplicacion(num1, num2); this.Pantalla.Text = (Convert.ToString(resultado)); contadorigual++; break; case ("/"): resultado = operacion.division(num1, num2); this.Pantalla.Text = (Convert.ToString(resultado)); contadorigual++; break; } }
protected void OnMultiplicarClicked(object sender, EventArgs e) { cont_punto = 0; valor_a = Convert.ToDouble(Pantalla.Text); Pantalla.DeleteText(0, Pantalla.Text.Length); signo = "*"; }
protected void OnBRestarClicked(object sender, EventArgs e) { a = Convert.ToDouble(this.Pantalla.Text); c = "-"; Pantalla.DeleteText(0, Pantalla.Text.Length); flag = 0; }
protected void OnBBorrarClicked(object sender, EventArgs e) { if (flag == 0) { Pantalla.DeleteText(Pantalla.Text.Length - 1, Pantalla.Text.Length); } }
public void DesplegarPantallaAgregarProducto(Regresar Accion) { Manejador = new ManejadorConfiguracion(); Pantalla = new PantallaAgregarProducto(); Pantalla.Cerrar += Accion; Manejador.DesplegarPantalla(Pantalla); }
public void DesplegarPantallaModificarMaterial(RegistroMaterial Material, Regresar Acción) { Manejador = new ManejadorConfiguracion(); Pantalla = new PantallaModificarMaterial(Material); Pantalla.Cerrar += Acción; Manejador.DesplegarPantalla(Pantalla); }
static void Main(string[] args) { String[,] matrizFondo = Mapa.fondo(); // se crea la copia de ma String[,] matrizComida = Mapa.comida(matrizFondo); Pantalla.imprimir(matrizComida); Console.ReadKey(); }
protected void OnBDivisionClicked(object sender, EventArgs e) { num1 = Convert.ToSingle(Pantalla.Text); String display = Pantalla.Text.ToString(); Pantalla.DeleteText(0, Pantalla.Text.Length); opcion = "/"; }
//boton suma protected void OnBsumaClicked(object sender, EventArgs e) { numero1 = Convert.ToSingle(Pantalla.Text); Pantalla.DeleteText(0, Pantalla.Text.Length); contador2 = 0; opcion = "+"; }
public ActionResult DeleteConfirmed(int id) { Pantalla pantalla = db.Pantalla.Find(id); db.Pantalla.Remove(pantalla); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Pantalla pantalla = _UnityOfWork.Pantallas.Get(id); _UnityOfWork.Pantallas.Remove(pantalla); _UnityOfWork.SaveChanges(); return(RedirectToAction("Index")); }
static void Setup() { s = new Snake(); scr = new Pantalla(s.gameArea.width + 2, s.gameArea.height + 2); //borde s.dibujarBorde(scr); s.updateComida(scr); }
private const int CANCELO = 0; //constante que representa la opcion cancelar //constructor public Deposito(int numeroCuentaUsuario, Pantalla pantallaATM, BaseDatosBanco baseDatosBancoATM, Teclado tecladoATM, RanuraDeposito ranuraDepositoATM) : base(numeroCuentaUsuario, pantallaATM, baseDatosBancoATM) { //inicializa las referencias al teclado y a la ranura depostio teclado = tecladoATM; ranuraDeposito = ranuraDepositoATM; }
public override void init() { instance = this; pantallas.Add(new PantallaInicio()); pantallas.Add(new PantallaFinalizacion(0)); pantallas.Add(new PantallaFinalizacion(1)); pantalla = pantallas[0]; //Aumentamos el alcance del Frustum setDistanciaFrustum(200000f); //Paths de meshes de distintos vehículos string pathAutoMario = GuiController.Instance.AlumnoEjemplosMediaDir + "LosBorbotones\\Autos\\autoMario\\autoMario-TgcScene.xml"; string pathAutoLuigi = GuiController.Instance.AlumnoEjemplosMediaDir + "LosBorbotones\\Autos\\autoLuigi\\autoLuigi-TgcScene.xml"; // Creo los vehículos Auto autoMario = new Auto(pathAutoMario, "Mario", new Vector3(0, 0, 0), 2000, 90, 400, 47, new Vector3(2.4f, 2.4f, 2.4f), new Vector3(0,0,0)); Auto autoLuigi = new Auto(pathAutoLuigi, "Luigi", new Vector3(0, 0, 0), 3000, 80, 500, 40, new Vector3(3f, 3f, 3f), new Vector3(0, 0, 0)); this.autos.Add(autoMario); this.autos.Add(autoLuigi); TgcSceneLoader loader = new TgcSceneLoader(); //Crea los arboles string pathArbol = GuiController.Instance.AlumnoEjemplosMediaDir + "\\LosBorbotones\\ambientacion\\arbol\\arbol-TgcScene.xml"; ; int cantidadDeArboles = 8; for (int i = 0; i < cantidadDeArboles;i++ ) this.arboles.Add(loader.loadSceneFromFile(pathArbol)); //Crea el circuito this.niveles.Add( new Nivel(1) ); this.niveles.Add(new Nivel(2)); /// EFECTO BLUR /// Device d3dDevice = GuiController.Instance.D3dDevice; //Activamos el renderizado customizado. De esta forma el framework nos delega control total sobre como dibujar en pantalla //La responsabilidad cae toda de nuestro lado GuiController.Instance.CustomRenderEnabled = true; //Se crean 2 triangulos (o Quad) con las dimensiones de la pantalla con sus posiciones ya transformadas // x = -1 es el extremo izquiedo de la pantalla, x = 1 es el extremo derecho // Lo mismo para la Y con arriba y abajo // la Z en 1 simpre CustomVertex.PositionTextured[] screenQuadVertices = new CustomVertex.PositionTextured[] { new CustomVertex.PositionTextured( -1, 1, 1, 0,0), new CustomVertex.PositionTextured(1, 1, 1, 1,0), new CustomVertex.PositionTextured(-1, -1, 1, 0,1), new CustomVertex.PositionTextured(1,-1, 1, 1,1) }; //vertex buffer de los triangulos screenQuadVB = new VertexBuffer(typeof(CustomVertex.PositionTextured), 4, d3dDevice, Usage.Dynamic | Usage.WriteOnly, CustomVertex.PositionTextured.Format, Pool.Default); screenQuadVB.SetData(screenQuadVertices, 0, LockFlags.None); //Creamos un Render Targer sobre el cual se va a dibujar la pantalla renderTarget2D = new Texture(d3dDevice, d3dDevice.PresentationParameters.BackBufferWidth , d3dDevice.PresentationParameters.BackBufferHeight, 1, Usage.RenderTarget, Format.X8R8G8B8, Pool.Default); //Cargar shader con efectos de Post-Procesado string compilationErrors; effect = Effect.FromFile(GuiController.Instance.D3dDevice, GuiController.Instance.ExamplesMediaDir + "Shaders\\PostProcess.fx", null, null, ShaderFlags.None, null, out compilationErrors); if (effect == null) { throw new Exception("Error al cargar shader. Errores: " + compilationErrors); } //Configurar Technique dentro del shader effect.Technique = "BlurTechnique"; /// FIN EFECTO BLUR /// //MODIFIERS GuiController.Instance.Modifiers.addVertex2f("AlturaCamara", new Vector2(50, 200), new Vector2(800, 2000), new Vector2(200, 600)); GuiController.Instance.Modifiers.addVertex2f("PosicionFlechaDebug", new Vector2(-5000, -5000), new Vector2(5000, 5000), new Vector2(0, 0)); }
public void setPantalla(Pantalla _pantalla) { pantalla = _pantalla; }