@@ -29,11 +29,11 @@ internal static void SaveAsText(string path, ItemsControl lvPorts)
29
29
LvCheck l = ( LvCheck ) lvPorts . Items [ i ] ;
30
30
if ( i == lvPorts . Items . Count - 1 )
31
31
{
32
- sw . Write ( l . Address + "\t " + l . Port + "\t " + l . Type + "\t " + l . Description ) ;
32
+ sw . Write ( l . Address + "\t " + l . Port + "\t " + l . HostName + " \t " + l . Type + "\t " + l . Description ) ;
33
33
}
34
34
else
35
35
{
36
- sw . WriteLine ( l . Address + "\t " + l . Port + "\t " + l . Type + "\t " + l . Description ) ;
36
+ sw . WriteLine ( l . Address + "\t " + l . Port + "\t " + l . HostName + " \t " + l . Type + "\t " + l . Description ) ;
37
37
}
38
38
}
39
39
}
@@ -69,10 +69,10 @@ internal static void SaveAsHTML(string path, ItemsControl lvPorts)
69
69
70
70
sw . WriteLine ( "<h1>Export list</h1>" ) ;
71
71
sw . WriteLine ( "<table border='1'>" ) ;
72
- sw . WriteLine ( "<tr><th>Address</th><th>Port</th><th>Type</th><th>Description</th></tr>" ) ;
72
+ sw . WriteLine ( "<tr><th>Address</th><th>Port</th><th>Host name</th><th> Type</th><th>Description</th></tr>" ) ;
73
73
foreach ( LvCheck l in lvPorts . Items )
74
74
{
75
- sw . WriteLine ( "<tr><td>" + l . Address + "</td><td>" + l . Port + "</td><td>" + l . Type + "</td><td>" + l . Description + "</td></tr>" ) ;
75
+ sw . WriteLine ( "<tr><td>" + l . Address + "</td><td>" + l . Port + "</td><td>" + l . HostName + "</td><td>" + l . Type + "</td><td>" + l . Description + "</td></tr>" ) ;
76
76
}
77
77
sw . WriteLine ( "</table>" ) ;
78
78
@@ -100,17 +100,17 @@ internal static void SaveAsCSV(string path, ItemsControl lvPorts)
100
100
{
101
101
using ( StreamWriter sw = new StreamWriter ( path ) )
102
102
{
103
- sw . WriteLine ( "Advanced PortChecker; " + DateTime . Now ) ;
103
+ sw . WriteLine ( "Advanced PortChecker, " + DateTime . Now ) ;
104
104
for ( int i = 0 ; i < lvPorts . Items . Count ; i ++ )
105
105
{
106
106
LvCheck l = ( LvCheck ) lvPorts . Items [ i ] ;
107
107
if ( i == lvPorts . Items . Count - 1 )
108
108
{
109
- sw . Write ( l . Address + "; " + l . Port + "; " + l . Type + "; " + l . Description ) ;
109
+ sw . Write ( l . Address + ", " + l . Port + ", " + l . HostName + "," + l . Type + ", " + l . Description ) ;
110
110
}
111
111
else
112
112
{
113
- sw . WriteLine ( l . Address + "; " + l . Port + "; " + l . Type + "; " + l . Description ) ;
113
+ sw . WriteLine ( l . Address + ", " + l . Port + ", " + l . HostName + "," + l . Type + ", " + l . Description ) ;
114
114
}
115
115
}
116
116
}
0 commit comments