Skip to content

Commit

Permalink
Fixed Dictionary Bug#3_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
TheM4hd1 committed Apr 29, 2018
1 parent d71a013 commit 31f3a93
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions PeNCrawLer 0.1.0/Forms/FrmSettings.cs
Original file line number Diff line number Diff line change
@@ -62,6 +62,8 @@ private void btnSaveChanges_Click(object sender, EventArgs e)

foreach(ListViewItem item in lvwHtmlElements.Items)
{
if (CrawlerSettings.HtmlTagAndAttribute.ContainsKey(item.Text))
continue;
CrawlerSettings.HtmlTagAndAttribute.Add(item.Text, item.SubItems[1].Text);
}
}
@@ -72,6 +74,8 @@ private void btnSaveChanges_Click(object sender, EventArgs e)

foreach (ListViewItem item in lvwLimitCrawling.Items)
{
if (CrawlerSettings.LinksPatternAndMaxValue.ContainsKey(item.Text))
continue;
CrawlerSettings.LinksPatternAndMaxValue.Add(item.Text, int.Parse(item.SubItems[1].Text));
}
}
@@ -82,6 +86,8 @@ private void btnSaveChanges_Click(object sender, EventArgs e)

foreach(ListViewItem item in lvwSearch.Items)
{
if (CrawlerSettings.SearchInputAndValue.ContainsKey(item.Text[0]))
continue;
CrawlerSettings.SearchInputAndValue.Add(item.Text[0], item.SubItems[1].Text);
}
}
@@ -92,6 +98,8 @@ private void btnSaveChanges_Click(object sender, EventArgs e)

foreach(ListViewItem item in lvwFormSubmission.Items)
{
if (FormSubmissionSettings.FieldnameAndFieldvalue.ContainsKey(item.SubItems[1].Text))
continue;
FormSubmissionSettings.FieldnameAndFieldvalue.Add(item.SubItems[1].Text, item.SubItems[2].Text);
}
}
@@ -102,6 +110,8 @@ private void btnSaveChanges_Click(object sender, EventArgs e)
foreach(string header in lbxHeaders.Items)
{
string[] values = header.Split(':');
if (HttpRequestSettings.HeaderAndValue.ContainsKey(values[0]))
continue;
HttpRequestSettings.HeaderAndValue.Add(values[0], values[1]);
}
}

0 comments on commit 31f3a93

Please sign in to comment.