-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmPrincipal.cs
317 lines (265 loc) · 9.34 KB
/
frmPrincipal.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
namespace Adoradores_5
{
public partial class frmPrincipal : Form
{
frmMusics frm;
string[] Music = new string[13];
string[] URL = new string[13];
public frmPrincipal()
{
InitializeComponent();
LoadMusicFromXML(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), @"Adoradores 5\musics.xml"));
}
private void LoadMusicFromXML(string caminhoXML)
{
try
{
XDocument doc = XDocument.Load(caminhoXML);
try
{
for (int i = 0; i <= 12; i++)
{
// Use ElementAt(i) para acessar o elemento específico no índice i
XElement elementoMusica = doc.Descendants("musica").ElementAt(i);
string titulo = elementoMusica.Element("titulo").Value;
string caminho = elementoMusica.Element("caminho").Value;
Music[i] = titulo;
URL[i] = caminho;
}
}
catch (Exception ex)
{
MessageBox.Show("Erro ao carregar as músicas: " + ex.Message, "Adoradores 5", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{
MessageBox.Show("Erro ao carregar lista de músicas: " + ex.Message, "Adoradores 5", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void frmPrincipal_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyValue == Convert.ToChar(Keys.Escape))
{
Application.Exit();
}
}
private void label1_Click(object sender, EventArgs e)
{
try
{
Process.Start("https://thiagosousa81.wordpress.com/");
}
catch (Exception)
{
throw;
}
}
private void pbDigno_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[12], this.URL[12]);
frm.ShowDialog();
}
private void pbPraTeuLouvor_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[1], this.URL[1]);
frm.ShowDialog();
}
private void pbGraca_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[2], this.URL[2]);
frm.ShowDialog();
}
private void pbUsame_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[3], this.URL[3]);
frm.ShowDialog();
}
private void pbVitoria_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[4], this.URL[4]);
frm.ShowDialog();
}
private void pbCartaDeAmor_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[5], this.URL[5]);
frm.ShowDialog();
}
private void pbEsOArQueEuRespiro_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[6], this.URL[6]);
frm.ShowDialog();
}
private void pbIntensamente_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[7], this.URL[7]);
frm.ShowDialog();
}
private void pbNossaMissao_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[8], this.URL[8]);
frm.ShowDialog();
}
private void pbEleVaiAgir_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[9], this.URL[9]);
frm.ShowDialog();
}
private void pbCaminho_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[10], this.URL[10]);
frm.ShowDialog();
}
private void pbSantoEspirito_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[11], this.URL[11]);
frm.ShowDialog();
}
private void pbJesus_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music[0], this.URL[0]);
frm.ShowDialog();
}
private void pbLogo_Click(object sender, EventArgs e)
{
try
{
Process.Start("https://github.com/thiagosousa81");
}
catch (Exception)
{
throw;
}
}
private void pbJesus_MouseEnter(object sender, EventArgs e)
{
pbJesus.BorderStyle = BorderStyle.FixedSingle;
}
private void pbJesus_MouseLeave(object sender, EventArgs e)
{
pbJesus.BorderStyle= BorderStyle.Fixed3D;
}
private void pbPraTeuLouvor_MouseEnter(object sender, EventArgs e)
{
pbPraTeuLouvor.BorderStyle = BorderStyle.FixedSingle;
}
private void pbGraca_MouseEnter(object sender, EventArgs e)
{
pbGraca.BorderStyle = BorderStyle.FixedSingle;
}
private void pbUsame_MouseEnter(object sender, EventArgs e)
{
pbUsame.BorderStyle = BorderStyle.FixedSingle;
}
private void pbVitoria_MouseEnter(object sender, EventArgs e)
{
pbVitoria.BorderStyle = BorderStyle.FixedSingle;
}
private void pbCartaDeAmor_MouseEnter(object sender, EventArgs e)
{
pbCartaDeAmor.BorderStyle = BorderStyle.FixedSingle;
}
private void pbEsOArQueEuRespiro_MouseEnter(object sender, EventArgs e)
{
pbEsOArQueEuRespiro.BorderStyle = BorderStyle.FixedSingle;
}
private void pbIntensamente_MouseEnter(object sender, EventArgs e)
{
pbIntensamente.BorderStyle = BorderStyle.FixedSingle;
}
private void pbNossaMissao_MouseEnter(object sender, EventArgs e)
{
pbNossaMissao.BorderStyle = BorderStyle.FixedSingle;
}
private void pbEleVaiAgir_MouseEnter(object sender, EventArgs e)
{
pbEleVaiAgir.BorderStyle = BorderStyle.FixedSingle;
}
private void pbCaminho_MouseEnter(object sender, EventArgs e)
{
pbCaminho.BorderStyle = BorderStyle.FixedSingle;
}
private void pbSantoEspirito_MouseEnter(object sender, EventArgs e)
{
pbSantoEspirito.BorderStyle = BorderStyle.FixedSingle;
}
private void pbDigno_MouseEnter(object sender, EventArgs e)
{
pbDigno.BorderStyle = BorderStyle.FixedSingle;
}
private void pbPraTeuLouvor_MouseLeave(object sender, EventArgs e)
{
pbPraTeuLouvor.BorderStyle = BorderStyle.Fixed3D;
}
private void pbGraca_MouseLeave(object sender, EventArgs e)
{
pbGraca.BorderStyle = BorderStyle.Fixed3D;
}
private void pbUsame_MouseLeave(object sender, EventArgs e)
{
pbUsame.BorderStyle = BorderStyle.Fixed3D;
}
private void pbVitoria_MouseLeave(object sender, EventArgs e)
{
pbVitoria.BorderStyle = BorderStyle.Fixed3D;
}
private void pbCartaDeAmor_MouseLeave(object sender, EventArgs e)
{
pbCartaDeAmor.BorderStyle = BorderStyle.Fixed3D;
}
private void pbEsOArQueEuRespiro_MouseLeave(object sender, EventArgs e)
{
pbEsOArQueEuRespiro.BorderStyle = BorderStyle.Fixed3D;
}
private void pbIntensamente_MouseLeave(object sender, EventArgs e)
{
pbIntensamente.BorderStyle = BorderStyle.Fixed3D;
}
private void pbNossaMissao_MouseLeave(object sender, EventArgs e)
{
pbNossaMissao.BorderStyle = BorderStyle.Fixed3D;
}
private void pbEleVaiAgir_MouseLeave(object sender, EventArgs e)
{
pbEleVaiAgir.BorderStyle = BorderStyle.Fixed3D;
}
private void pbCaminho_MouseLeave(object sender, EventArgs e)
{
pbCaminho.BorderStyle = BorderStyle.Fixed3D;
}
private void pbSantoEspirito_MouseLeave(object sender, EventArgs e)
{
pbSantoEspirito.BorderStyle = BorderStyle.Fixed3D;
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
{
this.Close(); // Fecha o formulário ao pressionar Esc
return true; // Indica que o pressionamento de tecla foi processado
}
return base.ProcessCmdKey(ref msg, keyData);
}
private void pbDigno_MouseLeave(object sender, EventArgs e)
{
pbDigno.BorderStyle = BorderStyle.Fixed3D;
}
private void btnALL_Click(object sender, EventArgs e)
{
frm = new frmMusics(this.Music, this.URL);
frm.ShowDialog();
}
}
}