Code Plex Silverlight Toolkit http silverlight codeplex comReleaseProject

  • Slides: 13
Download presentation

실습 - 자동완성 § Code. Plex에서 제공하는 Silverlight Toolkit을 이용 - http: //silverlight. codeplex.

실습 - 자동완성 § Code. Plex에서 제공하는 Silverlight Toolkit을 이용 - http: //silverlight. codeplex. com/Release/Project. Releases. a spx? Release. Id=20430 - Silverlight 2 Toolkit March 2009 Installer를 Download 후 설치 § Auto. Complete. Box 사용 § System. Windows. Controls. Input. Toolkit 참조 추가 Artificial Intelligence Laboratory

실습 - 자동완성 § Page. xaml § <User. Control>에 아래 내용추가 - xmlns: Toolkit="clrnamespace:

실습 - 자동완성 § Page. xaml § <User. Control>에 아래 내용추가 - xmlns: Toolkit="clrnamespace: System. Windows. Controls; assembly=System. Windows. Controls. Input. Toolkit" § <Toolkit: Auto. Complete. Box> 추가 Artificial Intelligence Laboratory

실습 - 자동완성 § Page. xaml. cs § 결과 Artificial Intelligence Laboratory

실습 - 자동완성 § Page. xaml. cs § 결과 Artificial Intelligence Laboratory

실습 - 자동완성 § 자소 분리 함수 string String. To. Jaso(string str) { int

실습 - 자동완성 § 자소 분리 함수 string String. To. Jaso(string str) { int hangul, jong, jung, cho; string result = ""; int i = 0; for (i = 0; i < str. Length; i++) { if (str[i] < 128) // 영문 result += str[i]; else if (str[i] >= 0 x. AC 00 && str[i] <= 0 x. D 7 A 3) // 한글(완성형) : 0 x. AC 00 -> '가', 0 x. D 7 A 3 -> '힣' { hangul = (int)(str[i]) - 0 x. AC 00; jong = hangul % 28; jung = ((hangul - jong) / 28) % 21; cho = ((hangul - jong) / 28) / 21; result += chosung. Element. At(cho) + jungsung. Element. At(jung) + jongsung. Element. At(jong); } else if (str[i] >= 0 x 3131 && str[i] <= 0 x 3163) // 한글(자소) : 0 x 3131 -> 'ㄱ', 0 x 3163 -> 'l' { result += str[i]; } } return result; } Artificial Intelligence Laboratory