Instituto Tecnolgico de Tijuana
Departamento de Sistemas y Computacin. Enero-Junio 2012.
Carrera: Ingeniera en sistemas computacionales. Materia: Tpicos
avanzados de programacin. Serie: 3SC4-B.Elementos visuales.Alumnos:
Aguayo Velzquez Erick Julin.Daz Barraza Valeria.Esquivel Suazo Mara
Luisa.Hernndez Ayala David Ernesto.Lucia Gonzlez Omar Alejandro.
Profesora: Tala Beatriz Tllez Bolaos.
Tijuana Baja California a 11 de mayo del 2012.
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 WindowsFormsApplication1{ public partial class Form1 :
Form { public string filePath; public Form1() {
InitializeComponent(); }
private void button20_Click(object sender, EventArgs e) {
}
private void button1_Click(object sender, EventArgs e) { }
private void button1_Click_1(object sender, EventArgs e) {
lista1.Visible = true; lista2.Visible = false; lista3.Visible =
false; lista4.Visible = false; lista5.Visible = false;
lista6.Visible = false;
btnplay1.Visible = true; btnplay2.Visible = false;
btnplay3.Visible = false; btnplay4.Visible = false;
btnplay5.Visible = false; btnplay6.Visible = false;
button4.Visible = true;
}
private void button4_Click(object sender, EventArgs e) {
filePath = "C:/Users/David/Desktop/Sonidos/Stop.wav";
axWindowsMediaPlayer1.URL = filePath; }
private void button20_Click_1(object sender, EventArgs e) {
this.Close(); }
private void button28_Click(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = true; lista3.Visible =
false; lista4.Visible = false; lista5.Visible = false;
lista6.Visible = false;
btnplay1.Visible = false; btnplay2.Visible = true;
btnplay3.Visible = false; btnplay4.Visible = false;
btnplay5.Visible = false; btnplay6.Visible = false;
button4.Visible = true; }
private void listBox2_SelectedIndexChanged(object sender,
EventArgs e) { switch (lista2.SelectedIndex) { case 0: filePath =
"C:/Users/David/Desktop/Sonidos/elamor.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\arjona.jpg");
axWindowsMediaPlayer1.URL = filePath;
//axWindowsMediaPlayer1.uiMode = "invisible"; break; case 1:
filePath = "C:/Users/David/Desktop/Sonidos/party.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\lmfao.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 2: filePath =
"C:/Users/David/Desktop/Sonidos/moves.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\maroonfive.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 3: filePath =
"C:/Users/David/Desktop/Sonidos/pumped.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\foster.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 4: filePath =
"C:/Users/David/Desktop/Sonidos/someone.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\adele.jpg");
axWindowsMediaPlayer1.URL = filePath; break;
case 5: filePath = "C:/Users/David/Desktop/Sonidos/lonoto.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\hombresg.jpg");
axWindowsMediaPlayer1.URL = filePath; break; } }
private void btnplay3_Click(object sender, EventArgs e) { switch
(lista3.SelectedIndex) { case 0: filePath =
"C:/Users/David/Desktop/Sonidos/jefedejefes.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\tigres.jpg");
axWindowsMediaPlayer1.URL = filePath; break; }}
private void btnplay4_Click(object sender, EventArgs e) { switch
(lista4.SelectedIndex) { case 0: filePath =
"C:/Users/David/Desktop/Sonidos/labiosrotos.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\zoe.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 1: filePath =
"C:/Users/David/Desktop/Sonidos/mantoestelar.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\moenia.jpg");
axWindowsMediaPlayer1.URL = filePath; break; } }
private void btnplay5_Click(object sender, EventArgs e) { switch
(lista5.SelectedIndex) { case 0: filePath =
"C:/Users/David/Desktop/Sonidos/master.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\metallica.jpg");
axWindowsMediaPlayer1.URL = filePath; break; } }
private void pictureBox2_Click(object sender, EventArgs e) {
}
private void btnplay1_Click_1(object sender, EventArgs e) {
switch (lista1.SelectedIndex) {
case 0:
filePath = "C:/Users/David/Desktop/Sonidos/lallamada.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\arrolladora.jpg");
axWindowsMediaPlayer1.URL = filePath; break;
} }
private void btnplay2_Click(object sender, EventArgs e) { switch
(lista2.SelectedIndex) { case 0: filePath =
"C:/Users/David/Desktop/Sonidos/elamor.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\arjona.jpg");
axWindowsMediaPlayer1.URL = filePath;
//axWindowsMediaPlayer1.uiMode = "invisible"; break; case 1:
filePath = "C:/Users/David/Desktop/Sonidos/party.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\lmfao.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 2: filePath =
"C:/Users/David/Desktop/Sonidos/moves.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\maroonfive.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 3: filePath =
"C:/Users/David/Desktop/Sonidos/pumped.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\foster.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 4: filePath =
"C:/Users/David/Desktop/Sonidos/someone.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\adele.jpg");
axWindowsMediaPlayer1.URL = filePath; break;
case 5: filePath = "C:/Users/David/Desktop/Sonidos/lonoto.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\hombresg.jpg");
axWindowsMediaPlayer1.URL = filePath; break; } }
private void btnplay2_Click_1(object sender, EventArgs e) {
switch (lista2.SelectedIndex) {
case 0: filePath = "C:/Users/David/Desktop/Sonidos/elamor.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\arjona.jpg");
axWindowsMediaPlayer1.URL = filePath;
//axWindowsMediaPlayer1.uiMode = "invisible";
break;
case 1: filePath = "C:/Users/David/Desktop/Sonidos/party.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\lmfao.jpg");
axWindowsMediaPlayer1.URL = filePath; break;
case 2: filePath = "C:/Users/David/Desktop/Sonidos/moves.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\maroonfive.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 3: filePath =
"C:/Users/David/Desktop/Sonidos/pumped.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\foster.jpg");
axWindowsMediaPlayer1.URL = filePath; break; case 4: filePath =
"C:/Users/David/Desktop/Sonidos/someone.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\adele.jpg");
axWindowsMediaPlayer1.URL = filePath; break;
case 5: filePath = "C:/Users/David/Desktop/Sonidos/lonoto.mp3";
pictureBox1.Load("C:\\Users\\David\\Desktop\\caratulas\\hombresg.jpg");
axWindowsMediaPlayer1.URL = filePath; break; } }
private void btnplay6_Click(object sender, EventArgs e) {
MessageBox.Show("No existen elementos para reproducir, \n favor de
llamar al tecnico para reportar..."); }
private void pictureBox2_Click_1(object sender, EventArgs e) {
}
private void Form1_Load(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = false; lista3.Visible =
false; lista4.Visible = false; lista5.Visible = false;
lista6.Visible = false;
btnplay1.Visible = false; btnplay2.Visible = false;
btnplay3.Visible = false; btnplay4.Visible = false;
btnplay5.Visible = false; btnplay6.Visible = false;
button4.Visible = false;
}
private void button11_Click(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = false; lista3.Visible =
true; lista4.Visible = false; lista5.Visible = false;
lista6.Visible = false;
btnplay1.Visible = false; btnplay2.Visible = false;
btnplay3.Visible = true; btnplay4.Visible = false; btnplay5.Visible
= false; btnplay6.Visible = false;
button4.Visible = true; }
private void button3_Click(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = false; lista3.Visible =
false; lista4.Visible = true; lista5.Visible = false;
lista6.Visible = false;
btnplay1.Visible = false; btnplay2.Visible = false;
btnplay3.Visible = false; btnplay4.Visible = true; btnplay5.Visible
= false; btnplay6.Visible = false;
button4.Visible = true; }
private void button2_Click(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = false; lista3.Visible =
false; lista4.Visible = false; lista5.Visible = true;
lista6.Visible = false;
btnplay1.Visible = false; btnplay2.Visible = false;
btnplay3.Visible = false; btnplay4.Visible = false;
btnplay5.Visible = true; btnplay6.Visible = false;
button4.Visible = true; }
private void button6_Click(object sender, EventArgs e) {
lista1.Visible = false; lista2.Visible = false; lista3.Visible =
false; lista4.Visible = false; lista5.Visible = false;
lista6.Visible = true;
btnplay1.Visible = false; btnplay2.Visible = false;
btnplay3.Visible = false; btnplay4.Visible = false;
btnplay5.Visible = false; btnplay6.Visible = true;
button4.Visible = true; }
private void panel1_Paint(object sender, PaintEventArgs e) {
}
private void timer1_Tick(object sender, EventArgs e) {
progressBar1.Increment(+1); if (progressBar1.Value == 100) {
timer1.Stop(); panel1.Hide(); } } } }