Пример #1
0
 /// <summary>
 /// Sends the value.
 /// </summary>
 /// <param name="VM">The vm.</param>
 public override void SendValue(ValueMessage VM)
 {
     if (VM.Value == null)
         Console.WriteLine("LOG: " + GetIndentString() + String.Format("{0} = NULL", VM.Message));
     else
         Console.WriteLine("LOG: " + GetIndentString() + String.Format("{0} = '{1}'", VM.Message, VM.Value.ToString()));
 }
Пример #2
0
 /// <summary>
 /// Sends the value.
 /// </summary>
 /// <param name="VM">The vm.</param>
 public abstract void SendValue(ValueMessage VM);
Пример #3
0
 /// <summary>
 /// Sends the value.
 /// </summary>
 /// <param name="VM">The vm.</param>
 public override void SendValue(ValueMessage VM)
 {
     if (VM.Value == null)
     {
         OutputStream.WriteLine("{0}{1} {2} = **NULL**",
           VM.UTCTime.ToString("dd-MM-yyyy") + " " + VM.UTCTime.ToLongTimeString(),
           GetIndentString(),
           VM.Message);
         WriteMessage = true;
     }
     else
     {
         ArrayList tempArray = new ArrayList(VM.Value.ToString().Split('\r', '\n'));
         string tempString = new String(' ', VM.UTCTime.ToString("dd-MM-yyyy").Length + 1 + VM.UTCTime.ToLongTimeString().Length);
         tempString += "";
         tempString += GetIndentString();
         tempString += " " + new String(' ', VM.Message.Length) + "  ";
         OutputStream.WriteLine("{0}{1} {2} = '{3}'",
           VM.UTCTime.ToString("dd-MM-yyyy") + " " + VM.UTCTime.ToLongTimeString(),
           GetIndentString(),
           VM.Message,
           tempArray[0].ToString());
         tempArray.RemoveAt(0);
         foreach (String s in tempArray)
         {
             if (s.Trim('\r', '\n').Length != 0)
             {
                 OutputStream.WriteLine("{0} '{1}'",
                   tempString,
                   s);
             }
         }
         WriteMessage = true;
     }
 }