コード例 #1
0
        public string Translate(SerialParityType parityType)
        {
            switch (parityType)
            {
            case SerialParityType.None:
                return(this.GetText(MsgCode.None));

            case SerialParityType.Odd:
                return(this.GetText(MsgCode.Odd));

            case SerialParityType.Even:
                return(this.GetText(MsgCode.Even));

            case SerialParityType.Mark:
                return(this.GetText(MsgCode.Mark));

            case SerialParityType.Space:
                return(this.GetText(MsgCode.Space));

            default:
                return(parityType.ToString());
            }
        }
コード例 #2
0
 public static string Display(this SerialParityType spt)
 {
     return(spt.ToString());
 }