• 大小: 72KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-07-18
  • 语言: 其他
  • 标签: 日文假名  罗马音  

资源简介

将日语中的假名转换为罗马音,给日语新手们用 主要使用string的replace方法进行替换,促音特殊处理 使用时请加载字典,在DEBUG目录下

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.VisualBasic;
using System.Runtime.InteropServices;
using Microsoft.International.Converters.TraditionalChineseToSimplifiedConverter;


namespace _1help
{

    public partial class Form1 : Form
    {
        //[DllImport(“kernel32.dll“ EntryPoint = “LCMapStringA“)]

        [DllImport(“microsoft.visualbasic.dll“ CharSet = CharSet.Auto)]


      //public static extern int LCMapString(int Locale int dwMapFlags byte[] lpSrcStrint cchSrc byte[] lpDestStrint cchDest);
        public static extern string StrConv(string str VbStrConv Conversion [OptionalAttribute] int LocaleID);

      const int LCMAP_SIMPLIFIED_CHINESE = 0x02000000;

      const int LCMAP_TRADITIONAL_CHINESE = 0x04000000;

        public Form1()
        {
            InitializeComponent();
        }

        private void btnOpen_Click(object sender EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.title = “打开字典“;
            ofd.Multiselect=true;
            ofd.InitialDirectory = Application.StartupPath;
            ofd.Filter = “字典文件(*.dic)|*.dic|文本文件(*.txt)|*.txt“;
            if(ofd.ShowDialog()==DialogResult.OK)
            {
                try
                {
                    string[] fname = ofd.FileNames;
                    for (int i = 0; i < fname.Length; i++)
                    {
                        lbFilelist.Items.Add(fname[i].Substring(fname[i].LastIndexOf(‘\\‘) + 1));
                        StreamReader sr = new StreamReader(fname[i]Encoding.Defaulttrue);
                        string read = null;
                        while ((read = sr.ReadLine()) != null)
                        {
                            lbCvtList.Items.Add(read);
                        }
                        sr.Close();
                    }
                }
                catch (Exception es)
                {
                    MessageBox.Show(“Error:“ + es.Message);

                }
                        
            }

        }

        private void btnInput_Click(object sender EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.title = “打开字典“;
            ofd.Multiselect = true;
            ofd.InitialDirectory = Application.StartupPath;
            ofd.Filter = “歌词文件(*.lrc)|*.lrc|文本文件(*.txt)|*.txt“;
            if(ofd.ShowDialog()==DialogResult.OK)
            {
                try
                {
                    string []fname=ofd.FileNames;
                    tbInputFile.Text=null;
                    foreach(string fn in fname)
                    {
                        tbInputFile.Text += fn+“|“;
                    }
                }
                catch (Exception es)
 

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

     文件       3661  2009-08-01 14:05  11help\11help\11help.csproj

     文件       5632  2005-12-08 14:51  11help\11help\bin\Debug\11help.vshost.exe

     文件        826  2009-08-01 00:57  11help\11help\bin\Debug\平假名.txt

     文件      24576  2009-08-01 14:28  11help\11help\bin\Debug\11help.exe

     文件      26112  2009-08-01 14:28  11help\11help\bin\Debug\11help.pdb

     文件        409  2009-08-01 01:09  11help\11help\bin\Debug\人称代词.txt

     文件        179  2009-08-01 14:13  11help\11help\bin\Debug\常用词.txt

     文件      29776  2008-03-24 17:12  11help\11help\bin\Debug\ChineseConverter.dll

     文件       3446  2008-01-14 15:42  11help\11help\bin\Debug\ChineseConverter.xml

     文件       1178  2009-08-01 14:09  11help\11help\bin\Debug\测试用.txt

     文件       5632  2005-12-08 14:51  11help\11help\bin\Release\11help.vshost.exe

     文件      24576  2009-07-31 21:35  11help\11help\bin\Release\11help.exe

     文件      22016  2009-07-31 21:35  11help\11help\bin\Release\11help.pdb

     文件       6359  2009-07-17 12:56  11help\11help\Form1.Designer.cs

     文件       5814  2009-07-17 12:56  11help\11help\Form1.resx

     文件        602  2009-08-01 14:28  11help\11help\obj\11help.csproj.FileList.txt

     文件        180  2009-07-31 22:07  11help\11help\obj\Debug\_1help.Form1.resources

     文件        180  2009-07-31 22:07  11help\11help\obj\Debug\_1help.Properties.Resources.resources

     文件        842  2009-07-31 22:07  11help\11help\obj\Debug\11help.csproj.GenerateResource.Cache

     文件      24576  2009-08-01 14:28  11help\11help\obj\Debug\11help.exe

     文件       2916  2009-08-01 14:05  11help\11help\obj\Debug\ResolveAssemblyReference.cache

     文件      26112  2009-08-01 14:28  11help\11help\obj\Debug\11help.pdb

     文件        180  2009-07-31 21:35  11help\11help\obj\Release\_1help.Form1.resources

     文件        180  2009-07-31 21:35  11help\11help\obj\Release\_1help.Properties.Resources.resources

     文件        842  2009-07-31 21:35  11help\11help\obj\Release\11help.csproj.GenerateResource.Cache

     文件      22016  2009-07-31 21:35  11help\11help\obj\Release\11help.pdb

     文件      24576  2009-07-31 21:35  11help\11help\obj\Release\11help.exe

     文件        465  2009-07-17 00:21  11help\11help\Program.cs

     文件       1190  2009-07-17 00:21  11help\11help\Properties\AssemblyInfo.cs

     文件       2866  2009-07-17 00:21  11help\11help\Properties\Resources.Designer.cs

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

评论

共有 条评论

相关资源