-> IPScanner added
-> PortScanner added
This commit is contained in:
63
Networking/Pages/IPScanner.xaml.cs
Normal file
63
Networking/Pages/IPScanner.xaml.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using IPScanner;
|
||||
using PTConverter.Plugin;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Networking.Pages
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für Networking.xaml
|
||||
/// </summary>
|
||||
public partial class IPScanner : UserControl, IPage
|
||||
{
|
||||
|
||||
public IPScanner()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string GetCategory() => "";
|
||||
|
||||
public UserControl GetPage() => new IPScanner();
|
||||
|
||||
public string GetUnderCategory() => "";
|
||||
|
||||
string IPtoString(byte[] array)
|
||||
{
|
||||
//
|
||||
// Concatenate all the elements into a StringBuilder.
|
||||
//
|
||||
StringBuilder strinbuilder = new StringBuilder();
|
||||
for (int i = 0; i < array.Count(); i++)
|
||||
{
|
||||
|
||||
strinbuilder.Append(array[i]);
|
||||
if (i != array.Count() - 1)
|
||||
strinbuilder.Append('.');
|
||||
}
|
||||
return strinbuilder.ToString();
|
||||
}
|
||||
|
||||
private string GetPingTime(IPScanResult result)
|
||||
{
|
||||
if (result.ping > -1)
|
||||
return result.ping + " ms";
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user