Salut tout le monde
J'ai un petit probleme que j'arrive pas à résoudre
j'ai une Form FEntree
Code C# : 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace compilateur { public partial class FEntree : Form { public FEntree() { InitializeComponent(); } private void ButtonOk_Click(object sender, EventArgs e) { this.Close(); } private void ButtonAnnuler_Click(object sender, EventArgs e) { textBoxEntree.Text = "0"; } private void labelEntree_Click(object sender, EventArgs e) { } } }
et une classe InterpreteurIHM dans un fichier InterpreteurIHM.cs
Code C# : 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 using System; using System.Collections.Generic; using System.Text; namespace compilateur { class InterpreteurIHM : InterpreteurAbstr { private FInterprete ficheIhm; public InterpreteurIHM(int end, FInterprete formulaire) : base(end) { ficheIhm = formulaire; } public InterpreteurIHM() : base() { } protected override void Lire(char symb, out int x) { ficheIhm.formSaisie = new FEntree(); ficheIhm.formSaisie.labelEntree.Text = "Entrez " + symb + " : "; ficheIhm.formSaisie.ShowDialog(ficheIhm); x = Convert.ToInt32(ficheIhm.formSaisie.textBoxEntree.Text); } protected override void Ecrire(char symb, int x) { ficheIhm.textBoxResult.AppendText(">> " + symb + " = " + x + "\r\n"); } } }
et voila l'erreur renvoyée
Merci d'avance pour l'aideErreur 1 'compilateur.FEntree.labelEntree' est inaccessible en raison de son niveau de protection C:\programme\compilateur\compilateur\InterpreteurIHM.cs 22 33 compilateur
Erreur 2 'compilateur.FEntree.textBoxEntree' est inaccessible en raison de son niveau de protection C:\programme\compilateur\compilateur\InterpreteurIHM.cs 24 53 compilateur
Erreur 3 'compilateur.FInterprete.textBoxResult' est inaccessible en raison de son niveau de protection C:\programme\compilateur\compilateur\InterpreteurIHM.cs 28 22 compilateur
Partager