Beispiel #1
0
        public string GetErrorItemText(ErrorItemViewKind errorViewKind)
        {
            StringBuilder sb = new StringBuilder("");

            if ((errorViewKind & ErrorItemViewKind.DBId) != 0)
            {
                sb.Append($"[{Id.ToString()}]");
            }

            if ((errorViewKind & ErrorItemViewKind.LogTime) != 0)
            {
                sb.AppendSeparated(LogTime.ToString());
            }

            if ((errorViewKind & ErrorItemViewKind.EventTime) != 0)
            {
                sb.AppendSeparated(EventTime.ToString());
            }

            if ((errorViewKind & ErrorItemViewKind.ErrorMessage) != 0)
            {
                sb.AppendSeparated(ErrorMessage);
            }

            return(sb.ToString());
        }
Beispiel #2
0
        public string GetErrorItemText(ErrorItemViewKind UnitViewKind)
        {
            string str = "";

            if ((UnitViewKind & ErrorItemViewKind.DBId) != 0)
            {
                str += "[" + Id.ToString() + "]";
            }

            if ((UnitViewKind & ErrorItemViewKind.LogTime) != 0)
            {
                if (!string.IsNullOrWhiteSpace(str))
                {
                    str += " ";
                }
                str += LogTime.ToString();
            }

            if ((UnitViewKind & ErrorItemViewKind.EventTime) != 0)
            {
                if (!string.IsNullOrWhiteSpace(str))
                {
                    str += " ";
                }
                str += EventTime.ToString();
            }

            if ((UnitViewKind & ErrorItemViewKind.ErrorMessage) != 0)
            {
                if (!string.IsNullOrWhiteSpace(str))
                {
                    str += " ";
                }
                str += ErrorMessage.ToString();
            }

            return(str);
        }
 public ErrorItemTreeNode(ErrorItemViewKind viewKind, InternalErrorDBItem e, ListViewTreeView LogItemTreeView = null)
     : base(e.GetErrorItemText(viewKind & (ErrorItemViewKind.DBId | ErrorItemViewKind.LogTime | ErrorItemViewKind.EventTime | ErrorItemViewKind.ErrorMessage)), ListViewClassIconIndexes.II_InternalError, LogItemTreeView)
 {
 }