Esempio n. 1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Channel,");
            sb.Append(theChannel.SavedIndex.ToString() + COMMA);
            sb.Append(utils.XMLifyName(theChannel.Name) + COMMA);
            sb.Append(COMMA);             // Centiseconds
            sb.Append(SeqEnums.DeviceName(theChannel.output.deviceType) + COMMA);
            if (theChannel.output.deviceType == DeviceType.LOR)
            {
                sb.Append(theChannel.output.unit.ToString() + COMMA);
                sb.Append(theChannel.output.networkName + COMMA);
                sb.Append(theChannel.output.circuit.ToString() + COMMA);
                sb.Append(COMMA + COMMA);
            }
            if (theChannel.output.deviceType == DeviceType.DMX)
            {
                sb.Append(COMMA + COMMA + COMMA);
                sb.Append(theChannel.output.universe.ToString() + COMMA);
                sb.Append(theChannel.output.channel.ToString() + COMMA);
            }
            sb.Append(theChannel.color.ToString() + COMMA);
            sb.Append("#" + utils.Color_LORtoHTML(theChannel.color) + COMMA);
            sb.Append(NearestColor.FindNearestColorName(theChannel.color));

            string ret = sb.ToString();

            return(ret);
        }
Esempio n. 2
0
        public override string ToString()
        {
            string ret = utils.XMLifyName(theChannel.Name);
            int    p   = theChannel.Name.IndexOf(',');

            if (p >= 0)
            {
                ret = "\"" + ret + "\"";
            }

            ret += ",";
            if (isKeywd)
            {
                ret += "Yes,";
            }
            else
            {
                ret += "No,";
            }
            ret += foundOrder.ToString();
            ret += theChannel.SavedIndex.ToString() + ",";
            DeviceType devType = theChannel.output.deviceType;

            ret += SeqEnums.DeviceName(devType) + ",";
            if (devType == DeviceType.LOR)
            {
                ret += theChannel.output.unit.ToString() + "," + theChannel.output.channel.ToString() + ",";
            }
            if (devType == DeviceType.DMX)
            {
                ret += theChannel.output.network.ToString() + "," + theChannel.output.channel.ToString() + ",";
            }
            if (devType == DeviceType.Digital)
            {
                ret += theChannel.output.network.ToString() + "," + theChannel.output.channel.ToString() + ",";
            }
            if (devType == DeviceType.None)
            {
                ret += ",,";
            }
            ret += utils.Color_LORtoHTML(theChannel.color) + ",";
            ret += NearestColor.FindNearestColorName(theChannel.Color);             // + ",";
            return(ret);
        }