示例#1
0
        /// <summary>
        /// Formats a Chart Label consistent of Name, Phase and Type
        /// </summary>
        /// <param name="channel">The Channel from which the Label is generated.</param>
        /// <param name="type">The type of the signal (RMS/Pow...)</param>
        /// <returns>Formated Chart Label</returns>
        public static string GetChartLabel(openXDA.Model.Channel channel, string type = null)
        {
            if (channel.MeasurementType.Name == "Voltage" && type == null)
            {
                return("V" + DisplayPhaseName(channel.Phase));
            }
            else if (channel.MeasurementType.Name == "Current" && type == null)
            {
                return("I" + DisplayPhaseName(channel.Phase));
            }
            else if (channel.MeasurementType.Name == "TripCoilCurrent" && type == null)
            {
                return("TCE" + DisplayPhaseName(channel.Phase));
            }
            else if (channel.MeasurementType.Name == "TripCoilCurrent")
            {
                return("TCE" + DisplayPhaseName(channel.Phase) + " " + type);
            }
            else if (channel.MeasurementType.Name == "Voltage")
            {
                return("V" + DisplayPhaseName(channel.Phase) + " " + type);
            }
            else if (channel.MeasurementType.Name == "Current")
            {
                return("I" + DisplayPhaseName(channel.Phase) + " " + type);
            }

            return(null);
        }
示例#2
0
        private string GetChartLabel(openXDA.Model.Channel channel, string type = null)
        {
            if (channel.MeasurementType.Name == "Voltage" && type == null)
            {
                return("V" + channel.Phase.Name);
            }
            else if (channel.MeasurementType.Name == "Current" && type == null)
            {
                return("I" + channel.Phase.Name);
            }
            else if (channel.MeasurementType.Name == "Voltage")
            {
                return("V" + channel.Phase.Name + " " + type);
            }
            else if (channel.MeasurementType.Name == "Current")
            {
                return("I" + channel.Phase.Name + " " + type);
            }

            return(null);
        }