Ok so i'm currently building a project where you import a list of proxy's but for some reason I'm getting a System.IndexOutOfRangeException Error which is really bugging me now.
So here is the code it's showing on.
private void LoadProxies()
{
accChecker.Proxies.Clear();
using (OpenFileDialog ofd = new OpenFileDialog())
{
ofd.Title = "Choose a file containing a list of proxies...";
ofd.Filter = "Text Files (*.txt)|*.txt";
if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
foreach (String line in File.ReadAllLines(ofd.FileName))
{
if (line.Contains(":"))
{
String[] data = line.Split(':');
if (!Properties.Settings.Default.ProxiesLogin)
accChecker.QueueProxy(data[0], data[1]);
else
accChecker.QueueProxy(data[0], data[1], data[2], data[3]);
}
}
loadProxiesBtn.Text = String.Format("Load Proxies ({0})", accChecker.Proxies.Count);
if (accChecker.Accounts.Count > 0 && (accChecker.Proxies.Count > 0 || !loadProxiesBtn.Visible))
checkBtn.Enabled = true;
else
checkBtn.Enabled = false;
UpdateInfos(true);
}
}
}
When continue is clicked it then closes the application. I'm not sure if it's a form of my code?