-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmMusic.cs
48 lines (43 loc) · 1.36 KB
/
frmMusic.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace O_Amor_Vive___Semana_do_Calvário_2022
{
public partial class frmMusic : Form
{
string URL, Nome;
public frmMusic(string url, string nome)
{
InitializeComponent();
this.URL = url;
this.Nome = nome;
}
private void axWindowsMediaPlayer1_KeyPressEvent(object sender, AxWMPLib._WMPOCXEvents_KeyPressEvent e)
{
if (e.nKeyAscii == Convert.ToChar(Keys.Escape))
{
this.Close();
}
}
private void axWindowsMediaPlayer1_EndOfStream(object sender, AxWMPLib._WMPOCXEvents_EndOfStreamEvent e)
{
this.Close();
}
private void frmMusic_FormClosing(object sender, FormClosingEventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.stop();
}
private void frmMusic_Load(object sender, EventArgs e)
{
this.Text = "Semana do Calvário 2022 - " + Nome;
axWindowsMediaPlayer1.URL = URL;
axWindowsMediaPlayer1.Ctlcontrols.play();
}
}
}