Skip to content

Commit

Permalink
1234
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Marotco committed May 20, 2021
1 parent 4a066b8 commit 1ec3845
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 43 deletions.
2 changes: 1 addition & 1 deletion bulk_ip_lookup/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
</startup>
</configuration>
33 changes: 17 additions & 16 deletions bulk_ip_lookup/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 14 additions & 15 deletions bulk_ip_lookup/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IP_Bulk_lookup
namespace IP_Bulk_Lookup
{
public partial class Form1 : Form
{
Expand Down Expand Up @@ -87,13 +87,13 @@ private async void GetHostEntryAsync(object IP)
y[1] = ee.Message;
//File.AppendAllText("EventLog.txt", "Dns.GetHostEntry: " + ip + " текст ошибки: " + ee.Message.ToString() + Environment.NewLine);
}
Thread.Sleep(10);
//Thread.Sleep(10);
await Task.Factory.StartNew(() => InsertIntoList(new ListViewItem(y))).ConfigureAwait(false);
}
catch { /*File.AppendAllText("EventLog.txt", "GetHostEntryAsync. Ошибка проверки IP: " + ip + Environment.NewLine); */}

}
catch (Exception ee) { /*File.AppendAllText("EventLog.txt", "GetHostEntryAsync. Иная ошибка: " + ee.ToString() + Environment.NewLine);*/ }
catch { /*File.AppendAllText("EventLog.txt", "GetHostEntryAsync. Иная ошибка: " + ee.ToString() + Environment.NewLine);*/ }
//Progress_change(-1);
}

Expand All @@ -104,7 +104,7 @@ private void LinkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs

private void Form1_Load(object sender, EventArgs e)
{
Icon = Properties.Resources.Icon;
Icon = IP_Bulk_Lookup.Properties.Resources.Icon;
this.AllowDrop = true;
lvwColumnSorter = new ListViewColumnSorter();
this.listView2.ListViewItemSorter = lvwColumnSorter;
Expand All @@ -120,7 +120,7 @@ private void Form1_Load(object sender, EventArgs e)
/// <returns></returns>
private int Get_IPs_count_for_mask(int mask)
{
int max = 0;
int max;
switch (mask)
{
case 24:
Expand Down Expand Up @@ -197,7 +197,6 @@ private void ОтменаToolStripMenuItem_Click(object sender, EventArgs e)
contextMenuStrip1.Hide();
}


private void PictureBox1_Click(object sender, EventArgs e)
{
try
Expand Down Expand Up @@ -356,19 +355,19 @@ private async void GET_DNS_NAME(string lines)
/// <summary>
/// Удаляет одинаковые элементы в listView
/// </summary>
/// <param name="ListView"></param>
public void RemoveDuplicates_In_ListView(ListView ListView)
/// <param name="ListView111"></param>
public void RemoveDuplicates_In_ListView(ListView ListView111)
{
try
{
if (ListView == null)
if (ListView111 == null)
{
throw new ArgumentNullException(nameof(ListView));
throw new ArgumentNullException(nameof(ListView111));
}

var tags = new HashSet<string>();
var duplicates = new List<ListViewItem>();
foreach (ListViewItem item in ListView.Items)
foreach (ListViewItem item in ListView111.Items)
{
if (!tags.Add(item.Text))// HashSet.Add() returns false if it already contains the key.
{
Expand Down Expand Up @@ -438,22 +437,22 @@ private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
System.Diagnostics.Process.Start("https://github.com/sergiomarotco/IP-Bulk-lookup");
}

private void copyIPToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
private void CopyIPToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
CopyFromView(1);
}

private void copyNameToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
private void CopyNameToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
CopyFromView(2);
}

private void label6_Click(object sender, EventArgs e)
private void Label6_Click(object sender, EventArgs e)
{
CopyFromView(0);
}

private void label2_Click(object sender, EventArgs e)
private void Label2_Click(object sender, EventArgs e)
{
if (listView2.Items != null && listView2.Items.Count != 0)
listView2.Items.Clear();
Expand Down
Binary file added bulk_ip_lookup/GlobalSuppressions.cs
Binary file not shown.
7 changes: 4 additions & 3 deletions bulk_ip_lookup/IP_Bulk_lookup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AF8835D6-EBF3-4B7F-9ADF-EBEFF59A74D5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>IP_Bulk_lookup</RootNamespace>
<RootNamespace>IP_Bulk_Lookup</RootNamespace>
<AssemblyName>IP bulk lookup</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
Expand Down Expand Up @@ -55,7 +55,7 @@
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup>
<StartupObject>IP_Bulk_lookup.Program</StartupObject>
<StartupObject>IP_Bulk_Lookup.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
Expand Down Expand Up @@ -89,6 +89,7 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="ListViewColumnSorter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
3 changes: 2 additions & 1 deletion bulk_ip_lookup/ListViewColumnSorter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;
using System.Windows.Forms;

namespace IP_Bulk_lookup
namespace IP_Bulk_Lookup
{
/// <summary>
/// This class is an implementation of the 'IComparer' interface.
Expand All @@ -29,6 +29,7 @@ public ListViewColumnSorter()
/// <param name="x">First object to be compared</param>
/// <param name="y">Second object to be compared</param>
/// <returns>The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'</returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Int32.TryParse(System.String,System.Int32@)")]
public int Compare(object x, object y)
{
int compareResult;
Expand Down
2 changes: 1 addition & 1 deletion bulk_ip_lookup/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Windows.Forms;

namespace IP_Bulk_lookup
namespace IP_Bulk_Lookup
{
internal static class Program
{
Expand Down
6 changes: 3 additions & 3 deletions bulk_ip_lookup/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[assembly: AssemblyDescription("Программа быстрого массового запроса сетевого имени по IP")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("[email protected]")]
[assembly: AssemblyProduct("IP_Bulk_lookup")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyProduct("IP_Bulk_Lookup")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 2 additions & 2 deletions bulk_ip_lookup/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bulk_ip_lookup/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ec3845

Please sign in to comment.