c# client "bandwidth test" chart

Hello everybody i post a new topic again.

Sorry for my englsih.


I’am french student.

I use mikrotik4net library with visual studio 2013.

I develope a client in c# (windows form)

I trying with my clkient to make a “bandwidth-test” and plot value in a chart.

My code :

TikSession mks = new TikSession(TikConnectorType.Api);
mks.Open(textBox1_address.Text, textBox1_login.Text, textBox1_passwd.Text);
IApiConnector apiConnector = (IApiConnector)mks.Connector; //!!! MOST important row in sample

List macScanList = apiConnector.ApiExecuteReader(“/tool/bandwidth-test”,
new Dictionary<string, string>
{
{“address”,“192.168.10.100”},
{“user”,“*****”},
{“password”,“****”},
{“duration”,“30”}
});
foreach (ITikEntityRow row in macScanList)
{
textBox1_getinfo.Text = row.DataRow;
}


but i get only last value , whereas i want all value to plot in my chart.


Maybe you have idea.


Best Regards,

With the line

textBox1_getinfo.Text = row.DataRow;

you’re replacing the data in the text box.

You’ll want to append to it instead, e.g.

textBox1_getinfo.Text += row.DataRow;

thank you for your answer.
I get all value.