xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡(jiǎn)介

在一個(gè)項(xiàng)目總ComboBox中有很多項(xiàng)目,用戶查找非常麻煩,系統(tǒng)自帶的快速定位是匹配首字母,使用起來(lái)非常不方便。網(wǎng)上找了很多,都是基于Items.Add()的方式,這種方式不支持?jǐn)?shù)據(jù)源的鍵值對(duì)應(yīng)。所以自己寫了一個(gè),發(fā)上來(lái)給大家分享!

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;

namespace?Socg
{
public?class?Common
{
#region?public?static?char?GetChineseSpell()----提取漢字的拼音首字母
///?
///?將Asc碼轉(zhuǎn)換為拼音首字母。
///?如果?Asc?小于256,則原樣返回
///?如果?轉(zhuǎn)換失敗,則返回“*“。如:中文標(biāo)點(diǎn)符號(hào)
///?速度:25000000次/秒
///?

///?字符的Asc碼
///?拼音首字母
public?static?char?GetChineseSpell(int?ChineseAsc)
{
if(ChineseAsc? return?(char)ChineseAsc;
else?if(ChineseAsc?>=?45217?&&?ChineseAsc? return?‘A‘;
else?if(ChineseAsc?>=?45253?&&?ChineseAsc? return?‘B‘;
else?if(ChineseAsc?>=?45761?&&?ChineseAsc? return?‘C‘;
else?if(ChineseAsc?>=?46318?&&?ChineseAsc? return?‘D‘;
else?if(ChineseAsc?>=?46826?&&?ChineseAsc? return?‘E‘;
else?if(ChineseAsc?>=?47010?&&?ChineseAsc? return?‘F‘;
else?if(ChineseAsc?>=?47297?&&?ChineseAsc? return?‘G‘;
else?if(ChineseAsc?>=?47614?&&?ChineseAsc? return?‘H‘;
// else?if(ChineseAsc>=48119&&ChineseAsc<48119)return?‘I‘;
else?if(ChineseAsc?>=?48119?&&?ChineseAsc? return?‘J‘;
else?if(ChineseAsc?>=?49062?&&?ChineseAsc? return?‘K‘;
else?if(ChineseAsc?>=?49324?&&?ChineseAsc? return?‘L‘;
else?if(ChineseAsc?>=?49896?&&?ChineseAsc? return?‘M‘;
else?if(ChineseAsc?>=?50371?&&?ChineseAsc? return?‘N‘;
else?if(ChineseAsc?>=?50614?&&?ChineseAsc? return?‘O‘;
else?if(ChineseAsc?>=?50622?&&?ChineseAsc? return?‘P‘;
else?if(ChineseAsc?>=?50906?&&?ChineseAsc? return?‘Q‘;
else?if(ChineseAsc?>=?51387?&&?ChineseAsc? return?‘R‘;
else?if(ChineseAsc?>=?51446?&&?ChineseAsc? return?‘S‘;
else?if(ChineseAsc?>=?52218?&&?ChineseAsc? return?‘T‘;
// else?if(ChineseAsc>=52698&&ChineseAsc<52698)return?‘U‘;
// else?if(ChineseAsc>=52698&&ChineseAsc<52698)return?‘V‘;
else?if(ChineseAsc?>=?52698?&&?ChineseAsc? return?‘W‘;
else?if(ChineseAsc?>=?52980?&&?ChineseAsc? return?‘X‘;
else?if(ChineseAsc?>=?53689?&&?ChineseAsc? return?‘Y‘;
else?if(ChineseAsc?>=?54481)
return?‘Z‘;
else
return?‘*‘;
}
///?
///?將漢字字符轉(zhuǎn)換為拼音首字母。
///?如果?Asc?小于256,則原樣返回
///?如果?轉(zhuǎn)換失敗,則返回“*“。如:中文標(biāo)點(diǎn)符號(hào)
///?速度:1500000次/秒
///?

///?要轉(zhuǎn)換的字符
///?拼音首字母
public?static?char?GetChineseSpell(char?ChineseChar)
{
int?ChineseAsc;
byte[]?ChineseByte?=System.Text.Encoding.Default.GetBytes(ChineseChar.ToString());

if(ChineseByte.Length? {
ChineseAsc?=?ChineseByte[0];
}
else
{
ChineseAsc?=?(ChineseByte[0]?< }
return?GetChineseSpell(ChineseAsc);
}
///?

///?將包含漢字的字符串轉(zhuǎn)換為拼音首

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1398??2013-03-23?03:35??智能過(guò)濾.sln

?????文件????????120??2013-03-23?03:25??SocgComboBox\app.config

?????文件???????8704??2013-03-23?03:35??SocgComboBox\bin\Debug\SocgComboBox.dll

?????文件????????120??2013-03-23?03:25??SocgComboBox\bin\Debug\SocgComboBox.dll.config

?????文件??????22016??2013-03-23?03:35??SocgComboBox\bin\Debug\SocgComboBox.pdb

?????文件??????14328??2013-03-23?03:34??SocgComboBox\bin\Debug\SocgComboBox.vshost.exe

?????文件????????120??2013-03-23?03:25??SocgComboBox\bin\Debug\SocgComboBox.vshost.exe.config

?????目錄??????????0??2013-03-23?03:34??SocgComboBox\bin\Debug

?????目錄??????????0??2013-03-23?03:26??SocgComboBox\bin

?????文件??????10269??2013-03-23?03:33??SocgComboBox\Common.cs

?????目錄??????????0??2013-03-23?03:26??SocgComboBox\obj\Debug\Refactor

?????文件????????423??2013-03-23?03:34??SocgComboBox\obj\Debug\SocgComboBox.csproj.FileListAbsolute.txt

?????文件???????8704??2013-03-23?03:35??SocgComboBox\obj\Debug\SocgComboBox.dll

?????文件??????22016??2013-03-23?03:35??SocgComboBox\obj\Debug\SocgComboBox.pdb

?????目錄??????????0??2013-03-23?03:24??SocgComboBox\obj\Debug\TempPE

?????目錄??????????0??2013-03-23?03:35??SocgComboBox\obj\Debug

?????目錄??????????0??2013-03-23?03:24??SocgComboBox\obj

?????文件???????1346??2013-03-23?03:35??SocgComboBox\Properties\AssemblyInfo.cs

?????目錄??????????0??2013-03-23?03:35??SocgComboBox\Properties

?????文件???????5751??2013-03-23?03:33??SocgComboBox\SocgComboBox.cs

?????文件???????2432??2013-03-23?03:34??SocgComboBox\SocgComboBox.csproj

?????目錄??????????0??2013-03-23?03:48??SocgComboBox

?????文件????????120??2013-03-23?03:36??測(cè)試\app.config

?????文件???????8704??2013-03-23?03:35??測(cè)試\bin\Debug\SocgComboBox.dll

?????文件??????22016??2013-03-23?03:35??測(cè)試\bin\Debug\SocgComboBox.pdb

?????文件???????7680??2013-03-23?03:41??測(cè)試\bin\Debug\測(cè)試.exe

?????文件????????120??2013-03-23?03:36??測(cè)試\bin\Debug\測(cè)試.exe.config

?????文件??????19968??2013-03-23?03:41??測(cè)試\bin\Debug\測(cè)試.pdb

?????文件??????14328??2013-03-23?03:42??測(cè)試\bin\Debug\測(cè)試.vshost.exe

?????文件????????120??2013-03-23?03:36??測(cè)試\bin\Debug\測(cè)試.vshost.exe.config

............此處省略26個(gè)文件信息

評(píng)論

共有 條評(píng)論