Beispiel #1
0
        public static string PingResultString(string ipAddress)
        {
            DateTime localDate = DateTime.Now;

            StringBuilder sb = new StringBuilder();

            sb.Append(localDate.ToString());
            if (DiagnozeWeb.PingHost(ipAddress))
            {
                sb.Append(" ***** Succesfull *****");
            }
            else
            {
                sb.Append(" ------- Failure ------");
            }
            sb.Append("  ping to ");
            sb.AppendLine(ipAddress);

            return(sb.ToString());
        }
        public void GenerateStatus(string ipAddress)
        {
            string newLine = DiagnozeWeb.PingResultString(ipAddress);

            File.AppendAllText(Path, newLine);
        }