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
|
namespace _2PPE
{
public class Form1 : Form
{
private static void Main(string[] args)
{ }
static Timer tpsAction = new Timer();
public Form1()
{
Console.WriteLine("ggg");
tpsAction.Enabled = true;
tpsAction.Interval = 10000; //10 secondes
// tpsAction.Tick += tpsAction_Tick; //Appel de la méthode suivante pour l'évenement Tick
tpsAction.Tick += new EventHandler(tpsAction_Tick);
}
public void tpsAction_Tick(object sender, EventArgs e)
{
// Ma methode
}
}
} |
Partager