-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathejemplos.cs
112 lines (106 loc) · 4.15 KB
/
ejemplos.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
using System.Resources;
namespace Sobreloader
{
public partial class ejemplos : Form
{
Strings SC = new Strings();
ResourceManager rm = new ResourceManager(typeof(ejemplos));
public ejemplos()
{
InitializeComponent();
}
private void ejemplos_Load(object sender, EventArgs e)
{
this.Size = new Size(249, 219);
}
private void button1_Click(object sender, EventArgs e)
{
Clipboard.SetText(listBox1.SelectedItem.ToString());
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.Size.Width != 554 || this.Size.Height != 219)
{
this.Size = new Size(554, 219);
}
switch (listBox1.SelectedIndex)
{
case 0:
labelNom.Text = string.Format(rm.GetString("1T"));
labelDesc.Text = string.Format(rm.GetString("1D"));
labelWW.Text = string.Format(rm.GetString("1W"));
break;
case 1:
labelNom.Text = string.Format(rm.GetString("2T"));
labelDesc.Text = string.Format(rm.GetString("2D"));
labelWW.Text = string.Format(rm.GetString("2W"));
break;
case 2:
labelNom.Text = string.Format(rm.GetString("3T"));
labelDesc.Text = string.Format(rm.GetString("3D"));
labelWW.Text = string.Format(rm.GetString("3W"));
break;
case 3:
labelNom.Text = string.Format(rm.GetString("4T"));
labelDesc.Text = string.Format(rm.GetString("4D"));
labelWW.Text = string.Format(rm.GetString("4W"));
break;
case 4:
labelNom.Text = string.Format(rm.GetString("5T"));
labelDesc.Text = string.Format(rm.GetString("5D"));
labelWW.Text = string.Format(rm.GetString("5W"));
break;
case 5:
labelNom.Text = string.Format(rm.GetString("6T"));
labelDesc.Text = string.Format(rm.GetString("6D"));
labelWW.Text = string.Format(rm.GetString("6W"));
break;
case 6:
labelNom.Text = string.Format(rm.GetString("7T"));
labelDesc.Text = string.Format(rm.GetString("7D"));
labelWW.Text = string.Format(rm.GetString("7W"));
break;
default:
labelNom.Text = string.Format(rm.GetString("8T"));
labelDesc.Text = string.Format(rm.GetString("8D"));
labelWW.Text = string.Format(rm.GetString("8W"));
break;
}
}
private void button2_Click(object sender, EventArgs e)
{
var proceso = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = listBox1.SelectedItem.ToString(),
RedirectStandardOutput = false,
CreateNoWindow = true,
}
};
try
{
proceso.Start();
}
catch (SystemException err)
{
if (SC.debug)
{
MessageBox.Show(string.Format(rm.GetString("msgErrorOF")) + "\n\n" + err, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
MessageBox.Show(string.Format(rm.GetString("msgErrorOF")), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
}