VPNInfo[] avpns = new VPNInfo[] { };
this.raw_vpns = new string[] { };
int i = 0;
foreach (string line in vpns)
{
if (line.Contains("db.VPN{"))
{
string name = vpns[i + 1].Replace("name:", "").Replace("'", "").Trim();
string ip = vpns[i + 2].Replace("ip:", "").Replace("'", "").Trim();
string config = vpns[i + 3].Replace("config:", "").Replace("'", "").Trim();
string access_lvl = vpns[i + 4].Replace("access_level:", "").Replace("'", "").Trim();
VPNInfo vpn = new VPNInfo(name, ip, config, access_lvl);
avpns.Append(vpn);
this.raw_vpns.Append(name);
MessageBox.Show(name); // DEBUGGING CODE
}
i++;
}
VPNInfo[] avpns = new VPNInfo[] { };
this.raw_vpns = new string[] { };
int i = 0;
foreach (string line in vpns)
{
if (line.Contains("db.VPN{"))
{
string name = vpns[i + 1].Replace("name:", "").Replace("'", "").Trim();
string ip = vpns[i + 2].Replace("ip:", "").Replace("'", "").Trim();
string config = vpns[i + 3].Replace("config:", "").Replace("'", "").Trim();
string access_lvl = vpns[i + 4].Replace("access_level:", "").Replace("'", "").Trim();
VPNInfo vpn = new VPNInfo(name, ip, config, access_lvl);
avpns.Append(vpn);
this.raw_vpns.Append(name);
MessageBox.Show(name); // DEBUGGING CODE
}
i++;
}