1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
private void Add_New_Run(object sender, EventArgs e)
{
//Récupération des données
this.MyDay = CBB.SelectedItem.ToString();
this.MyHour = Convert.ToInt16(NUD_1.Value);
this.MyMinute = Convert.ToInt16(NUD_2.Value);
TreeNode NTD = new TreeNode();
NTD.Text = this.MyDay + " at " + this.MyHour.ToString() + ":" + this.MyMinute.ToString();
NTD.ImageIndex = 1;
NTD.SelectedImageIndex = 1;
try { TV.Nodes.Find(this.MyDay, false)[0].Nodes.Add(NTD); }
catch (Exception err) { new Error("Error while setting a new Run (specif automatic mode)", err.Message); }
} |