private void Button2_Click(object sender, EventArgs e) { MenuInicial menu = new MenuInicial(); menu.Show(); this.Hide(); }
private void BtnAceptar_Click(object sender, EventArgs e) { //Verificar usuario ingresado. if (txtCorreo.Text != "" && txtClave.Text != "") { try { Persistencia pd = new Persistencia(); DataTable ds = pd.BuscarDatos("usuarios"); for (int j = 0; j < ds.Rows.Count; j++) { string user = ds.Rows[j][0].ToString(); string pass = ds.Rows[j][4].ToString(); if (txtCorreo.Text.Equals(user) && txtClave.Text.Equals(pass)) { MenuInicial mi = new MenuInicial(); mi.Show(); this.Close(); } } } catch (Exception) { MessageBox.Show("Debe generar antes un usuario."); } } else { MessageBox.Show("Debe ingresar los datos"); } }
private void button1_Click(object sender, EventArgs e) { String nombreUsuario = txtUsuario.Text; String password = txtPassword.Text; var paramsProcedure = new Dictionary <string, string>(); paramsProcedure.Add("username", nombreUsuario); paramsProcedure.Add("password", password); DataTable usuario = Server.EjecutarSp("SP_Login", paramsProcedure); if (Utiles.Utiles.handleError(usuario)) { Global.IdUsuario = usuario.Rows[0].ItemArray[0].ToString(); String nombre = usuario.Rows[0].ItemArray[1].ToString(); int idSucursal = Convert.ToInt32(usuario.Rows[0].ItemArray[2]); int idRol = Convert.ToInt32(usuario.Rows[0].ItemArray[3]); if (idSucursal == -1 || idRol == -1) { Cl_Roles roles = new Cl_Roles(idSucursal, idRol); roles.ShowDialog(); } else { Global.IdRol = idRol; Global.IdSucursal = idSucursal; MenuInicial menu = new MenuInicial(); menu.ShowDialog(); } Close(); } }
private void Bt_atras_Click_1(object sender, EventArgs e) { MenuInicial menu = new MenuInicial(); menu.Show(); this.Hide(); }
static void Main(string[] args) { PeliculasController peliculas = new PeliculasController(); MenuInicial menuInicial = new MenuInicial(peliculas); Console.ReadKey(); }
private void timer1_Tick(object sender, EventArgs e) { progressBar1.Increment(5); if (progressBar1.Value == 100) { MenuInicial c = new MenuInicial(); timer1.Stop(); c.ShowDialog(); progressBar1.Increment(-100); } }
// ---------------------------------------------- public override void Init() { //Initialize Joystick ObtainJoystickController(); //New Input interface Input = new Input(base.Input, joystick); //Initialize Sound Manager SoundManager = new SoundManager(this.DirectSound.DsDevice); //Start the game GameState = new MenuInicial(this); }
private void Btn_Aceptar_Click(object sender, EventArgs e) { if (this.Validar()) { Roles roles = new Roles(_idUsuario); if (roles.rol_name.Equals("") == true) { roles.ShowDialog(); } else { Txt_Password.Clear(); MenuInicial menu = new MenuInicial(_idUsuario); menu.LevantarRol(roles.rol_name); menu.ShowDialog(); } } }
private void btnAceptar_Click(object sender, EventArgs e) { if (idRol == -1) { DataRowView rol = (DataRowView)cmbRol.Items[Convert.ToInt32(cmbRol.SelectedIndex)]; idRol = Convert.ToInt32(rol[0]); } if (idSucursal == -1) { DataRowView sucursal = (DataRowView)cmbSucursal.Items[Convert.ToInt32(cmbSucursal.SelectedIndex)]; idSucursal = Convert.ToInt32(sucursal[0]); } Global.IdRol = idRol; Global.IdSucursal = idSucursal; MenuInicial menu = new MenuInicial(); menu.ShowDialog(); Close(); }
//============== // === TIMER === //============== private void timer1_Tick(object sender, EventArgs e) { if (loadingBar.Value < 100) { loadingBar.Value += 2; lblPorcento.Text = loadingBar.Value.ToString() + "%"; if (loadingBar.Value == 30) { BackgroundImage = Resources.load2; } else if (loadingBar.Value == 60) { BackgroundImage = Resources.load3; } } else { timer1.Enabled = false; Hide(); MenuInicial menuInicial = new MenuInicial(); menuInicial.Show(); } }
/// <summary> /// Método que se llama una sola vez, al principio cuando se ejecuta el ejemplo. /// Escribir aquí todo el código de inicialización: cargar modelos, texturas, modifiers, uservars, etc. /// Borrar todo lo que no haga falta /// </summary> public override void Init() { //Musica //GuiController.Instance.Modifiers.addBoolean("Musica", "Música", true); //BoundingBox //GuiController.Instance.Modifiers.addBoolean("BoundingBox", "BoundingBox", false); //Inteligencia Artificial //GuiController.Instance.Modifiers.addBoolean("IA", "IA", true); //Un boton para reiniciar las posiciones //GuiController.Instance.Modifiers.addButton("ReiniciarPosiciones", "Reiniciar Posiciones", new EventHandler(this.ReiniciarPosiciones_Click)); //Luz //GuiController.Instance.Modifiers.addFloat("lightIntensity", 0, 100, 50); //GuiController.Instance.Modifiers.addFloat("lightAttenuation", 0.1f, 2, 0.20f); //Empiezo con un tema Random :) int numbreTrack = new Random().Next(Settings.Default.music.Count); //GuiController.Instance.Mp3Player.FileName = pathRecursos + Settings.Default.music[numbreTrack]; //TODO Arreglar para despues :) Dictionary <string, TgcStaticSound> sonidos = new Dictionary <string, TgcStaticSound>(); TgcStaticSound sonido = new TgcStaticSound(); sonido.loadSound(MediaDir + "Audio\\pelota-tiro.wav", DirectSound.DsDevice); sonidos.Add("pelota-tiro", sonido); //Configurar camara en Tercer Persona camaraInterna = new TgcThirdPersonCamera(); Camara = camaraInterna; this.pantallaActual = 0; //Creo el menu this.menu = new MenuInicial(MediaDir, camaraInterna, this); //Creo la configuracion del partido this.configuracionPartido = new ConfiguracionPartido(MediaDir, D3DDevice.Instance.Width, camaraInterna, this); //Creo el partido this.partido = PartidoFactory.Instance.CrearPartido(MediaDir, Input, sonidos, camaraInterna); drawer2D = new Drawer2D(); //Mapa this.mapa = new CustomSprite(); this.mapa.Bitmap = new CustomBitmap(MediaDir + "Texturas\\mapa.png", D3DDevice.Instance.Device); //this.mapa.Scaling = new Vector2(0.75f, 0.75f); Size textureSize = this.mapa.Bitmap.Size; this.mapa.Position = new Vector2((D3DDevice.Instance.Width - textureSize.Width) / 2, (D3DDevice.Instance.Height - textureSize.Height)); this.puntoAzul = new CustomSprite(); this.puntoAzul.Bitmap = new CustomBitmap(MediaDir + "Texturas\\radarAzul.png", D3DDevice.Instance.Device); this.puntoAzul.Scaling = new Vector2(0.03f, 0.03f); this.puntoNaranja = new CustomSprite(); this.puntoNaranja.Bitmap = new CustomBitmap(MediaDir + "Texturas\\radarNaranja.png", D3DDevice.Instance.Device); this.puntoNaranja.Scaling = new Vector2(0.03f, 0.03f); //Color de fondo (BackgroundColor) D3DDevice.Instance.Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0); //FIX que nos mando Mariano para poder bajar el Alpha en el PixelShader D3DDevice.Instance.Device.RenderState.ReferenceAlpha = 10; }
public static void CargarEscenas() //Nuevas van aqui { Escena menu = new MenuInicial(0, "Menu"); Escena juego = new EscenaDelJuego(1, "Juego"); Escena fin = new FinJuego(2, "Fin"); }
public static void Main(string[] args) { MenuInicial a = new MenuInicial(); a.ComecarMenuInicial(); }
//Click a la ficha private void piece_Click(object sender, EventArgs e) { if (!tengoTurno)//si no tengo turno no hago nada { //MessageBox.Show("Quiero macareno, que no tienes el turno."); return; } Activetile = sender as ShowPiece; //Si es la ficha de mi groupBox if ((PlayerGroupBoxes.ElementAt(myPosition).Controls.Contains(Activetile)) && !pClick) { ListPiecePanelCompare = new List <ShowPiece>(); pClick = true; //La añade a la lista para luego compararla ListPiecePanelCompare.Add(Activetile); } //Si es del panel, y se ha hecho click pimero en el groupBox else if ((pnlTable.Controls.Contains(Activetile)) && pClick) { //La añade a la lista para luego compararla ListPiecePanelCompare.Add(Activetile); //Si hay una ficha en la mesa, muestra el menú para elegir dónde se quiere iniciar el juego:iqda o derecha if (pnlTable.Controls.Count == 1) { MenuInicial.Show(pnlTable, ListPiecePanelCompare[1].Location.X, ListPiecePanelCompare[1].Location.Y); } else { if (ColocarfichaJuego()) { //si colocamos la ficha correctamente, la enviamos a los demas //jugadores la ficha PieceData ficha = new PieceData(ListPiecePanelCompare[0].valorFicha, 0, 0, this.myPosition); PieceData ficha_anterior = new PieceData((ListPiecePanelCompare[1] as ShowPiece).getValue(), 0, 0, this.myPosition);; ficha.Rotacion = ListPiecePanelCompare[0].GetRotaciones(); ficha.Ubicacion = ListPiecePanelCompare[0].Ubicación; ficha.PosX = ListPiecePanelCompare[0].Location.X; ficha.PosY = ListPiecePanelCompare[0].Location.Y; DecrementPlayerAvailablePieces(this.myPosition); //Manda al dispatcher la ficha puesta en el panel dispatcher.RequestPutPiecePlayer(ficha, ficha_anterior); //Si ponemos una ficha en un lado, se suma uno a esa posición, para controlar cuando llegue al borde // countPiece(ficha.Ubicacion); // lblCount.Text = FichasTotalIzq.ToString(); } } pClick = false; } else { MessageBox.Show("¡ Seleccione Primero Una Ficha del Jugador !"); } Activetile = null; }