public void WriteWarning(string text) { CheckForCancellation(); if (Warning.IsOpen && Warning.Count < MaxRecords) { Warning.Add(new WarningRecord(text)); } }
public ReportViewModel() { error = new ObservableCollection <string>(); warning = new ObservableCollection <string>(); information = new ObservableCollection <string>(); Warning.Add("Warning"); Warning.Add("Warning2"); Error.Add("404"); }
/// <summary> /// Add an error or warning /// </summary> /// <param name="errwarn"></param> public void AddErrorWarningInfo(ErrorWarningType errwarn) { if (errwarn == ErrorWarningType.NONE) { return; } if (errwarn.ToString().StartsWith("ERROR")) { Error.Add(errwarn); } else { Warning.Add(errwarn); } }
/// <summary> /// Inserts the feed back. /// </summary> /// <param name="type">The type.</param> /// <param name="message">The message.</param> public void InsertFeedBack(string type, string message) { switch (type) { case FeedbackType.Error: Error.Add(message); break; case FeedbackType.Success: Success.Add(message); break; case FeedbackType.Warning: Warning.Add(message); break; case FeedbackType.Info: Info.Add(message); break; } Refresh(); }
protected virtual void OnWarning(string warning) { Warning.Add(new WarningRecord(warning)); }
public void LogError(string severity, string err) { Warning.Add(err); Error.Add(err); Information.Add(err); }