I wrote this code:
Expand|Select|Wrap|Line Numbers
- Class Manager
- private TextBox[] aTextbox = new TextBox[10];
- private string[] sD = new string[10];
- public SerialManager()
- {
- for (int k = 0; k < aTextbox.Length; k++)
- {
- aTextbox[k] = new TextBox();
- }
- }
- void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
- {
- string msg= comPort.ReadTo("\r");
- TabulatedData(msg);
- }
- public void TabulatedData(string msg)
- {
- for(int j=0;j<7;++j)
- {
- sD[j] = msg.Substring(7 + j * 4, 4);
- aTextbox[j].Text = sD[j];
- }
- }
If I have a Form with Textboxes , How can I Display Values From the Class ?
Thanks