@@ -29,11 +29,11 @@ internal static void SaveAsText(string path, ItemsControl lvPorts)
2929 LvCheck l = ( LvCheck ) lvPorts . Items [ i ] ;
3030 if ( i == lvPorts . Items . Count - 1 )
3131 {
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 ) ;
3333 }
3434 else
3535 {
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 ) ;
3737 }
3838 }
3939 }
@@ -69,10 +69,10 @@ internal static void SaveAsHTML(string path, ItemsControl lvPorts)
6969
7070 sw . WriteLine ( "<h1>Export list</h1>" ) ;
7171 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>" ) ;
7373 foreach ( LvCheck l in lvPorts . Items )
7474 {
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>" ) ;
7676 }
7777 sw . WriteLine ( "</table>" ) ;
7878
@@ -100,17 +100,17 @@ internal static void SaveAsCSV(string path, ItemsControl lvPorts)
100100 {
101101 using ( StreamWriter sw = new StreamWriter ( path ) )
102102 {
103- sw . WriteLine ( "Advanced PortChecker; " + DateTime . Now ) ;
103+ sw . WriteLine ( "Advanced PortChecker, " + DateTime . Now ) ;
104104 for ( int i = 0 ; i < lvPorts . Items . Count ; i ++ )
105105 {
106106 LvCheck l = ( LvCheck ) lvPorts . Items [ i ] ;
107107 if ( i == lvPorts . Items . Count - 1 )
108108 {
109- sw . Write ( l . Address + "; " + l . Port + "; " + l . Type + "; " + l . Description ) ;
109+ sw . Write ( l . Address + ", " + l . Port + ", " + l . HostName + "," + l . Type + ", " + l . Description ) ;
110110 }
111111 else
112112 {
113- sw . WriteLine ( l . Address + "; " + l . Port + "; " + l . Type + "; " + l . Description ) ;
113+ sw . WriteLine ( l . Address + ", " + l . Port + ", " + l . HostName + "," + l . Type + ", " + l . Description ) ;
114114 }
115115 }
116116 }
0 commit comments