Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

CODIGO

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Diagnostics;
using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using System.Text;

using System.Security.Cryptography.X509Certificates;

namespace ReproductorMP3

public partial class Form1 : Form

private string ruta = "";

int jk = 75;

int reproducir;

public OpenFileDialog abriendoar = new OpenFileDialog();

public Form1()

InitializeComponent();

private void Form1_Load(object sender, EventArgs e)

}
private void btnplay_Click(object sender, EventArgs e)

if (reproducir == 1)

abriendo();

reproducir = 2;

else if (reproducir == 2)

Reproductor.Ctlcontrols.pause();

timer.Stop();

btnplay.BackgroundImage = Properties.Resources.icons8_pausa_96;

reproducir = 3;

else if (reproducir==3)

Reproductor.Ctlcontrols.play();

timer.Start();

btnplay.BackgroundImage = Properties.Resources.icons8_pausa_96;

reproducir = 2;

public void abriendo()

{
try

Reproductor.URL = @"" + ruta;

Reproductor.Ctlcontrols.play();

this.Visible = true;

Barra.Enabled = true;

btnplay.BackgroundImage = Properties.Resources.icons8_pausa_96;

catch

private void macTrackBar1_ValueChanged(object sender, decimal value)

Barra.Maximum = (int)Reproductor.currentMedia.duration;

if(Barra.Value==(int)Reproductor.Ctlcontrols.currentPosition)

else

Reproductor.Ctlcontrols.currentPosition = Barra.Value;

}
private void timer_Tick(object sender, EventArgs e)

Barra.Value = (int)Reproductor.Ctlcontrols.currentPosition;

tiempo1.Text = Reproductor.Ctlcontrols.currentPositionString;

tiempo1.Text = Reproductor.currentMedia.durationString;

private void button1_Click(object sender, EventArgs e)

if ((Barra.Value=Barra.Value-10)<0)

Barra.Value = 0;

else

Barra.Value = Barra.Value - 10;

You might also like