-> IPScanner implemented
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using IPScanner;
|
||||
using PTConverter.Plugin;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
@@ -19,45 +21,30 @@ using System.Windows.Shapes;
|
||||
|
||||
namespace Networking.Pages
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
public string IP { get; set; }
|
||||
public string Ping { get; set; }
|
||||
public string Host { get; set; }
|
||||
public string Identification { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für Networking.xaml
|
||||
/// </summary>
|
||||
public partial class IPScanner : UserControl, IPage
|
||||
{
|
||||
|
||||
public IPScanner()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
public string GetCategory() => "";
|
||||
public string GetCategory() => "Networking";
|
||||
|
||||
public UserControl GetPage() => new IPScanner();
|
||||
|
||||
public string GetUnderCategory() => "";
|
||||
public string GetUnderCategory() => "IPScanner";
|
||||
|
||||
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