init
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using DataPROWin7.Common;
|
||||
using DTS.Common.Interface.Channels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.DataModel.Common
|
||||
{
|
||||
public static class ChannelHelper
|
||||
{
|
||||
public static string GetWarningChannelName(IGroupChannel groupChannel)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
if (groupChannel.TestSetupOrder >= 0)
|
||||
{
|
||||
sb.Append($"{groupChannel.TestSetupOrder}, ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append($"{groupChannel.GroupChannelOrder}, ");
|
||||
}
|
||||
|
||||
var name = groupChannel.GetChannelName(SerializedSettings.ISOViewMode);
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
sb.Append("'', ");
|
||||
if (groupChannel.SensorValid)
|
||||
{
|
||||
sb.Append($"({groupChannel.Sensor}) ");
|
||||
}
|
||||
|
||||
if (groupChannel.HardwareValid)
|
||||
{
|
||||
sb.Append($"{groupChannel.Hardware}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append($"'{name}'");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user