예제 #1
0
        public string GetMeasurementItemText(MeasurementItemViewKind viewKind)
        {
            StringBuilder sb = new StringBuilder("");

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

            if ((viewKind & MeasurementItemViewKind.LogTime) != 0)
            {
                sb.AppendSeparated(LogTime.ToString());
            }

            if ((viewKind & MeasurementItemViewKind.EventTime) != 0)
            {
                sb.AppendSeparated(EventTime.ToString());
            }

            if ((viewKind & MeasurementItemViewKind.Value) != 0)
            {
                sb.AppendSeparated(MeasuredValue.ToString());
            }

            if ((viewKind & MeasurementItemViewKind.Unit) != 0)
            {
                sb.AppendSeparated(MeasuredUnit.ToString());
            }

            return(sb.ToString());
        }
 public MeasurementItemTreeNode(MeasurementItemViewKind viewKind, MeasurementDBItem m, ListViewTreeView LogItemTreeView = null)
     : base(m, m.GetMeasurementItemText(viewKind & (MeasurementItemViewKind.DBId | MeasurementItemViewKind.LogTime | MeasurementItemViewKind.EventTime | MeasurementItemViewKind.Value | MeasurementItemViewKind.Unit)), ListViewClassIconIndexes.II_Measurement, LogItemTreeView)
 {
 }