Wed Oct 09, 2019 2:02 pm
where is the problem
MK mikrotik = new MK(textBox1.Text, Convert.ToInt16(textBox8.Text));
if (mikrotik.Login(admin, password))
{
mikrotik.Send("/tool/user-manager/profile/print", true);
mikrotik.Send("=.username=name=");
mikrotik.Send("=.proplist=owner=");
mikrotik.Send("=.proplist=name-for-users=");
mikrotik.Send("=.proplist=validity=");
mikrotik.Send("=.proplist=starts-at=");
mikrotik.Send("=.proplist=price=");
mikrotik.Send("=.proplist=override-shared-users=");
mikrotik.Send(".tag=/tool",true);
string result = Convert.ToString(mikrotik.Read());
comboBox1.Items.Clear();
int a1,a2,a3,a4,a5,a6,a7;
foreach (string h in mikrotik.Read())
{
a1 = h.IndexOf("=name=");
a2 = h.IndexOf("=owner=");
a3 = h.IndexOf("=name-for-users=");
a4 = h.IndexOf("=validity=");
a5 = h.IndexOf("=starts-at=");
a6 = h.IndexOf("=price=");
a7 = h.IndexOf("=override-shared-users=");
if (a1 > 0 && a2>0 && a3>0 && a4>0 && a5>0 && a6>0 &&a7>0 )
{
comboBox1.Items.Add(h.Substring(a1));
}
}
}