hi and sorry about my next bad english ![]()
i want to make a small tool look like winbox using c# api class and this the class link
[u]http://wiki.mikrotik.com/wiki/API_in_C_Sharp[/u]
but when i add a code inside a timer to update cpu-load and uptime every 5 second the form hang’s and freeze for a moment every time the timer trying to send a command to the mikrotik server
that’s main my application will stop and hang for 1 second every time the timer will send the command to the server
this is my timer code
private void ResourcesTimer_Tick(object sender, EventArgs e)
{
MK API = new MK(addr);
if (API.Login(user, pass))
{
API.Send("/system/resource/print", true);
foreach(string r in API.Read()){
// update cpu-load and uptime
}
API.Close();
}
}
so any one can help me to solve this problem or tell my what is the reason ?
thank you and i hope I was able to explain my problem in the right way ![]()