Bonjour,
J'affiche un message dans une richtextbox sous la forme suivante :
-----------------------------------------------------------------------------
FlowUpdateWorkshopAgenciesSystemFile
FlowUpdateWorkshopAgenciesSystemFile : FlowUpdateWorkshopAgenciesSystemFile : fichier agencies créer
-----------------------------------------------------------------------------
Quand je clique sur un radio button je souhaite qu'il me réaffiche ce qui est en bleu + un message. exemple :
-----------------------------------------------------------------------------
FlowUpdateWorkshopAgenciesSystemFile
FlowUpdateWorkshopAgenciesSystemFile : FlowUpdateWorkshopAgenciesSystemFile : fichier agencies créer
Information :
FlowUpdateWorkshopAgenciesSystemFile : FlowUpdateWorkshopAgenciesSystemFile : fichier agencies créer
Fin Information.
-----------------------------------------------------------------------------
Cependant, il me met tout mon code en bleu et dans le désordre :
-----------------------------------------------------------------------------
FlowUpdateWorkshopAgenciesSystemFile : FlowUpdateWorkshopAgenciesSystemFile : fichier agencies créer
FlowUpdateWorkshopAgenciesSystemFile
FlowUpdateWorkshopAgenciesSystemFile : FlowUpdateWorkshopAgenciesSystemFile : fichier agencies créer
Information
Inforamtion
-----------------------------------------------------------------------------
Voici mon code :
et celui du set info correspondant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 private void radioButtons_CheckedChanged(object sender, EventArgs e) { RadioButton nc = (RadioButton)sender; if(nc.Checked == true){ List<string> listText = _Plugins[tabControl1.SelectedTab.Text].retourListText(); List<int> listint = _Plugins[tabControl1.SelectedTab.Text].retourListInt(); for (int i = 0; i < listint.Count; i++) { if (nc.Text == "information") { if (listint[i] == 0) { richTextBox1.Text += "Information \n"; SetInfos(listint[i], listText[i]); richTextBox1.Text += "Inforamtion \n"; } }
Je tiens a préciser qu'il fonctionne bien si je ne met pas les 2 informations
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 if (type == 0) { richTextBox1.Invoke(new MethodInvoker(delegate { richTextBox1.SelectionColor = Color.Blue; })); richTextBox1.Invoke(new MethodInvoker(delegate { richTextBox1.SelectedText += _Plugins[tabControl1.SelectedTab.Text].Name() + " : " + _text + "\n"; })); }
Merci d'avance pour votre aide !
Partager