Pia de desarollo visual
mrfichasTrabajo12 de Junio de 2019
3.511 Palabras (15 Páginas)133 Visitas
[pic 1]
[pic 2]
[pic 3]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Usuarios
{
public partial class Form1 : Form
{
int intentos = 1;
public Form1()
{
InitializeComponent();
}
private void CmdAceptar_Click(object sender, EventArgs e)
{
if ((TxtUsuario.Text == "usuario" && TxtPassword.Text == "entrar") || (TxtUsuario.Text == "1234" && TxtPassword.Text == "5678"))
{
MessageBox.Show("Acceso correcto");
Form2 conecta2 = new Form2();
conecta2.Show();
TxtUsuario.Text = ""; TxtPassword.Text = "";
this.Hide();
}
else
{
MessageBox.Show("Error por favor vuelve a intentarlo");
TxtUsuario.Text = "";
TxtPassword.Text = "";
if (intentos == 3)
{
MessageBox.Show("Lo siento Has llegado al limitede errores");
Application.Exit();
}
intentos = intentos + 1;
}
}
private void CmdSalir_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
[pic 4]
namespace Usuarios
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar1.Value == 100)
{
this.Close();
timer1.Enabled = false;
Form3 Conecta3 = new Form3();
Conecta3.Show();
}
else
{
progressBar1.Value = progressBar1.Value + 10;
}
}
}
}
[pic 5]
[pic 6][pic 7][pic 8][pic 9][pic 10][pic 11][pic 12][pic 13][pic 14]
[pic 15][pic 16]
[pic 17]
[pic 18][pic 19]
[pic 20]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Usuarios
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void CbxPas_SelectedIndexChanged(object sender, EventArgs e)
{
Pbxcli.Visible = true;
string Nombre = Cbxcli.Text;
switch(Nombre)
{
case "cliente 1": Pbxcli.Image = Properties.Resources.cliente_1; break;
case "cliente 2": Pbxcli.Image = Properties.Resources.cliente_2; break;
case "cliente 3": Pbxcli.Image = Properties.Resources.cliente_3; break;
case "cliente 4": Pbxcli.Image = Properties.Resources.cliente_4; break;
}
}
private void Form3_Load(object sender, EventArgs e)
{
Pbxven.Visible = false;
Pbxcli.Visible = false;
DTPCita.Value = System.DateTime.Today;
DTPCita.MinDate = System.DateTime.Today;
}
private void CbxDr_SelectedIndexChanged(object sender, EventArgs e)
{
Pbxven.Visible = true;
string Ndoctor = Cbxven.Text;
switch (Ndoctor)
{
case "vendedor 1": Pbxven.Image = Properties.Resources.vendedor_1; break;
case "vendedor 2": Pbxven.Image = Properties.Resources.vendedor_2; break;
...