예제 #1
0
        public void WriteWarning(string text)
        {
            CheckForCancellation();

            if (Warning.IsOpen && Warning.Count < MaxRecords)
            {
                Warning.Add(new WarningRecord(text));
            }
        }
예제 #2
0
 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);
            }
        }
예제 #4
0
        /// <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();
        }
예제 #5
0
 protected virtual void OnWarning(string warning)
 {
     Warning.Add(new WarningRecord(warning));
 }
예제 #6
0
 public void LogError(string severity, string err)
 {
     Warning.Add(err);
     Error.Add(err);
     Information.Add(err);
 }