-
Notifications
You must be signed in to change notification settings - Fork 1
/
historial.cs
51 lines (48 loc) · 1.34 KB
/
historial.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Sobreloader
{
public partial class historial : Form
{
List<string> pgrsListf1;
public historial(List<string> prgsList)
{
InitializeComponent();
pgrsListf1 = prgsList;
var prgSel = listBox1.SelectedItem;
foreach (var item in pgrsListf1)
{
listBox1.Items.Add(item);
}
}
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
foreach (var item in pgrsListf1)
{
listBox1.Items.Add(item);
}
}
private void button2_Click(object sender, EventArgs e)
{
var prgSel = listBox1.GetItemText(listBox1.SelectedItem);
if (prgSel == "")
{
button2.Enabled = false;
}
else
{
System.Windows.Forms.Clipboard.SetText(prgSel);
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
button2.Enabled = true;
}
}
}