예제 #1
0
        public SocketGuild[] GetChoGuilds(char c)
        {
            SocketGuild[] guild;
            string        cho = new KoreanChar(c).GetChoSung().GetChar().ToString();

            if ("ㄱㄲㄴㄷㄸㄹ".Contains(cho))
            {
                guild = Program.Guilds[0].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅁㅂㅃㅅㅆ".Contains(cho))
            {
                guild = Program.Guilds[1].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅇㅈㅉ".Contains(cho))
            {
                guild = Program.Guilds[2].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅊㅋㅌㅍㅎ".Contains(cho))
            {
                guild = Program.Guilds[3].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else
            {
                guild = Program.Guilds[4].Select(g => Program.client.GetGuild(g)).ToArray();
            }

            return(guild);
        }
예제 #2
0
        public string GetName(string text)
        {
            string name = "";

            foreach (char c in text)
            {
                if (alpha.Contains(c.ToString()))
                {
                    name += c;

                    continue;
                }

                KoreanChar kc = new KoreanChar(c);

                foreach (KoreanChar sung in new[] { kc.GetChoSung(), kc.GetJoongSung(), kc.GetJongSung() })
                {
                    string s = sung.GetChar().ToString();
                    if (kor.Contains(s))
                    {
                        name += eng[Array.IndexOf(kor, s)];
                    }
                }
            }

            return(name);
        }
예제 #3
0
        public SocketGuild GetChoGuild(char c)
        {
            SocketGuild[] guild;
            string        cho = new KoreanChar(c).GetChoSung().GetChar().ToString();

            if ("ㄱㄲㄴㄷㄸㄹ".Contains(cho))
            {
                guild = Program.Guilds[0].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅁㅂㅃㅅㅆ".Contains(cho))
            {
                guild = Program.Guilds[1].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅇㅈㅉ".Contains(cho))
            {
                guild = Program.Guilds[2].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else if ("ㅊㅋㅌㅍㅎ".Contains(cho))
            {
                guild = Program.Guilds[3].Select(g => Program.client.GetGuild(g)).ToArray();
            }
            else
            {
                guild = Program.Guilds[4].Select(g => Program.client.GetGuild(g)).ToArray();
            }

            SocketGuild grr = null;

            foreach (SocketGuild gl in guild)
            {
                if (gl.Emotes.Count < 100)
                {
                    grr = gl;
                    break;
                }
            }

            return(grr);
        }