• 大小: 0.07M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-25
  • 语言: C#
  • 标签: 拼音  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.Regularexpressions;
namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            AutoCompleteStringCollection acsc = new AutoCompleteStringCollection();
            txtBox1.AutoCompleteCustomSource = acsc;
            txtBox1.AutoCompleteMode = AutoCompleteMode.Suggest;
            txtBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
            acsc.Add(“[001] some kind of item“);
            acsc.Add(“[002] some other item“);
            acsc.Add(“[003] an orange“);
            acsc.Add(“[004] i like pickles“);
        }

        private void button1_Click(object sender EventArgs e)
        {
            
            MessageBox.Show(GetAllPYLetters(“你好啊“));
        }
        public static string GetChineseSpellCode(string unicodeString)  
        {  
            int i = 0;  
            ushort key = 0;  
            string strResult = string.Empty;            //创建两个不同的encoding对象     
            Encoding unicode = Encoding.Unicode;  
            //创建GBK码对象     
            Encoding gbk = Encoding.GetEncoding(936);  
            //将unicode字符串转换为字节     
            byte[] unicodeBytes = unicode.GetBytes(unicodeString);  
            //再转化为GBK码     
            byte[] gbkBytes = Encoding.Convert(unicode gbk unicodeBytes);  
            while (i < gbkBytes.Length)  
            {  
                //如果为数字\字母\其他ASCII符号     
                if (gbkBytes[i] <= 127)  
                {  
                    strResult = strResult + (char)gbkBytes[i];  
                    i++;  
                }  
                else  
                {  
                    key = (ushort)(gbkBytes[i] * 256 + gbkBytes[i + 1]);  
  
                    if (key >= ‘\uB0A1‘ && key <= ‘\uB0C4‘)  
                    {  
                        strResult = strResult + “A“;  
                    }  
                    else if (key >= ‘\uB0C5‘ && key <= ‘\uB2C0‘)  
                    {  
                        strResult = strResult + “B“;  
                    }  
                    else if (key >= ‘\uB2C1‘ && key <= ‘\uB4ED‘)  
                    {  
                        strResult = strResult + “C“;  
                    }  
                    else if (key >= ‘\uB4EE‘ && key <= ‘\uB6E9‘)  
                    {  
                        strResult = strResult + “D“;  
                    }  
                    else if (key >= ‘\uB6EA‘ && key <= ‘\uB7A1‘)  
                    {  
                        strResult = strResult + “E“;  
                    }  
                    else if (key >= ‘\uB7A2‘ && key <= ‘\uB8C0‘)  
                    {  
                        strResult =

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      35328  2015-03-02 11:15  c#拼音程序\bin\Debug\WindowsFormsApplication2.exe

     文件      32256  2015-03-02 11:15  c#拼音程序\bin\Debug\WindowsFormsApplication2.pdb

     文件      11600  2015-03-02 11:15  c#拼音程序\bin\Debug\WindowsFormsApplication2.vshost.exe

     文件        490  2010-03-17 22:39  c#拼音程序\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest

     文件      31706  2015-03-02 11:15  c#拼音程序\Form1.cs

     文件       3480  2015-03-02 10:36  c#拼音程序\Form1.Designer.cs

     文件       5817  2015-03-02 10:36  c#拼音程序\Form1.resx

     文件       2152  2015-03-02 10:28  c#拼音程序\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6380  2015-03-02 11:15  c#拼音程序\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        460  2015-03-02 10:37  c#拼音程序\obj\x86\Debug\GenerateResource.read.1.tlog

     文件       1086  2015-03-02 10:37  c#拼音程序\obj\x86\Debug\GenerateResource.write.1.tlog

     文件       1276  2015-03-02 11:15  c#拼音程序\obj\x86\Debug\WindowsFormsApplication2.csproj.FileListAbsolute.txt

     文件      35328  2015-03-02 11:15  c#拼音程序\obj\x86\Debug\WindowsFormsApplication2.exe

     文件        180  2015-03-02 10:37  c#拼音程序\obj\x86\Debug\WindowsFormsApplication2.Form1.resources

     文件      32256  2015-03-02 11:15  c#拼音程序\obj\x86\Debug\WindowsFormsApplication2.pdb

     文件        180  2015-03-02 10:32  c#拼音程序\obj\x86\Debug\WindowsFormsApplication2.Properties.Resources.resources

     文件        505  2015-03-02 10:28  c#拼音程序\Program.cs

     文件       1404  2015-03-02 10:28  c#拼音程序\Properties\AssemblyInfo.cs

     文件       2896  2015-03-02 10:28  c#拼音程序\Properties\Resources.Designer.cs

     文件       5612  2015-03-02 10:28  c#拼音程序\Properties\Resources.resx

     文件       1107  2015-03-02 10:28  c#拼音程序\Properties\Settings.Designer.cs

     文件        249  2015-03-02 10:28  c#拼音程序\Properties\Settings.settings

     文件       3707  2015-03-02 10:32  c#拼音程序\WindowsFormsApplication2.csproj

     目录          0  2015-03-02 11:26  c#拼音程序\obj\x86\Debug\TempPE

     目录          0  2015-03-02 11:26  c#拼音程序\obj\x86\Debug

     目录          0  2015-03-02 11:26  c#拼音程序\bin\Debug

     目录          0  2015-03-02 11:26  c#拼音程序\obj\x86

     目录          0  2015-03-02 11:26  c#拼音程序\bin

     目录          0  2015-03-02 11:26  c#拼音程序\obj

     目录          0  2015-03-02 11:26  c#拼音程序\Properties

............此处省略4个文件信息

评论

共有 条评论