Hi:
I wrote this code:
The above code is only partial. I can get the value in sD[ j ], but I'm not able to Display with window Form.
If I have a Form with Textboxes , How can I Display Values From the Class ?
Thanks
I wrote this code:
Code:
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
Comment