public WrappedString ReadCurrentMessage()
        {
            WrappedString s = new WrappedString();
            StringBuilder returnString = new StringBuilder();
            try
            {
                string[] file = System.IO.File.ReadAllLines(@"\\10.111.124.47\c$\RecBoard\Welcome.txt");

                int lines = 0;
                //get first 5 lines
                foreach (string line in file)
                {
                    lines++;
                    line.Replace("  ", "  ");
                    returnString.Append(line + "<br>");
                    if (lines == 5)
                        break;
                }
            }
            catch
            {
                s.Message = "Could not read/retreive welcome message!";
                return s;
            }

            s.Message = returnString.ToString();
            return s;
        }
Exemple #2
0
 private static extern int NativeParseInt([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(WrappedStringCustomMarshaler))] WrappedString str);