Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of class Error.
 /// </summary>
 /// <param name="cause">The cause of the error.</param>
 /// <param name="level">The level of the error.</param>
 public Error(string cause, WarningLevels level)
 {
     this.Line = 0;
     this.Cause = cause;
     this.Level = level;
     switch (level)
     {
         case WarningLevels.Fatal:
             IconPath = "Images\\error_sign.png";
             break;
         case WarningLevels.NonFatal:
             IconPath = "Images\\warning_sign.png";
             break;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of class Error.
 /// </summary>
 /// <param name="line">The line at which the error occured.</param>
 /// <param name="cause">The cause of the error.</param>
 /// <param name="level">The level of the error.</param>
 public Error(int line, string cause, WarningLevels level)
     : this(cause, level)
 {
     this.Line = line;
 }
 public void AddWaringLevel(string displayName, string value)
 {
     WarningLevels.Add(new WarningLevel(displayName, value));
 }