using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace WindowsFormsApplication1 { public partial class Form1 : Form { // variable d'instance private DateTime début = DateTime.Now; public Form1() { InitializeComponent(); this.dateTimePicker1.Format = DateTimePickerFormat.Time; this.dateTimePicker1.Width = 100; this.dateTimePicker1.ShowUpDown = true; } private void button_start_Click(object sender, EventArgs e) { // arrêt ou marche ? if (button_start.Text == "Marche") { // on change le libellé du bouton button_start.Text = "Arrêt"; // fin return; } if (button_start.Text == "Arrêt") { // on change le libellé du bouton button_start.Text = "Marche"; // fin return; } } private void timer1_Tick_1(object sender, EventArgs e) { this.dateTimePicker1.Value = DateTime.Now; DateTimePicker timer1_Tick_1 = new DateTimePicker(); // Set the MinDate and MaxDate. timer1_Tick_1.MinDate = new DateTime(1985, 6, 20); timer1_Tick_1.MaxDate = DateTime.Today; } private void checkBox1_CheckedChanged(object sender, EventArgs e) { } private void dateTimePicker2_ValueChanged(object sender, EventArgs e) { } } }