//構造体コンストラクタ public SMorseAtom(char argChar) : this() { this.CharForMorse = argChar; this.MorseType = !char.IsWhiteSpace(argChar) ? EMrsType.normal : EMrsType.spaceBtwnWords; this.Lang = getLang(argChar); this.MorseCodes = GetMorseFromChar(argChar); }
public SMorseAtom(Morse.EMrsType argMrsType) : this() { this.CharForMorse = argMrsType == EMrsType.spaceBtwnChars ? new char() : argMrsType == EMrsType.spaceBtwnWords ? ' ' : argMrsType == EMrsType.bracketStart ? m.EN_START : argMrsType == EMrsType.bracketEnd ? m.EN_END : new char(); this.MorseType = argMrsType; this.Lang = ELang.NonLang; this.MorseCodes = GetMorseFromChar(argMrsType); }
public static string GetStringForMorse(EMrsType argEMrsType) { switch (argEMrsType) { case EMrsType.spaceBtwnChars: return(""); //文字間の"間" case EMrsType.spaceBtwnWords: return(" "); //単語間の"間" case EMrsType.bracketStart: return(m.EN_START.ToString()); //和文内欧文始まり"(" case EMrsType.bracketEnd: return(m.EN_END.ToString()); //和文内欧文終わり")" case EMrsType.normal: case EMrsType.errorChar: return(""); default: return(""); } }
public static List <char> GetMorseFromChar(EMrsType argEMrsType) { switch (argEMrsType) { //文字間の"間" case EMrsType.spaceBtwnChars: return(m.SPACE_BETWN_CHARS); //単語間の"間" case EMrsType.spaceBtwnWords: return(m.SPACE_BETWN_WORDS); //和文入力の欧文始まり case EMrsType.bracketStart: return(GetMorseFromChar(m.EN_START)); //和文入力の欧文終わり case EMrsType.bracketEnd: return(GetMorseFromChar(m.EN_END)); case EMrsType.normal: case EMrsType.errorChar: default: return(new List <char>()); } }