-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
159 lines (136 loc) · 5.57 KB
/
Form1.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
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;
using Microsoft.VisualBasic;
namespace Modelos_Program_1
{
public partial class Form1 : Form
{
classVector objVec1, objVec2, objVec3, objVec4;
private void descargarToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox4.Text = objVec1.descargar();
}
private void cargarEleXEleToolStripMenuItem_Click(object sender, EventArgs e)
{
int idx, cantidad;
objVec1 = new classVector();
cantidad = int.Parse(Interaction.InputBox("Ingrese la cantidad: "));
for(idx = 1; idx <= cantidad; idx++)
{
objVec1.cargarElexEl(int.Parse(Interaction.InputBox("Ingrese el numero: " + idx)));
}
}
private void pregunta1ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.elemFrecuFibo(int.Parse(textBox1.Text), int.Parse(textBox2.Text), ref objVec2, ref objVec3);
textBox5.Text = objVec2.descargar();
textBox6.Text = objVec3.descargar();
}
private void cargarToolStripMenuItem1_Click(object sender, EventArgs e)
{
objVec2.cargar(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void cargarToolStripMenuItem2_Click(object sender, EventArgs e)
{
objVec3.cargar(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void descargarToolStripMenuItem1_Click(object sender, EventArgs e)
{
textBox5.Text = objVec2.descargar();
}
private void descargarToolStripMenuItem2_Click(object sender, EventArgs e)
{
textBox6.Text = objVec3.descargar();
}
private void cargarEleXEleToolStripMenuItem1_Click(object sender, EventArgs e)
{
int idx, cantidad;
objVec2 = new classVector();
cantidad = int.Parse(Interaction.InputBox("Ingrese la cantidad: "));
for (idx = 1; idx <= cantidad; idx++)
{
objVec2.cargarElexEl(int.Parse(Interaction.InputBox("Ingrese el numero: " + idx)));
}
}
private void cargarEleXEleToolStripMenuItem2_Click(object sender, EventArgs e)
{
int idx, cantidad;
objVec3 = new classVector();
cantidad = int.Parse(Interaction.InputBox("Ingrese la cantidad: "));
for (idx = 1; idx <= cantidad; idx++)
{
objVec3.cargarElexEl(int.Parse(Interaction.InputBox("Ingrese el numero: " + idx)));
}
}
private void pregunta2ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.cargarSinRepetir(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
textBox4.Text = objVec1.descargar();
}
private void pregunta3ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.elimPosiMultiplos(int.Parse(textBox1.Text));
textBox5.Text = objVec1.descargar();
}
private void pregunta4ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.segmentarRepetNoRepet();
textBox5.Text = objVec1.descargar();
}
private void pregunta5ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.elemFrecuente(int.Parse(textBox1.Text), int.Parse(textBox2.Text), ref objVec2, ref objVec3);
textBox5.Text = objVec2.descargar();
textBox6.Text = objVec3.descargar();
}
private void pregunta6ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.ordenPosiMulti(int.Parse(textBox1.Text));
textBox5.Text = objVec1.descargar();
}
private void pregunta7ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.elimRepet();
textBox5.Text = objVec1.descargar();
}
private void cargarSinRepetToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.cargarSinRepetir(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void cargarSinRepetToolStripMenuItem1_Click(object sender, EventArgs e)
{
objVec1.cargarSinRepetir(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void cargarSinRepetToolStripMenuItem2_Click(object sender, EventArgs e)
{
objVec1.cargarSinRepetir(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void pregunta8ToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.unionVectores(objVec2, ref objVec3);
textBox6.Text = objVec3.descargar();
}
private void cargarToolStripMenuItem_Click(object sender, EventArgs e)
{
objVec1.cargar(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text));
}
private void Form1_Load(object sender, EventArgs e)
{
objVec1 = new classVector();
objVec2 = new classVector();
objVec3 = new classVector();
objVec4 = new classVector();
}
public Form1()
{
InitializeComponent();
}
}
}